These are lessons I learned in creating my ECDSA pki guide. Robert Moskowitz The goals are: Basic, generic, ECDSA pki 802.1AR leaf Follow RFCs and current Best Practice Lesson 1 subjectAltName (SAN) is poorly handled in openSSL, and it has been part of the RFCs since '00! There is no prompting for SAN objects available as there is for DN. Multiple ways to handle SEQUENCE of SANs. No direct support for RFC 4108 hardwareModuleName used in 802.1AR certs. Very hard to include SAN in root CA cert. It is just different than for any other cert. Further SAN strangeness: DNS MUST be in caps (dns:www.foo.com is an error), but email is lower case. Lesson 2 Watch out for serialNum! No clear way to control serialNum for root CA cert. Perhaps -set_serial plus piping from 'openssl rand' would work. Per Best Practice, serialNum MUST be >= 8 octets and <= 20 octects. DER prefixes it with 0x00 if negative (first bit = 1). Thus limit to 19 octets! before each 'openssl ca': openssl rand -hex n > serial # where n = octets Lesson 3 Using ENV to supply DN content is not practical. Each cert type has different DN content. To use ENV, you need to either have "prompt = no" in cnf or -batch in the command. Then every DN sub-object in cnf MUST have a value. A length of zero produces an error, so if you are not using an object, you have to comment it out of cnf. Note this does not match the behavior when in the command you have something like: -subj "C=US/O=corp/OU=/CN=root CA" Lesson 3-a There is no way to set a DN field in the cnf with prompting. Something like: prompt = if no default