Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CA generation as non-root user due to .rnd error
engine-setup fails creating the CA certificate when running under non-root user with the following error: --------- plugin.execute:923 execute-output: ('/home/build/**FILTERED**//share/**FILTERED**-engine/bin/pki-create-ca.sh', '--subject=/C=US/O=Test/CN=c0714690d92b.71630', '--keystore-password=**FILTERED**', '--ca-file=ca') stderr: Can't load .rnd into RNG 803BCAC12B7F0000:error:12000079:random number generator:RAND_load_file:Cannot open file:crypto/rand/randfile.c:106:Filename=.rnd Cannot write random bytes: 803BCAC12B7F0000:error:12000079:random number generator:RAND_write_file:Cannot open file:crypto/rand/randfile.c:240:Filename=.rnd Cannot generate CA request ---------- openssl commands try to find a .rnd file in the current directly. If not found, it will be created. But as we do not change early enough into the correct path, the .rnd file can't be created there, resulting in an error. So we just switch move the openssl req command in the subshell in the correct PKIDIR path. Signed-off-by: Brooklyn Dewolf <[email protected]> Signed-off-by: Jean-Louis Dupond <[email protected]>
- Loading branch information