When trying to generate a certificate request, If either 'STate' or 'OrganizationUnit' is empty, I get this error-message:
1:error:0D07A098:asn1 encoding routines:ASN1_mbstring_ncopy:string too short:crypto/asn1/a_mbstr.c:100:minsize=1
The same command works perfectly in 1.0.2
What was the command that you used?
Failed command:
openssl req -reqexts v3_req \
-nodes -verbose -new -out machine2.csr.pem -config certgen.tmp \
-subj /C=HU/ST=/L=Budapest/O=ZSIN/OU=/CN=machine/[email protected] \
-newkey rsa:2048 -keyout machine2.key.pem
working version (with ST=XX,OU=XX):
openssl req -reqexts v3_req \
-nodes -verbose -new -out machine2.csr.pem -config certgen.tmp \
-subj /C=HU/ST=XX/L=Budapest/O=ZSIN/OU=XX/CN=machine/[email protected] \
-newkey rsa:2048 -keyout machine2.key.pem
Instead of /ST=/, you should just drop it. They both have a
minimum requirement of a length of 1. But there is no reason to
add them if you don't need them.
Thank you, kroeckx, that helped.
Most helpful comment
Instead of /ST=/, you should just drop it. They both have a
minimum requirement of a length of 1. But there is no reason to
add them if you don't need them.