X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fp_enc.c;h=b5a3a84c41d3ac7a2325071b48273df50b75e28a;hp=8d54f1a2f5ce00340558ec7a82249fca2afb123d;hb=c3586512184b4ca6c682c479323ac282ab30298e;hpb=6b691a5c85ddc4e407e32781841fee5c029506cd diff --git a/crypto/evp/p_enc.c b/crypto/evp/p_enc.c index 8d54f1a2f5..b5a3a84c41 100644 --- a/crypto/evp/p_enc.c +++ b/crypto/evp/p_enc.c @@ -58,25 +58,25 @@ #include #include "cryptlib.h" -#include "rand.h" -#ifndef NO_RSA -#include "rsa.h" +#include +#ifndef OPENSSL_NO_RSA +#include #endif -#include "evp.h" -#include "objects.h" -#include "x509.h" +#include +#include +#include -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);