rsaenh(0/5): Correct exporting RSA public and private keys

Juan Lang juan.lang at gmail.com
Thu Nov 5 12:10:49 CST 2009


This patch series corrects some issues exporting RSA public and private keys.

Some were issues pointed out by valgrind:  unused bytes in a source
key were left uninitialized in the exported key, resulting in
potentially invalid keys.  Most uses of rsaenh were to verify existing
signatures, which only requires importing existing keys, so this
problem didn't manifest itself before.

The tests didn't cover the round trip of exporting a key, importing
it, and using it again, so the third patch adds such a test.  It
doesn't succeed or fail consistently on Wine without the fixes, which
is why I didn't submit it with todo_wine first.

Finally, the exported key format expects leading 0 bytes to be
omitted, as shown by bug 20358, and the test I added that demonstrates
the same problem.  The last patches correct the issue.
--Juan



More information about the wine-patches mailing list