From: CarSun C <car...@ya...> - 2011-10-28 05:41:18
|
I'm so sorry, you're absolutely right. 0.12 is built-in into my current environment, which I wasn't aware of until recently. You're correct about 0.13 too. Should have caught that, and should have searched the Bug history more carefully. Anyhow, really appreciate your quick response. Thanks. -C ________________________________ From: "ex...@tw..." <ex...@tw...> To: "pyo...@li..." <pyo...@li...> Sent: Thursday, October 27, 2011 8:26 PM Subject: Re: [pyOpenSSL] hit an error while passing python string with embedded NUL byte(s) to OpenSSL.crypto.sign method On 27 Oct, 11:07 pm, car...@ya... wrote: > With pyOpenSSL 0.13, passing a python string with embedded NUL byte(s) to crypto.sign method will generate an error saying "must be string without null bytes, not str". > > Initially I thought the API is meant to support C-string (NUL- terminated) only, though it isn't explicitly mentioned in the documentation, above error seems to say so. However, looking into the crypto_sign function (within "crypto.c"), that doesn't seem to be the case, as the format string being used (enclosed below) put a "#" right after BYTESTRING_FMT... > > "O!" BYTESTRING_FMT "#s:sign" > > > Unsurprisingly, once I modify the format string to "O!s#s:sign", signing a python string with embedded NUL byte(s) works perfectly fine. > > Am I over looking something? or is this a bug? This sounds like a bug that was fixed in 0.13: https://bugs.launchpad.net/pyopenssl/+bug/653830 Can you double check that you observed the problem with that version and not an earlier version? BYTESTRING_FMT is defined as "s" on Python 2.x, so your change shouldn't have made any difference. If you were using an older version of pyOpenSSL before, though, and then switched to a custom build based on 0.13, that would explain why it started working (it would have worked without the edit, too). If this isn't the case, a minimal reproducing example would be nice, perhaps attached to a new bug report in Launchpad. Thanks, Jean-Paul ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ pyopenssl-list mailing list pyo...@li... https://lists.sourceforge.net/lists/listinfo/pyopenssl-list |