bsaes-armv7.pl: remove partial register operations in CTR subroutine.
[openssl.git] / crypto / evp / p_enc.c
index a26bfad02aa2a74f959f694d1815d204f39792fd..b5a3a84c41d3ac7a2325071b48273df50b75e28a 100644 (file)
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "rand.h"
-#include "rsa.h"
-#include "evp.h"
-#include "objects.h"
-#include "x509.h"
+#include <openssl/rand.h>
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
+#include <openssl/evp.h>
+#include <openssl/objects.h>
+#include <openssl/x509.h>
 
-int EVP_PKEY_encrypt(ek,key,key_len,pubk)
-unsigned char *ek;
-unsigned char *key;
-int key_len;
-EVP_PKEY *pubk;
+int EVP_PKEY_encrypt_old(unsigned char *ek, const unsigned char *key, int key_len,
+            EVP_PKEY *pubk)
        {
        int ret=0;
        
+#ifndef OPENSSL_NO_RSA
        if (pubk->type != EVP_PKEY_RSA)
                {
-               EVPerr(EVP_F_EVP_PKEY_ENCRYPT,EVP_R_PUBLIC_KEY_NOT_RSA);
+#endif
+               EVPerr(EVP_F_EVP_PKEY_ENCRYPT_OLD,EVP_R_PUBLIC_KEY_NOT_RSA);
+#ifndef OPENSSL_NO_RSA
                goto err;
                }
        ret=RSA_public_encrypt(key_len,key,ek,pubk->pkey.rsa,RSA_PKCS1_PADDING);
 err:
+#endif
        return(ret);
        }