Commit d0344d06 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Make S/MIME encrypt work again.

parent d349b2ff
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -256,11 +256,16 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
		if (PKCS7_is_detached(p7))
			bio=BIO_new(BIO_s_null());
		else
			{
			if (PKCS7_type_is_signed(p7))
				{
				ASN1_OCTET_STRING *os;
			os = PKCS7_get_octet_string(p7->d.sign->contents);
				os = PKCS7_get_octet_string(
							p7->d.sign->contents);
				if (os && os->length > 0)
				bio = BIO_new_mem_buf(os->data, os->length);
					bio = BIO_new_mem_buf(os->data,
								os->length);
				}
			if(bio == NULL)
				{
				bio=BIO_new(BIO_s_mem());