OpenSSL和读取openssl

OpenSSL和读取openssl

本文介绍了OpenSSL和读取openssl.conf文件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行windows xp 32位



我刚刚从以下网址下载了Openssl并安装它。



然后我尝试使用以下命令创建自签名证书

  openssl req -x509 -days 365 -newkey rsa:1024 -keyout hostkey.pem -nodes -out hostcert.pem 

然后它开始给出以下错误

然后在googling之后,我将上面的命令更改为

  openssl req -config C:\OpenSSL\bin\openssl.conf -x509 -days 365 -newkey rsa:1024 -keyout hostkey.pem -nodes -out hostcert.pem 

但是现在我在命令提示符下得到以下错误:

请帮忙。

在Windows上,您还可以设置环境属性 OPENSSL_CONF / code>。例如,您可以从命令行输入:

 设置OPENSSL_CONF = c:/libs/openssl-0.9.8k/openssl.cnf 

以验证您可以输入:

  echo%OPENSSL_CONF%

的计算机环境变量,因此所有用户和服务都默认使用它。例如,请参阅和。



现在,您可以运行openssl命令而不必传递config location参数。 p>

I am running windows xp 32bit

I just downloaded Openssl from the following URL and installed it.http://www.slproweb.com/products/Win32OpenSSL.html

and then i tried to create a self signed certificate by using the following command

openssl req -x509 -days 365 -newkey rsa:1024 -keyout hostkey.pem -nodes -out hostcert.pem

then it started giving the following error

Then after googling sometime i changed the above command to

openssl req -config C:\OpenSSL\bin\openssl.conf -x509 -days 365 -newkey rsa:1024 -keyout hostkey.pem -nodes -out hostcert.pem

But now i get the following error in the command prompt

Please help.Thanks in advance.

解决方案

On Windows you can also set the environment property OPENSSL_CONF. For example from the commandline you can type:

set OPENSSL_CONF=c:/libs/openssl-0.9.8k/openssl.cnf

to validate it you can type:

echo %OPENSSL_CONF%

You can also set it as part of the computer's environmental variables so all users and services have it available by default. See, for example, Environment variables in Windows NT and How To Manage Environment Variables in Windows XP.

Now you can run openssl commands without having to pass the config location parameter.

这篇关于OpenSSL和读取openssl.conf文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 00:31