mkdir -p /etc/pki/CA/newcerts
openssl genrsa -out newcerts/username_key.pem 2048
openssl req –utf8 –nameopt oneline,utf8 -new -key newcerts/username_key.pem \
-out newcerts/username_req.pem
openssl x509 -days 365 -CA cacert.pem \
-CAkey private/cakey.pem \
-CAserial serial \
-in newcerts/username_req.pem -req \
-out newcerts/username.pem
openssl pkcs12 -export -in newcerts/username.pem \
-inkey newcerts/username_key.pem \
-out newcerts/username.p12
openssl x509 -in newcerts/username.pem -serial -enddate -subject
echo –e "V\t120522155648Z\t\t01\tnewcerts/username.pem\t/C=AT/ST=Upper Austria/L=Linz/O=MyCompany/CN=Username/emailAddress=username@mycompany.com" >> index.txt