OpenSSL Certificate (Version 3) with Subject Alternative Name

后端 未结 9 2103

I\'m using the OpenSSL command line tool to generate a self signed certificate. It seems to be working correctly except for two issues. I can\'t get it to create a .cer with a S

9条回答
  •  你的背包
    2021-01-31 04:08

    Here is the simple steps for you

    While generating the CSR you should use -config and -extensions and while generating certificate you should use -extfile and -extensions

    Here is the example

    openssl req -new -nodes -keyout test.key  -out test.csr -days 3650 -subj "/C=US/ST=SCA/L=SCA/O=Oracle/OU=Java/CN=test cert" -config /etc/pki/tls/openssl.cnf -extensions v3_req
    openssl x509 -req -days 3650 -in test.csr -CA cacert.pem -CAkey rootCA.key -CAcreateserial -out test.pem -extfile /etc/pki/tls/openssl.cnf  -extensions v3_req
    

    hope this helps

提交回复
热议问题