Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19436

Re: Determining version of OpenSSL linked against python?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin3!goblin.stu.neva.ru!newsfeed3.funet.fi!newsfeeds.funet.fi!news.utu.fi!news.cc.tut.fi!not-for-mail
From Anssi Saari <as@sci.fi>
Newsgroups comp.lang.python
Subject Re: Determining version of OpenSSL linked against python?
Date Wed, 25 Jan 2012 23:21:36 +0200
Lines 19
Message-ID <vg3liovh40v.fsf@sci.fi> (permalink)
References <mailman.4974.1327348932.27778.python-list@python.org>
NNTP-Posting-Host 2001:708:310:3430:216:35ff:fe3e:dee7
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace news.cc.tut.fi 1327526497 18480 2001:708:310:3430:216:35ff:fe3e:dee7 (25 Jan 2012 21:21:37 GMT)
X-Complaints-To abuse@tut.fi
NNTP-Posting-Date Wed, 25 Jan 2012 21:21:37 +0000 (UTC)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Cancel-Lock sha1:srnrqPTCIO0YMUlbp70ABE0FEUI=
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19436

Show key headers only | View raw


Adam Mercer <ramercer@gmail.com> writes:

> Can anyone offer any suggestions as to what is going wrong with the
> above code or offer an alternative way of determining the OpenSSl
> version using python-2.6?

I suppose you could use ctypes to load the library and call SSLeay()
which returns the OpenSSL version number as a C long.

Like this:

from ctypes import *
libssl = cdll.LoadLibrary("libssl.so")
openssl_version = libssl.SSLeay()
print "%.9X" % openssl_version

This gives me 0009080FF which corresponds to 0.9.8o release which is
what I have installed in Debian Squeeze.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Determining version of OpenSSL linked against python? Adam Mercer <ramercer@gmail.com> - 2012-01-23 14:01 -0600
  Re: Determining version of OpenSSL linked against python? Anssi Saari <as@sci.fi> - 2012-01-25 23:21 +0200
    Re: Determining version of OpenSSL linked against python? Adam Mercer <ramercer@gmail.com> - 2012-01-25 15:40 -0600

csiph-web