Question

Can we programmatically create X.509 Certificate which contains arbitrary attributes e.g. Age, Gender, Designation etc.

I need to create Authorization Certificate, which client application will present to server application before executing the required function.

I am using Java and C#, so any solution/suggestion is good for me.

Was it helpful?

Solution

Have a look at this site for a start.

Create keystore

keytool -genkey -alias youralias -keyalg RSA -keypass yourpassword123 -keystore yourKeystoreRSAMD5 -storepass store123 -sigalg MD5WITHRSA -validity 9999 -dname "CN=Common Name, OU=XYZ, O=Your company name, L=Your Town, S=Region, C=Countryname"

Export cert file in PEM format

keytool -export -alias youralias -file rsamd5YourKey.cer -keystore yourKeystoreRSAMD5 -storepass store123
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top