diff options
author | Ralf S. Engelschall <rse@openssl.org> | 1998-12-22 15:59:57 +0000 |
---|---|---|
committer | Ralf S. Engelschall <rse@openssl.org> | 1998-12-22 15:59:57 +0000 |
commit | 13e91dd365887c7ff26dc3ff18d42266e5393f2d (patch) | |
tree | cec94d3f90051b9b1fff763af1889d5588a5ef67 /crypto/evp | |
parent | 8c6c8d80b757106e0fc6e9a65dcdbdb7e31ad5e7 (diff) | |
download | openssl-13e91dd365887c7ff26dc3ff18d42266e5393f2d.tar.gz |
Incorporation of RSEs assembled patches
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/p_dec.c | 6 | ||||
-rw-r--r-- | crypto/evp/p_enc.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/crypto/evp/p_dec.c b/crypto/evp/p_dec.c index e845ce70c7..fca333d78a 100644 --- a/crypto/evp/p_dec.c +++ b/crypto/evp/p_dec.c @@ -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); } diff --git a/crypto/evp/p_enc.c b/crypto/evp/p_enc.c index a26bfad02a..a902b5ebdf 100644 --- a/crypto/evp/p_enc.c +++ b/crypto/evp/p_enc.c @@ -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,12 +74,16 @@ EVP_PKEY *pubk; { int ret=0; +#ifndef NO_RSA if (pubk->type != EVP_PKEY_RSA) { +#endif EVPerr(EVP_F_EVP_PKEY_ENCRYPT,EVP_R_PUBLIC_KEY_NOT_RSA); +#ifndef NO_RSA goto err; } ret=RSA_public_encrypt(key_len,key,ek,pubk->pkey.rsa,RSA_PKCS1_PADDING); err: +#endif return(ret); } |