NO_DSA, NO_RSA patches.
[openssl.git] / crypto / asn1 / d2i_pr.c
index 31584fe090c6ab61115c872c5449c78053b96335..2e7d96af904adcfee5ee2cdb14fbd4154812d8bd 100644 (file)
 #include <openssl/evp.h>
 #include <openssl/objects.h>
 #include <openssl/asn1.h>
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
+#ifndef OPENSSL_NO_DSA
+#include <openssl/dsa.h>
+#endif
 
 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp,
             long length)
@@ -82,7 +88,7 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp,
        ret->type=EVP_PKEY_type(type);
        switch (ret->type)
                {
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        case EVP_PKEY_RSA:
                if ((ret->pkey.rsa=d2i_RSAPrivateKey(NULL,
                        (const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */
@@ -92,7 +98,7 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp,
                        }
                break;
 #endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
        case EVP_PKEY_DSA:
                if ((ret->pkey.dsa=d2i_DSAPrivateKey(NULL,
                        (const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */