summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs7
diff options
context:
space:
mode:
authordoug <>2015-02-07 13:19:15 +0000
committerdoug <>2015-02-07 13:19:15 +0000
commitbd790e322a40e6362231f517d5795d4079eeb2a2 (patch)
tree1f11c8eab9ee5f3f265f1010c299c7fd574d9cdf /src/lib/libcrypto/pkcs7
parentff826d3cb94a579275eb6e97b3cf80ca69016d4b (diff)
downloadopenbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.tar.gz
openbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.tar.bz2
openbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.zip
Delete a lot of #if 0 code in libressl.
There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@
Diffstat (limited to 'src/lib/libcrypto/pkcs7')
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_doit.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/lib/libcrypto/pkcs7/pk7_doit.c b/src/lib/libcrypto/pkcs7/pk7_doit.c
index d69aff8f41..252fab04d7 100644
--- a/src/lib/libcrypto/pkcs7/pk7_doit.c
+++ b/src/lib/libcrypto/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) {