我有以下命令來OpenSSL生成私鑰和公鑰:生成私鑰和公鑰的OpenSSL
openssl genrsa –aes-128-cbc –out priv.pem –passout pass:[privateKeyPass] 2048
和
openssl req –x509 –new –key priv.pem –passin pass:[privateKeyPass] -days 3650 –out cert.cer
但不是第一個命令我得到的工作 以下錯誤:
usage: genrsa [args] [numbits]
-des encrypt the generated key with DES in cbc mode
-des3 encrypt the generated key with DES in ede cbc mode (168 bit key)
-seed
encrypt PEM output with cbc seed
-aes128, -aes192, -aes256
encrypt PEM output with cbc aes
-camellia128, -camellia192, -camellia256
encrypt PEM output with cbc camellia
-out file output the key to 'file
-passout arg output file pass phrase source
-f4 use F4 (0x10001) for the E value
-3 use 3 for the E value
-engine e use engine e, possibly a hardware device.
-rand file:file:...
load the file (or the files in the directory) into
the random number generator
我在做什麼錯?
編輯: 我解決的第一個命令:
openssl genrsa -aes128 -out privkey.pem 2048
現在我得到一個錯誤與謝勝利:
unknown option –x509
我不知道參數的順序是否重要? –