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

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

      1. 如何使用openssl将PEM编码的X509证书作为C++字符串获取?

        How to get PEM encoded X509 certificate as C++ string using openssl?(如何使用openssl将PEM编码的X509证书作为C++字符串获取?)

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

            <bdo id='T2DWA'></bdo><ul id='T2DWA'></ul>
            <legend id='T2DWA'><style id='T2DWA'><dir id='T2DWA'><q id='T2DWA'></q></dir></style></legend>

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

                  本文介绍了如何使用openssl将PEM编码的X509证书作为C++字符串获取?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个带有自签名证书的 openssl X509 结构.我需要从此结构中获取 PEM 格式的 C++ 字符串.我需要使用哪些 openssl API 来实现这一目标?

                  I have a openssl X509 structure with a self signed certificate. I need to get a PEM formatted C++ string from this structure. What are the openssl APIs that I need to use to achieve this?

                  我尝试遵循 https 上的示例程序://www.codeblog.org/gonzui/markup/openssl-0.9.8a/demos/x509/mkcert.c.该程序展示了一种将 PEM 格式的证书写入文件的方法.如果没有其他方法,我可以将此文件的内容读入 C++ 字符串.

                  I tried following the example program at https://www.codeblog.org/gonzui/markup/openssl-0.9.8a/demos/x509/mkcert.c. This program shows a way to write the certificate in PEM format to a file. I can read the contents of this file into a C++ string if there is no other way to do it.

                  推荐答案

                  查看 openssl x509 命令的源码,看看它是如何执行读取 DER 编码文件并写入 PEM 的操作的 - 即:

                  look at the source of the openssl x509 command and see how it does the operation to read a DER encoded file and writes a PEM one - ie:

                  openssl x509 -in mycert.der -inform DER -out mycert.pem
                  

                  cli utils 的代码很容易理解

                  The code of the cli utils is pretty easy to follow

                  这篇关于如何使用openssl将PEM编码的X509证书作为C++字符串获取?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)
                  How should a size-limited stl-like container be implemented?(应该如何实现大小受限的 stl 类容器?)
                  Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)
                  STL BigInt class implementation(STL BigInt 类实现)
                  Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)
                  Move list element to the end in STL(在 STL 中将列表元素移动到末尾)
                    <i id='zBhf1'><tr id='zBhf1'><dt id='zBhf1'><q id='zBhf1'><span id='zBhf1'><b id='zBhf1'><form id='zBhf1'><ins id='zBhf1'></ins><ul id='zBhf1'></ul><sub id='zBhf1'></sub></form><legend id='zBhf1'></legend><bdo id='zBhf1'><pre id='zBhf1'><center id='zBhf1'></center></pre></bdo></b><th id='zBhf1'></th></span></q></dt></tr></i><div id='zBhf1'><tfoot id='zBhf1'></tfoot><dl id='zBhf1'><fieldset id='zBhf1'></fieldset></dl></div>
                      <tbody id='zBhf1'></tbody>
                  1. <tfoot id='zBhf1'></tfoot>
                      <bdo id='zBhf1'></bdo><ul id='zBhf1'></ul>

                      • <legend id='zBhf1'><style id='zBhf1'><dir id='zBhf1'><q id='zBhf1'></q></dir></style></legend>

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