Hallo,

I discovered an unexpected behavior of ASN1_item_sign_ctx(). This function 
frees the given EVP_MD_CTX, which is not documented
(expect in apps/req.c ...). This behavior induces high risks of double-freeing 
the EVP_MD_CTX or memory leaks (you have to check
the return value of 'X509.*_sign_ctx()' and decide whether to free the 
EVP_MD_CTX or not.)

The attached diff (created for 1.1.0-pre4) changes the behavior of 
ASN1_item_sign_ctx()
into the expected and applies the needed simplifications in apps/req.c.

Kind regards

  Felix Schüller


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4446
Please log in as guest with password guest if prompted

Attachment: openssl-asn1.diff
Description: Binary data

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to