I found a bug in my patch and tried to fix the bug, but i can't.
Anyone can help me?
The bug is in get_peer_cert_chain.
This method returns the tuple which the connected server showed us.
In test/test_ssl.py we checked the contents of tuple and it pass.
But the next script exit with SEGMENTATION FAULT.
----------------------------------------------------------------------
from OpenSSL.SSL import SSLv23_METHOD, Context, Connection
from socket import socket
I found a bug in my patch and tried to fix the bug, but i can't.
Anyone can help me?
The bug is in get_peer_ cert_chain.
This method returns the tuple which the connected server showed us.
In test/test_ssl.py we checked the contents of tuple and it pass.
But the next script exit with SEGMENTATION FAULT.
------- ------- ------- ------- ------- ------- ------- ------- ------- -------
from OpenSSL.SSL import SSLv23_METHOD, Context, Connection
from socket import socket
def get_cert_ chain(address, port=443): SSLv23_ METHOD) connect( (address, port)) set_connect_ state() do_handshake( )
context = Context(
client = socket()
client.
clientSSL = Connection(context, client)
clientSSL.
clientSSL.
return clientSSL. get_peer_ cert_chain( )
def main(): chain(' www.google. com') .get_subject( )
chain = get_cert_
print chain
print chain[0]
if __name__ == '__main__': ------- ------- ------- ------- ------- ------- ------- ------- -------
main()
-------
Where are wrong things in my patch?
Regards.