Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add e-mail to CSR generated with keytool

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.

like image 551
Sergiu Avatar asked Oct 22 '12 07:10

Sergiu


1 Answers

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, [email protected], C=UK"
like image 153
Jcs Avatar answered Oct 31 '22 22:10

Jcs