diff options
Diffstat (limited to '')
-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 0b648138ee..4b7fc09514 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.17 2015/06/20 01:07:25 doug Exp $ */ | 1 | /* $OpenBSD: rsa_pmeth.c,v 1.18 2016/10/19 16:49:11 jsing 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" |
@@ -451,26 +448,6 @@ bad_pad: | |||
451 | case EVP_PKEY_CTRL_PKCS7_DECRYPT: | 448 | case EVP_PKEY_CTRL_PKCS7_DECRYPT: |
452 | case EVP_PKEY_CTRL_PKCS7_SIGN: | 449 | case EVP_PKEY_CTRL_PKCS7_SIGN: |
453 | return 1; | 450 | return 1; |
454 | #ifndef OPENSSL_NO_CMS | ||
455 | case EVP_PKEY_CTRL_CMS_DECRYPT: | ||
456 | { | ||
457 | X509_ALGOR *alg = NULL; | ||
458 | ASN1_OBJECT *encalg = NULL; | ||
459 | |||
460 | if (p2) | ||
461 | CMS_RecipientInfo_ktri_get0_algs(p2, NULL, | ||
462 | NULL, &alg); | ||
463 | if (alg) | ||
464 | X509_ALGOR_get0(&encalg, NULL, NULL, alg); | ||
465 | if (encalg && OBJ_obj2nid(encalg) == NID_rsaesOaep) | ||
466 | rctx->pad_mode = RSA_PKCS1_OAEP_PADDING; | ||
467 | } | ||
468 | /* FALLTHROUGH */ | ||
469 | |||
470 | case EVP_PKEY_CTRL_CMS_ENCRYPT: | ||
471 | case EVP_PKEY_CTRL_CMS_SIGN: | ||
472 | return 1; | ||
473 | #endif | ||
474 | case EVP_PKEY_CTRL_PEER_KEY: | 451 | case EVP_PKEY_CTRL_PEER_KEY: |
475 | RSAerr(RSA_F_PKEY_RSA_CTRL, | 452 | RSAerr(RSA_F_PKEY_RSA_CTRL, |
476 | RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); | 453 | RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); |