Question

As per this : http://en.wikipedia.org/wiki/Certificate_signing_request the CSR can contain an email address.

My question is how can I add such e-mail address field considering I`m generating the CSR with keytool ?

Thank you.

Was it helpful?

Solution

When generating the key pair you can pass the Distinguished Name as a parameter with the -dname flag and thus add the EMAILADDRESS attribute.

keytool -genkey -alias mydomain -keyalg RSA -keystore keystore.jks -keysize 2048 -dname "CN=Your Name, EMAILADDRESS=your.name@example.com, C=UK"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top