<i id='Y5S6Y'><tr id='Y5S6Y'><dt id='Y5S6Y'><q id='Y5S6Y'><span id='Y5S6Y'><b id='Y5S6Y'><form id='Y5S6Y'><ins id='Y5S6Y'></ins><ul id='Y5S6Y'></ul><sub id='Y5S6Y'></sub></form><legend id='Y5S6Y'></legend><bdo id='Y5S6Y'><pre id='Y5S6Y'><center id='Y5S6Y'></center></pre></bdo></b><th id='Y5S6Y'></th></span></q></dt></tr></i><div id='Y5S6Y'><tfoot id='Y5S6Y'></tfoot><dl id='Y5S6Y'><fieldset id='Y5S6Y'></fieldset></dl></div>

    <tfoot id='Y5S6Y'></tfoot>
    <legend id='Y5S6Y'><style id='Y5S6Y'><dir id='Y5S6Y'><q id='Y5S6Y'></q></dir></style></legend>

    1. <small id='Y5S6Y'></small><noframes id='Y5S6Y'>

        <bdo id='Y5S6Y'></bdo><ul id='Y5S6Y'></ul>
    2. PHP OpenSSL 可以生成私钥/公钥/证书对吗?

      时间:2023-10-15
        <tbody id='n87ZY'></tbody>

      • <i id='n87ZY'><tr id='n87ZY'><dt id='n87ZY'><q id='n87ZY'><span id='n87ZY'><b id='n87ZY'><form id='n87ZY'><ins id='n87ZY'></ins><ul id='n87ZY'></ul><sub id='n87ZY'></sub></form><legend id='n87ZY'></legend><bdo id='n87ZY'><pre id='n87ZY'><center id='n87ZY'></center></pre></bdo></b><th id='n87ZY'></th></span></q></dt></tr></i><div id='n87ZY'><tfoot id='n87ZY'></tfoot><dl id='n87ZY'><fieldset id='n87ZY'></fieldset></dl></div>
          <bdo id='n87ZY'></bdo><ul id='n87ZY'></ul>
          <tfoot id='n87ZY'></tfoot>
          1. <legend id='n87ZY'><style id='n87ZY'><dir id='n87ZY'><q id='n87ZY'></q></dir></style></legend>

              <small id='n87ZY'></small><noframes id='n87ZY'>

                本文介绍了PHP OpenSSL 可以生成私钥/公钥/证书对吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                不知道PHP的OpenSSL扩展是否可以生成private/public密钥/证书对?

                I wonder if PHP's OpenSSL extension can be used to generate private/public key/certificate pairs?

                推荐答案

                当然,使用 openssl_pkey_new:

                Sure, use openssl_pkey_new:

                $privateKey = openssl_pkey_new(array('private_key_bits' => 2048));
                $details = openssl_pkey_get_details($privateKey);
                $publicKey = $details['key'];
                

                您可以使用 openssl_pkey_export 导出密钥或openssl_pkey_export_to_file.

                You can export the keys with openssl_pkey_export or openssl_pkey_export_to_file.

                这篇关于PHP OpenSSL 可以生成私钥/公钥/证书对吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:为什么在 Linux 或 Windows 下私钥字符串不同? 下一篇:如何在 PHP 中创建数字证书并导出到 .p12 文件?

                相关文章

                  1. <i id='lF1i8'><tr id='lF1i8'><dt id='lF1i8'><q id='lF1i8'><span id='lF1i8'><b id='lF1i8'><form id='lF1i8'><ins id='lF1i8'></ins><ul id='lF1i8'></ul><sub id='lF1i8'></sub></form><legend id='lF1i8'></legend><bdo id='lF1i8'><pre id='lF1i8'><center id='lF1i8'></center></pre></bdo></b><th id='lF1i8'></th></span></q></dt></tr></i><div id='lF1i8'><tfoot id='lF1i8'></tfoot><dl id='lF1i8'><fieldset id='lF1i8'></fieldset></dl></div>
                  2. <tfoot id='lF1i8'></tfoot>

                    <small id='lF1i8'></small><noframes id='lF1i8'>

                      <bdo id='lF1i8'></bdo><ul id='lF1i8'></ul>

                    <legend id='lF1i8'><style id='lF1i8'><dir id='lF1i8'><q id='lF1i8'></q></dir></style></legend>