无法将/root/.rnd载入RNG

问题描述

我想使用Windows Open SSL生成服务器证书。

运行此命令行时,出现此错误。我该怎么办?

命令

:
openssl req -new -x509 -days 3650 -key ca.key -out ca.crt

错误

无法将./.rnd加载到RNG中 10504:错误:2406F079:随机生成器:RAND_load_file:无法打开文件:crypto \ rand \ randfile.c:98:Filename =。/。rnd

我还尝试找到openssl配置文件,但是不,我没有该文件

解决方法

尝试删除或评论sum_over_time中的RANDFILE = $ENV::HOME/.rnd

,

原因: 默认情况下,“-rand”选项指示在操作系统中的某个位置使用随机文件.rnd。 由于用户问题,使用不存在的.rnd文件!!!!

补救措施: 添加-writer并写入.rnd文件(如果不存在)。

例如:

root@CentOS:/usr/local/etc/openldap/private # openssl genrsa -rand -genkey -out cert.key 2048
Can't load -genkey into RNG
546983936:error:2406F079:random number generator:RAND_load_file:Cannot open file:/usr/src/crypto/openssl/crypto/rand/randfile.c:98:Filename=-genkey

添加-writer和

root@CentOS:/usr/local/etc/openldap/private # openssl genrsa -writerand -genkey -out cert.key 2048
Generating RSA private key,2048 bit long modulus (2 primes)
...........................+++++
..............+++++
e is 65537 (0x010001)
root@CentOS:/usr/local/etc/openldap/private # 

我本人将再次遇到此错误。当然,我将首先检查StackOverflow(R6000 ha ha)!!!