#5 Documentation bug (pending method)

closed-fixed
nobody
None
5
2008-03-12
2004-06-15
attb2
No

Hi!

I've spend a lot of time to figure this out, please update pyopenssl
docs.
PyOpenSSL doc says:
"pending() Retrieve the number of bytes that can be safely read
from the SSL buffer."

In SSL docs stay:
"SSL_pending() returns the number of bytes in the SSL buffer
that have been decrypted but not requested by SSL_read(). This
will occur when there is a mismatch between the number of bytes
requested by SSL_read() and the block size used to
encrypt/decrypt the data."

This means pending must call after socket.recv() to see how
many bytes left in SSL buffer. If you call pending before recv, it
returns 0.

Thanks
Attila

Discussion

  • Jp Calderone
    Jp Calderone
    2008-03-07

    Logged In: YES
    user_id=366566
    Originator: NO

    I've applied a patch to the documentation to my fork of pyOpenSSL at http://launchpad.net/pyopenssl which adjusts the wording to try to make this more clear. The changeset is revision 29.

     
  • Jp Calderone
    Jp Calderone
    2008-03-12

    • status: open --> closed-fixed