Incorporation of RSEs assembled patches
[openssl.git] / crypto / evp / p_dec.c
index e845ce70c707babca1c5b4b753f410003b9b7093..fca333d78ae9f69c427d4c17b26a299624f73612 100644 (file)
@@ -59,7 +59,9 @@
 #include <stdio.h>
 #include "cryptlib.h"
 #include "rand.h"
+#ifndef NO_RSA
 #include "rsa.h"
+#endif
 #include "evp.h"
 #include "objects.h"
 #include "x509.h"
@@ -72,13 +74,17 @@ EVP_PKEY *priv;
        {
        int ret= -1;
        
+#ifndef NO_RSA
        if (priv->type != EVP_PKEY_RSA)
                {
+#endif
                EVPerr(EVP_F_EVP_PKEY_DECRYPT,EVP_R_PUBLIC_KEY_NOT_RSA);
+#ifndef NO_RSA
                goto err;
                 }
 
        ret=RSA_private_decrypt(ekl,ek,key,priv->pkey.rsa,RSA_PKCS1_PADDING);
 err:
+#endif
        return(ret);
        }