473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

SSL follow up

Hi Paul and John,
Thanks for the SSL follow up messages.

I have 2 questions. 1) How do we get the Server cert
in python. John wrote: "Nor does there seem to be a
way to get at the certificate itself from within
Python." Perhaps pycurl will allow us to do this. Is
there another method to get the server cert?

2) I like the idea of calling openssl in a subprocess.
Do you have any of those openssl commands handy? If
not, I can look through the documentation tommorrow.

Thanks!

Yogesh
Oct 24 '06 #1
3 1034
Yogesh Chawla - PD <pr***************@yahoo.comwrites:
2) I like the idea of calling openssl in a subprocess.
Do you have any of those openssl commands handy? If
not, I can look through the documentation tommorrow.
To dump out the certificate? Try:

openssl x509 -text -in filename.crt

if the cert is in a file. Omit that -in parameter if you want openssl
to read from stdin. Of course now you get this other text format
thing to parse, but it's not so bad.
Oct 24 '06 #2
Yogesh Chawla - PD wrote:
I have 2 questions. 1) How do we get the Server cert
in python. John wrote: "Nor does there seem to be a
way to get at the certificate itself from within
Python." Perhaps pycurl will allow us to do this. Is
there another method to get the server cert?
Here's an example with M2Crypto:

from M2Crypto import SSL

ctx = SSL.Context()
conn = SSL.Connection(ctx)
conn.connect(('www.verisign.com', 443))
cert = conn.get_peer_cert()
2) I like the idea of calling openssl in a subprocess.
Do you have any of those openssl commands handy? If
not, I can look through the documentation tommorrow.
I would be surprised if M2Crypto did not provide what you want. If it
doesn't, I'd be happy to add the functionality.

--
Heikki Toivonen
Oct 25 '06 #3
Paul Rubin wrote:
>
To dump out the certificate? Try:

openssl x509 -text -in filename.crt

if the cert is in a file. Omit that -in parameter if you want openssl
to read from stdin. Of course now you get this other text format
thing to parse, but it's not so bad.
I wouldn't recommend that. Actually I tried one time. Use a decent
module instead which parses certs for you. I wrote one myself for web2ldap.

Ciao, Michael.
Oct 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joris Gillis | last post by:
Hi everyone, I have this nasty little problem to which I can't find a solution: Consider an anchor <a name="Top" id="Top">Top</a> How can I follow/execute this link from within javascript?...
1
by: oketz1 | last post by:
Hi I am writing an application very similar to notepad and I have to implement the status bar feature, which mean that I have to follow after the cursor is there any event that raised when...
3
by: MPR | last post by:
Hi guys; I'm using an AxSHDocVw.AxWebBrowser control to show a web page. I need to know if i can ( and how? ) i do the following things: 1 - I need to follow 1 link in the webpage diplayed...
0
by: Mikey | last post by:
This sample code demonstrates how to send an email message using CDO and have it set the Outlook Importance property and the Outlook Follow Up reminder attributes in the recipient's InBox. The...
0
by: Stephen Hynds | last post by:
Hi, I'm writing a VB app that sends mail to a number of users when an important deadline is approaching. I can get the mail to show up as high priority and I can even get it to have a follow up...
0
by: woodglass | last post by:
I want to use object.hyperlink.Follow to follow a hyperlink to a web page. The web page requests a username & password. Can I programmatically supply both instead of having to type them in ?....
1
by: noks | last post by:
Hi guys. i want a flag 2 go off within 5 days of doin a certain task (ie accepind a new clients' details & send some1 a mail aftawards, make an order via mail) Reason bein i wanna do a follow up...
3
by: Rizvi | last post by:
The Grammer is given: S ---> id=E; E ---> E+T | E-T | T T ---> T*F | T/F | F F ---> P^F | P P ---> -P | L L ---> (E) | id | num -------------------------------- I've fond the following...
0
by: 008worker | last post by:
Do you want the science article you may follow the following the link. Do you want something about science?if yes you may follow the following link.it is really intresting and useful. ...
93
by: lorlarz | last post by:
Here, let's see what you JavaScript programmers have got Here is a place to share your large or larger full-blown JavaScript applications: real.comp.lang.js.apps (a new google group) Here is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.