aesni TLS GCM support
[openssl.git] / crypto / evp / p_enc.c
index 8d54f1a2f5ce00340558ec7a82249fca2afb123d..b5a3a84c41d3ac7a2325071b48273df50b75e28a 100644 (file)
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "rand.h"
-#ifndef NO_RSA
-#include "rsa.h"
+#include <openssl/rand.h>
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
 #endif
-#include "evp.h"
-#include "objects.h"
-#include "x509.h"
+#include <openssl/evp.h>
+#include <openssl/objects.h>
+#include <openssl/x509.h>
 
-int EVP_PKEY_encrypt(unsigned char *ek, unsigned char *key, int key_len,
+int EVP_PKEY_encrypt_old(unsigned char *ek, const unsigned char *key, int key_len,
             EVP_PKEY *pubk)
        {
        int ret=0;
        
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        if (pubk->type != EVP_PKEY_RSA)
                {
 #endif
-               EVPerr(EVP_F_EVP_PKEY_ENCRYPT,EVP_R_PUBLIC_KEY_NOT_RSA);
-#ifndef NO_RSA
+               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);