我尝试生成服务器密钥,但无法在 Ubuntu 14.04 上执行此操作,也无法理解为什么它会抱怨使用情况。请帮忙。
提前致谢。
罗杰
答案1
你--
在前面有一个双精度数aes256
。你那一行只有一个单精度数的字-
对我来说是有效的:
$ openssl genrsa -aes256 -out server-sec.key 4096
这就是命令帮助中所说的内容:
$ openssl genrsa -h
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