summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/crypto/pkcs7/pk7_doit.c')
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pk7_doit.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c
index d69aff8f41..252fab04d7 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pk7_doit.c,v 1.30 2014/10/22 13:02:04 jsing Exp $ */ 1/* $OpenBSD: pk7_doit.c,v 1.31 2015/02/07 13:19:15 doug Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -482,15 +482,6 @@ PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
482 } 482 }
483 483
484 if (evp_cipher != NULL) { 484 if (evp_cipher != NULL) {
485#if 0
486 unsigned char key[EVP_MAX_KEY_LENGTH];
487 unsigned char iv[EVP_MAX_IV_LENGTH];
488 unsigned char *p;
489 int keylen, ivlen;
490 int max;
491 X509_OBJECT ret;
492#endif
493
494 if ((etmp = BIO_new(BIO_f_cipher())) == NULL) { 485 if ((etmp = BIO_new(BIO_f_cipher())) == NULL) {
495 PKCS7err(PKCS7_F_PKCS7_DATADECODE, ERR_R_BIO_LIB); 486 PKCS7err(PKCS7_F_PKCS7_DATADECODE, ERR_R_BIO_LIB);
496 goto err; 487 goto err;
@@ -594,20 +585,9 @@ PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
594 etmp = NULL; 585 etmp = NULL;
595 } 586 }
596 587
597#if 1
598 if (PKCS7_is_detached(p7) || (in_bio != NULL)) { 588 if (PKCS7_is_detached(p7) || (in_bio != NULL)) {
599 bio = in_bio; 589 bio = in_bio;
600 } else { 590 } else {
601#if 0
602 bio = BIO_new(BIO_s_mem());
603 /* We need to set this so that when we have read all
604 * the data, the encrypt BIO, if present, will read
605 * EOF and encode the last few bytes */
606 BIO_set_mem_eof_return(bio, 0);
607
608 if (data_body != NULL && data_body->length > 0)
609 BIO_write(bio, (char *)data_body->data, data_body->length);
610#else
611 if (data_body != NULL && data_body->length > 0) 591 if (data_body != NULL && data_body->length > 0)
612 bio = BIO_new_mem_buf(data_body->data, data_body->length); 592 bio = BIO_new_mem_buf(data_body->data, data_body->length);
613 else { 593 else {
@@ -616,11 +596,10 @@ PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
616 } 596 }
617 if (bio == NULL) 597 if (bio == NULL)
618 goto err; 598 goto err;
619#endif
620 } 599 }
621 BIO_push(out, bio); 600 BIO_push(out, bio);
622 bio = NULL; 601 bio = NULL;
623#endif 602
624 if (0) { 603 if (0) {
625err: 604err:
626 if (ek) { 605 if (ek) {