提交 41eacc84 编写于 作者: D Dr. Stephen Henson

Clarify comment and add #ifdef.

上级 01b8b3c7
...@@ -61,7 +61,9 @@ ...@@ -61,7 +61,9 @@
#include <openssl/bn.h> #include <openssl/bn.h>
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/objects.h> #include <openssl/objects.h>
#include OPENSSL_NO_ENGINE
#include <openssl/engine.h> #include <openssl/engine.h>
#endif
#include <openssl/asn1.h> #include <openssl/asn1.h>
#include "asn1_locl.h" #include "asn1_locl.h"
...@@ -81,11 +83,13 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, ...@@ -81,11 +83,13 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
else else
{ {
ret= *a; ret= *a;
#ifndef OPENSSL_NO_ENGINE
if (ret->engine) if (ret->engine)
{ {
ENGINE_finish(ret->engine); ENGINE_finish(ret->engine);
ret->engine = NULL; ret->engine = NULL;
} }
#endif
} }
if (!EVP_PKEY_set_type(ret, type)) if (!EVP_PKEY_set_type(ret, type))
......
...@@ -170,7 +170,7 @@ void engine_pkey_asn1_meths_free(ENGINE *e) ...@@ -170,7 +170,7 @@ void engine_pkey_asn1_meths_free(ENGINE *e)
/* Find a method based on a string. This does a linear search through /* Find a method based on a string. This does a linear search through
* all implemented algorithms. This is OK in practice because only * all implemented algorithms. This is OK in practice because only
* a small number of algorithms are likely to be implemented in an engine * a small number of algorithms are likely to be implemented in an engine
* and it is only used for non speed critical operations. * and it is not used for speed critical operations.
*/ */
const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e, const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册