Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
There is also an issue from me about this (and a second similar problem with nacl.keygen): #66772 :)
And I also already created a PR to fix both: #66773
Description
As mentioned in documentation, we can generate the
pk
fromsk
using this command:But, this function will generate a
sk
like thepk
(sk
=pk
) and it's wrong.Steps to Reproduce the behavior
sk_file
usingsalt-call --local nacl.keygen
data.pk_file
usingsalt-call --local nacl.keygen sk_file=/etc/salt/pki/master/nacl
command/etc/salt/pki/master/nacl.pub
content. It equals/etc/salt/pki/master/nacl
.Expected behavior
The generated
pk
content should be different and have the correct value.Screenshots
Versions Report
salt --versions-report
```yaml Salt Version: Salt: 3006.8 Python Version: Python: 3.10.14 (main, Apr 3 2024, 21:30:09) [GCC 11.2.0] Dependency Versions: cffi: 1.17.1 cherrypy: unknown dateutil: 2.8.1 docker-py: 7.1.0 gitdb: Not Installed gitpython: Not Installed Jinja2: 3.1.3 libgit2: Not Installed looseversion: 1.0.2 M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.2 msgpack-pure: Not Installed mysql-python: Not Installed packaging: 22.0 pycparser: 2.21 pycrypto: Not Installed pycryptodome: 3.19.1 pygit2: Not Installed python-gnupg: 0.4.8 PyYAML: 6.0.1 PyZMQ: 23.2.0 relenv: 0.16.0 smmap: Not Installed timelib: 0.2.4 Tornado: 4.5.3 ZMQ: 4.3.4 System Versions: dist: ubuntu 22.04.3 jammy locale: utf-8 machine: x86_64 release: 5.15.0-122-generic system: Linux version: Ubuntu 22.04.3 jammy ```