summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/rsa/rsa_ameth.c16
-rw-r--r--src/lib/libcrypto/rsa/rsa_pmeth.c25
2 files changed, 2 insertions, 39 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c
index b66c749293..8faddcee1c 100644
--- a/src/lib/libcrypto/rsa/rsa_ameth.c
+++ b/src/lib/libcrypto/rsa/rsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_ameth.c,v 1.15 2015/12/03 23:03:10 beck Exp $ */ 1/* $OpenBSD: rsa_ameth.c,v 1.16 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 */
@@ -66,9 +66,6 @@
66#include <openssl/rsa.h> 66#include <openssl/rsa.h>
67#include <openssl/x509.h> 67#include <openssl/x509.h>
68 68
69#ifndef OPENSSL_NO_CMS
70#include <openssl/cms.h>
71#endif
72 69
73#include "asn1_locl.h" 70#include "asn1_locl.h"
74 71
@@ -420,17 +417,6 @@ rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
420 if (arg1 == 0) 417 if (arg1 == 0)
421 PKCS7_RECIP_INFO_get0_alg(arg2, &alg); 418 PKCS7_RECIP_INFO_get0_alg(arg2, &alg);
422 break; 419 break;
423#ifndef OPENSSL_NO_CMS
424 case ASN1_PKEY_CTRL_CMS_SIGN:
425 if (arg1 == 0)
426 CMS_SignerInfo_get0_algs(arg2, NULL, NULL, NULL, &alg);
427 break;
428
429 case ASN1_PKEY_CTRL_CMS_ENVELOPE:
430 if (arg1 == 0)
431 CMS_RecipientInfo_ktri_get0_algs(arg2, NULL, NULL, &alg);
432 break;
433#endif
434 420
435 case ASN1_PKEY_CTRL_DEFAULT_MD_NID: 421 case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
436 *(int *)arg2 = NID_sha1; 422 *(int *)arg2 = NID_sha1;
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);