• <small id='yDtsY'></small><noframes id='yDtsY'>

    • <bdo id='yDtsY'></bdo><ul id='yDtsY'></ul>

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

      1. <tfoot id='yDtsY'></tfoot>

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

        Windows 上的 OpenSSL 可以使用系统证书存储吗?

        Can OpenSSL on Windows use the system certificate store?(Windows 上的 OpenSSL 可以使用系统证书存储吗?)

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

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

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

                • <tfoot id='sYlD3'></tfoot>

                  本文介绍了Windows 上的 OpenSSL 可以使用系统证书存储吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我从 Linux 移植到 Windows 的一些工作 C++ 代码在 Windows 上失败,因为 SSL_get_verify_result() 正在返回 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.

                  Some working C++ code that I'm porting from Linux to Windows is failing on windows because SSL_get_verify_result() is returning X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY.

                  该代码在 Linux 上使用 SSL_CTX_set_default_verify_paths() 来告诉 SSL 只查看证书存储的标准默认位置.

                  The code was using SSL_CTX_set_default_verify_paths() on Linux to tell SSL to just look in the standard default locations for the certificate store.

                  是否可以让 OpenSSL 使用系统证书存储?

                  Is it possible to get OpenSSL to use the system certificate store?

                  推荐答案

                  我之前做过.希望这会有所帮助,如果这正是您正在寻找的.

                  I have done it earlier. Hope this helps, if this is exactly what you are looking for.

                  1. 使用加密 API 从 Windows 证书存储中加载您的证书(在 PCCERT_CONTEXT 结构中).
                  2. 以二进制格式获取它的加密内容.[PCCERT_CONTEXT->pbCertEncoded].
                  3. 使用 OpenSSL 的 d2i_X509() 方法将此二进制缓冲区解析为 X509 证书对象.
                  4. 使用 SSL_CTX_get_cert_store() 方法获取 OpenSSL 信任存储的句柄.
                  5. 使用 X509_STORE_add_cert() 方法将上面解析的 X509 证书加载到此信任存储中.
                  6. 大功告成!
                  1. Load your certificate (in PCCERT_CONTEXT structure) from Windows Cert store using Crypto APIs.
                  2. Get encrypted content of it in binary format as it is. [PCCERT_CONTEXT->pbCertEncoded].
                  3. Parse this binary buffer into X509 certificate Object using OpenSSL's d2i_X509() method.
                  4. Get handle to OpenSSL's trust store using SSL_CTX_get_cert_store() method.
                  5. Load above parsed X509 certificate into this trust store using X509_STORE_add_cert() method.
                  6. You are done!

                  这篇关于Windows 上的 OpenSSL 可以使用系统证书存储吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 中将列表元素移动到末尾)

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

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