为什么openssl_pkey_new()失败? [英] Why does openssl_pkey_new() fail?

查看:594
本文介绍了为什么openssl_pkey_new()失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对此很陌生.为什么openssl_pkey_new()返回false?

I'm very new to this. Why is openssl_pkey_new() returning false?

我正在使用XAMPP,并且Apahce\bin目录下有一个OpenSSL.

I am using XAMPP and there is a an OpenSSL under the Apahce\bin directory.

我在犯什么明显的初学者错误?也许与SSL配置有关?

What obvious beginner mistake am I making? Maybe it's a matter of SSL configuration?

我的目标是将两个密钥写入两个文件.

My goal is to write the two keys into two files.

更新 :按照建议,我使用了openssl_error_string(),并显示了error:02001003:system library:fopen:No such process.听起来好像OpenSSL没有运行或不在路径中?有什么想法吗?

Update: as suggested, I used openssl_error_string() and it says error:02001003:system library:fopen:No such process. It sounds like maybe OpenSSL isn't running or isn't in the path?? Any ideas?

更新 :我将c:\xampp\php放入Windows路径中,以便它可以找到libeay32.dll并重新启动Apache.

Update: I put c:\xampp\php into the windows path, so that it could find libeay32.dlland restarted Apache.

现在我得到error:2006D080:BIO routines:BIO_new_file:no such file.有什么想法吗?

Now I get error:2006D080:BIO routines:BIO_new_file:no such file. Any ideas?

推荐答案

使用 openssl_error_string() 找出原因openssl_pkey_new()返回false(或任何其他OpenSSL错误).

Use openssl_error_string() to find out why openssl_pkey_new() is returning false (or any other OpenSSL error).

最新更新后,OpenSSL似乎找不到openssl.cnf文件,如

After your latest update, it appears that OpenSSL can't find the openssl.cnf file, as described here.

这篇关于为什么openssl_pkey_new()失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆