为什么 openssl_pkey_new() 失败?

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

问题描述

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

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

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

I am using XAMPP and there is a an OpenSSL under the Apahcein 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这样的过程.听起来可能 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:xamppphp放入windows路径,这样它就可以找到libeay32.dll并重新启动Apache.

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

现在我得到error:2006D080:BIOroutines: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() 失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)