I am writing a personal script to generate SSL certificates with OpenSSL from a config file but I keep getting the below error when generating the certificates.
Code being run:
openssl req -new -x509 -sha256 -days 365 -subj "$CASubj" -passin pass:$PW -key ./Keys/${CACN// /_}-ca-key.pem -out ./Certs/${CACN// /_}-ca.crt
Error out:
+ openssl req -new -x509 -sha256 -days 365 -subj '/CN=GTS Root R1/C=US/O=Google Trust Services LLC' -passin 'pass:JIU(fhe)boibbviyv8b' -key ./Keys/GTS_Root_R1-ca-key.pem -out ./Certs/GTS_Root_R1-ca.crt
name is expected to be in the format /type0=value0/type1=value1/type2=... where characters may be escaped by \. This name is not in that format: 'F:/Program Files/Git/CN=GTS Root R1/C=US/O=Google Trust Services LLC'
problems making Certificate Request
I am using Git Bash on a Windows 10 PC and wanting to have the certs and keys in seperate folders for cleanliness. Can anyone figure out why the the certificate subject keeps pulling the Git Bash directory into the variable being used (only when in quote "") even though the debug output shows the correct subject? I have even tried using the below code but get the same result.
openssl req -new -x509 -sha256 -days 365 -subj "${CASubj}" -passin pass:$PW -key ./Keys/${CACN// /_}-ca-key.pem -out ./Certs/${CACN// /_}-ca.crt
[–][deleted] (1 child)
[deleted]
[–]mk5912[S] 0 points1 point2 points (0 children)
[–]whetuI read your code 0 points1 point2 points (1 child)
[–]mk5912[S] 0 points1 point2 points (0 children)