Why does openssl_pkey_new() fail?(为什么 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() 失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么 openssl_pkey_new() 失败?
基础教程推荐
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何替换eregi() 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
