Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > M2Crypto.SSL.Checker.NoCertificate Exception

Thread Tools

M2Crypto.SSL.Checker.NoCertificate Exception

Tim H.
Posts: n/a
I have a weird quirk with the M2Crypto module and I hope someone would be able to point me in the right direction. I am working with a colleague to develop an internal tool to check SSL certificates on a list of IPv4 addresses obtained via stdin.

We are using M2Crypto to help with validating the certificates. If we onlyhave it check one IPv4 address, it is able to provide us with the correct certificate and we are able to do our validation checks on the information that the SSL certificate contains.

However, if we try to check multiple IPv4 addresses we receive the "M2Crypto.SSL.Checker.NoCertificate". There are some cases where we should be receiving this. However, regardless of what the second or third IPv4 address is (even if it tested good as the first one), it will fail.

Context creation:

global context

context = M2Crypto.SSL.Context()
if sys.platform.startswith('linux'):
context.load_verify_info(capath="/etc/ssl/certs/") #Linux with real open SSL installed
elif sys.platform.startswith('darwin'):
print "Unknown platform, bail!"

Socket creation:

conn = M2Crypto.SSL.Connection(context)
conn.set_socket_read_timeout(M2Crypto.SSL.timeout( sec=2))
conn.set_socket_write_timeout(M2Crypto.SSL.timeout (sec=2))


The above two portions of code exist in their own functions. The latter block gets called as part of the loop over the array of addresses. The IP ispassed from the caller.

Thank you in advance!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
Throw Exception Vs Throw New Exception Kerri ASP .Net 2 10-27-2003 02:13 PM
Re: bizaar exception that isn't really an exception jeff ASP .Net 3 06-26-2003 01:02 PM
Re: bizaar exception that isn't really an exception jeff ASP .Net 0 06-24-2003 12:46 PM