[PYTHON-CRYPTO] FW: Removing M2Crypto debug data in production code

Ng Pheng Siong ngps at NETMEMETIC.COM
Thu Jan 13 02:22:51 CET 2005


On Wed, Jan 12, 2005 at 05:43:24PM +0100, Ola Natvig wrote:
> I'm writing a SSL server and we are using M2Crypto as our SSL engine.
> What bothers me is that on every accept it prints a lot of 'junk-data'
> to my stdout. It would be nice if someone knew a way to get M2Crypto out
> of debug mode and into a more silent mode.

Coincidentally, I just answered this in private mail from another person.
;-)

My answer cut-n-pasted:

  Suppose ctx is an SSL.Context instance. Then this statement
  "ctx.set_info_callback()" turns on what you call verbose mode. Leave that
  statement out and you won't see all that output.

This is also not thread-safe in recent Pythons. Unless I'm imagining
things, it used to be in early Python 2.x.

HTH. Cheers.

--
Ng Pheng Siong <ngps at netmemetic.com>

http://sandbox.rulemaker.net/ngps -+- M2Crypto, ZServerSSL for Zope, Blog
http://www.sqlcrypt.com -+- Database Engine with Transparent AES Encryption





More information about the python-crypto mailing list