diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_pmeth.c')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_pmeth.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_pmeth.c b/src/lib/libcrypto/rsa/rsa_pmeth.c index 954190d560..6d38a7c923 100644 --- a/src/lib/libcrypto/rsa/rsa_pmeth.c +++ b/src/lib/libcrypto/rsa/rsa_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_pmeth.c,v 1.14 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_pmeth.c,v 1.15 2015/02/11 03:55:42 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -69,9 +69,6 @@ | |||
| 69 | #include <openssl/rsa.h> | 69 | #include <openssl/rsa.h> |
| 70 | #include <openssl/x509.h> | 70 | #include <openssl/x509.h> |
| 71 | 71 | ||
| 72 | #ifndef OPENSSL_NO_CMS | ||
| 73 | #include <openssl/cms.h> | ||
| 74 | #endif | ||
| 75 | 72 | ||
| 76 | #include "evp_locl.h" | 73 | #include "evp_locl.h" |
| 77 | #include "rsa_locl.h" | 74 | #include "rsa_locl.h" |
| @@ -462,26 +459,6 @@ bad_pad: | |||
| 462 | case EVP_PKEY_CTRL_PKCS7_DECRYPT: | 459 | case EVP_PKEY_CTRL_PKCS7_DECRYPT: |
| 463 | case EVP_PKEY_CTRL_PKCS7_SIGN: | 460 | case EVP_PKEY_CTRL_PKCS7_SIGN: |
| 464 | return 1; | 461 | return 1; |
| 465 | #ifndef OPENSSL_NO_CMS | ||
| 466 | case EVP_PKEY_CTRL_CMS_DECRYPT: | ||
| 467 | { | ||
| 468 | X509_ALGOR *alg = NULL; | ||
| 469 | ASN1_OBJECT *encalg = NULL; | ||
| 470 | |||
| 471 | if (p2) | ||
| 472 | CMS_RecipientInfo_ktri_get0_algs(p2, NULL, | ||
| 473 | NULL, &alg); | ||
| 474 | if (alg) | ||
| 475 | X509_ALGOR_get0(&encalg, NULL, NULL, alg); | ||
| 476 | if (encalg && OBJ_obj2nid(encalg) == NID_rsaesOaep) | ||
| 477 | rctx->pad_mode = RSA_PKCS1_OAEP_PADDING; | ||
| 478 | } | ||
| 479 | /* FALLTHROUGH */ | ||
| 480 | |||
| 481 | case EVP_PKEY_CTRL_CMS_ENCRYPT: | ||
| 482 | case EVP_PKEY_CTRL_CMS_SIGN: | ||
| 483 | return 1; | ||
| 484 | #endif | ||
| 485 | case EVP_PKEY_CTRL_PEER_KEY: | 462 | case EVP_PKEY_CTRL_PEER_KEY: |
| 486 | RSAerr(RSA_F_PKEY_RSA_CTRL, | 463 | RSAerr(RSA_F_PKEY_RSA_CTRL, |
| 487 | RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); | 464 | RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); |
