89:~ zhangwenquan$ 89:~ zhangwenquan$ openssl OpenSSL> genrsa -out rsa_private_key.pem 1024 Generating RSA private key, 1024 bit long modulus ........ ...
89:~ zhangwenquan$
89:~ zhangwenquan$ openssl
OpenSSL> genrsa -out rsa_private_key.pem 1024
Generating RSA private key, 1024 bit long modulus
..........++++++
..................++++++
e is 65537 (0x10001)
OpenSSL> pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt
-----BEGIN PRIVATE KEY-----
MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALldSA5HtPvyhEUK
a6M+Cn2jwUQx1lekTK0gM7jSFhzKhcY7ADeVhL+AjGtnYvlGY+npOEM1DqJPBBiu
cbPkyBtPHErZRjN0r0rZiqS0AY7j/EvG656W8S+rhN59AWtV3zuCF0C6pOWnUiMr
7GcyQR1qoX2BN7R2kr8ZwM92WroNAgMBAAECgYAhpMuqQ9uWixr0yQJmW6Fd0nYG
oaEMwTZlid25YvA+g4eqRhUxAYNZmsRhzh8JrXv+/aSHlj60uPC+ZhMfGpwzAYo1
I0KR+dQT5uoP1nhqVZev+cXICabJ3gKCzbvdIFz1TxL8NJw1UlssNLtxdn68QVWh
/wSz/7ppGdKrgVIM4QJBAOS36NuVMsut6iPxLmtOpRz+VTZj8jS1yXz0/sv+WIoj
zcBabuMTVixMvuK49dBZTTOd5AXCizzKDx4qdD/VdUkCQQDPeYYjJTbi2rsOsyoK
+CcMnTYLJN8fWLNR3vLGoHxayOMHDW8Lfc4YrZJCGzoSuR3ikMZBOf9mXjO2NNsu
TxKlAkAqyGgLYw48YUzR6lR3iB+Em+KOqQVubK7C7AUZXXtsY6QiHght+3j8EmMG
f/ijP4EcbaVwmmJ3PYi0aNaT9jbZAkBJQxpQssVs2dwP1shT00jGtYTt7nkzcnjv
whBsfyMqU6GHTgEWR7hNEo2A9mhNUDzzUjgPtFExbrZH8uYqthVZAkB2/TLnvwDM
fzXIlSUTWi5nqILJhNWzY5l3XC03iH0WEvCi5QGNsOsvomdX7Krj0Imavc2L9hVj
fELfsTQfy0Dz
-----END PRIVATE KEY-----
OpenSSL> rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem
writing RSA key
OpenSSL>
紅色是要輸入的命令。
這個紅色的框是pkcs8 格式的 要記得複製下來 後臺要用。
然後前往文件夾 尋找pem證書
這就是要生成的 pem 文件