#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/objects.h>
+#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
+#endif
#include <openssl/asn1.h>
#include "asn1_locl.h"
else
{
ret= *a;
+#ifndef OPENSSL_NO_ENGINE
if (ret->engine)
{
ENGINE_finish(ret->engine);
ret->engine = NULL;
}
+#endif
}
if (!EVP_PKEY_set_type(ret, type))
* by analyzing it we can determine the passed structure: this
* assumes the input is surrounded by an ASN1 SEQUENCE.
*/
- inkey = d2i_ASN1_SET_OF_ASN1_TYPE(NULL, &p, length, d2i_ASN1_TYPE,
- ASN1_TYPE_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL);
+ inkey = d2i_ASN1_SEQUENCE_ANY(NULL, &p, length);
/* Since we only need to discern "traditional format" RSA and DSA
* keys we can just count the elements.
*/