patch attached, as usual.

compare i2d_PVK and do_PVK_body(); the latter will use 'negative' (==>
integer-wrapped) length for the key when an erroneous keylength (< 8) was
passed by the caller. i2d_... catches this failure, do_... doesn't.


Caveat of patch:
- As this adds a PEM_F_... and a PEM_R_... of course mk_Err.pl must be run
to regen the error #define section(s) again, as always after such changes.
- The diff/patch file is from a fully length==size_t-ified OpenSSL CVS HEAD
clone, so you may find that two size_t's in there should be 'unsigned int'
for vanilla OpenSSL. I don't know whether this implicit laziness of the
patch/PR submitter will have a negative resonance 'on the other side of the
fence' - time to find out... ;-))



-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web:    http://www.hobbelt.com/
       http://www.hebbut.net/
mail:   [email protected]
mobile: +31-6-11 120 978
--------------------------------------------------

patch attached, as usual.

compare i2d_PVK and do_PVK_body(); the latter will use 'negative' (==> integer-wrapped) length for the key when an erroneous keylength (< 8) was passed by the caller. i2d_... catches this failure, do_... doesn't.


Caveat of patch:
- As this adds a PEM_F_... and a PEM_R_... of course mk_Err.pl must be run to regen the error #define section(s) again, as always after such changes.
- The diff/patch file is from a fully length==size_t-ified OpenSSL CVS HEAD clone, so you may find that two size_t's in there should be 'unsigned int' for vanilla OpenSSL. I don't know whether this implicit laziness of the patch/PR submitter will have a negative resonance 'on the other side of the fence' - time to find out... ;-))



--
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web:    http://www.hobbelt.com/
       http://www.hebbut.net/
mail:   [email protected]
mobile: +31-6-11 120 978
--------------------------------------------------

Attachment: openssl_crypto_pem_pvkfmt.diff
Description: Binary data

Reply via email to