I need to include custom stuff in certificate subject and sign it (I am CA as well). I added custom OIDs to config file, but the problem is that after signing request it looks like -
openssl req -new -key 2\ClientCertReal\client.key -out 2\ClientCertReal\client.csr -subj "/CN=Lusis Reinis 00REINIS00/SN=Lusis/G=Reinis/SERIALN
BER=00REINIS00/O=Maahanmuuttovirasto/C=FI/"
C = FI
O = Maahanmuuttovirasto
1.2.3.4.1333 = 00REINIS00
1.2.3.4.1334 = Reinis
SN = Lusis
CN = Lusis Reinis 00REINIS00
How do I replace 1.2.3.4.1333 with custom string (SERIALNUMBER)?
c:\OpenSSL\bin>openssl x509 -req -days 365 -in 2\ClientCertReal\client.csr -CA 2\TestCA\ca.crt -CAkey 2\TestCA\ca.key -set_serial 101 -out 2\ClientCertReal\cl
nt.crt
Loading 'screen' into random state - done
Signature ok
subject=/CN=Lusis Reinis 00REINIS00/SN=Lusis/1.2.3.4.1334=Reinis/1.2.3.4.1333=00REINIS00/O=Maahanmuuttovirasto/C=FI
Getting CA Private Key
Enter pass phrase for 2\TestCA\ca.key:
Sincerely, Reinis