Author: Maciej Fijalkowski <fij...@gmail.com> Branch: Changeset: r54133:5bfd8e84f0f2 Date: 2012-04-02 07:50 +0200 http://bitbucket.org/pypy/pypy/changeset/5bfd8e84f0f2/
Log: fix for issue #1104, allow null bytes in certs diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py --- a/pypy/module/_ssl/interp_ssl.py +++ b/pypy/module/_ssl/interp_ssl.py @@ -432,7 +432,8 @@ raise _ssl_seterror(self.space, self, length) try: # this is actually an immutable bytes sequence - return self.space.wrap(rffi.charp2str(buf_ptr[0])) + return self.space.wrap(rffi.charpsize2str(buf_ptr[0], + length)) finally: libssl_OPENSSL_free(buf_ptr[0]) else: _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit