Code review comment for lp://staging/~zseil/pyopenssl/privatekey-callback-fixes

Revision history for this message
Ziga Seilnacht (zseil) wrote :

This branch fixes the bugs mentioned in Bug #499628 and contains the tests for the parts that can be tested without introducing some kind of C level fault injector.

The branch contains two backwards incompatible changes:
 - {load, dump}_privatekey now raise an error when called with a passphrase and FILETYPE_ASN1
 - they raise an error when the passphrase callback returns a passphrase longer than 1024 bytes.

I can change load_privatekey to only issue a warning in these conditions, but I think that the current behaviour is too dangerous for dump_privatekey and should be changed to raise an error immediately.

« Back to merge proposal