I’m creating a X509 certificate using OpenSSL and objective-c.
I want to add some values corresponding to the user which creates the cert. Currently I’m adding Country, Common Name, Organization, Locality and Organization Unit. For each value a corrseponding key is needed. For example Country is “C”, common name is “CN”, locality is “L” and so on…
Now I want to add the users email address to the certificate but I can’t find the key for it and the OpenSSL docu doesn’t mention this anywhere.
I’m adding the values this way:
X509_NAME_add_entry_by_txt(name,"C",
MBSTRING_ASC, "AT", -1, -1, 0);
I’ve tried “E”, “EA”, “Email” for setting the users email address but didn’t succeed.
Does anyone know the key to set the email value in issuer name and subject name of a X509 certificate using OpenSSL?
According to Wikipedia: http://en.wikipedia.org/wiki/X.509 you appear to need to use “CA/emailAddress” as the key…