Determining version of OpenSSL linked against python?

Adam Mercer ramercer at gmail.com
Wed Jan 25 16:06:39 EST 2012


On Wed, Jan 25, 2012 at 14:56, Nick Dokos <nicholas.dokos at hp.com> wrote:

> One other possibility is to parse the output of ssh -V:
>
> ,----
> | $ ssh -V
> | OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
> | $ python
> | Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
> | [GCC 4.5.2] on linux2
> | Type "help", "copyright", "credits" or "license" for more information.
> | >>> import ssl
> | >>> ssl.OPENSSL_VERSION
> | 'OpenSSL 0.9.8o 01 Jun 2010'
> | >>>
> `----
>
> This assumes that ssh and python would use the same version of openssl:
> not guaranteed, but seems like a "reasonable" assumption to me.

Hmm, I like that idea. Thanks for the suggestion.

Cheers

Adam



More information about the Python-list mailing list