问题原文
原帖链接 · Blaszard · CC BY-SA 3.0
When I tried to run the following command to issue a new private key, which I use to host my web app via SSL:
openssl genrsa -out example.key 2048
the following error occured:
unable to write 'random state'
e is 65537 (0x10001)
After digging out on the Web, I found a solution, which instructs you to delete the ~/.rnd file, which is likely owned by root.
sudo rm ~/.rnd
However, I found you don't need to delete the ~/.rnd if you issue the openssl command with sudo.
So my question is:
what is the
~/.rndand why does it exist in my environment?Which is a better way to issue a new private key?
社区高分解答
原帖链接 · womble · CC BY-SA 3.0
The ~/.rnd file is owned by root if you've ever run a command that modifies ~/.rnd as root via sudo in its non-login mode (ie without -i). As for what the ~/.rnd file is, it contains a seed value for the OpenSSL random number generator. The least-worst docs I can find on it are the RAND_read_file(3) man page.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
