projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rc4/asm/rc4-586.pl: allow for 386-only build.
[oweals/openssl.git]
/
crypto
/
evp
/
p_dec.c
diff --git
a/crypto/evp/p_dec.c
b/crypto/evp/p_dec.c
index e845ce70c707babca1c5b4b753f410003b9b7093..4201dcbad99e1e800616ac8091f5642ec1924cc0 100644
(file)
--- a/
crypto/evp/p_dec.c
+++ b/
crypto/evp/p_dec.c
@@
-58,27
+58,30
@@
#include <stdio.h>
#include "cryptlib.h"
#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_decrypt(key,ek,ekl,priv)
-unsigned char *key;
-unsigned char *ek;
-int ekl;
-EVP_PKEY *priv;
+int EVP_PKEY_decrypt_old(unsigned char *key, const unsigned char *ek, int ekl,
+ EVP_PKEY *priv)
{
int ret= -1;
{
int ret= -1;
+#ifndef OPENSSL_NO_RSA
if (priv->type != EVP_PKEY_RSA)
{
if (priv->type != EVP_PKEY_RSA)
{
- EVPerr(EVP_F_EVP_PKEY_DECRYPT,EVP_R_PUBLIC_KEY_NOT_RSA);
+#endif
+ EVPerr(EVP_F_EVP_PKEY_DECRYPT_OLD,EVP_R_PUBLIC_KEY_NOT_RSA);
+#ifndef OPENSSL_NO_RSA
goto err;
}
ret=RSA_private_decrypt(ekl,ek,key,priv->pkey.rsa,RSA_PKCS1_PADDING);
err:
goto err;
}
ret=RSA_private_decrypt(ekl,ek,key,priv->pkey.rsa,RSA_PKCS1_PADDING);
err:
+#endif
return(ret);
}
return(ret);
}