Import OpenSSL 1.1.0h
This commit is contained in:
@@ -40,6 +40,7 @@ static int pk7_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
|
||||
case ASN1_OP_STREAM_PRE:
|
||||
if (PKCS7_stream(&sarg->boundary, *pp7) <= 0)
|
||||
return 0;
|
||||
/* fall thru */
|
||||
case ASN1_OP_DETACHED_PRE:
|
||||
sarg->ndef_bio = PKCS7_dataInit(*pp7, sarg->out);
|
||||
if (!sarg->ndef_bio)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -316,16 +316,18 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
|
||||
}
|
||||
|
||||
if (bio == NULL) {
|
||||
if (PKCS7_is_detached(p7))
|
||||
if (PKCS7_is_detached(p7)) {
|
||||
bio = BIO_new(BIO_s_null());
|
||||
else if (os && os->length > 0)
|
||||
} else if (os && os->length > 0) {
|
||||
bio = BIO_new_mem_buf(os->data, os->length);
|
||||
if (bio == NULL) {
|
||||
} else {
|
||||
bio = BIO_new(BIO_s_mem());
|
||||
if (bio == NULL)
|
||||
goto err;
|
||||
BIO_set_mem_eof_return(bio, 0);
|
||||
}
|
||||
if (bio == NULL)
|
||||
goto err;
|
||||
}
|
||||
if (out)
|
||||
BIO_push(out, bio);
|
||||
|
||||
Reference in New Issue
Block a user