From: Joe O. <jo...@re...> - 2012-08-09 09:30:59
|
Hi, this is patch against the "trusted" branch: dump_certificate() only works with trusted certs in PEM mode; so throw an exception if an unsupported argument combination is used. Regards, Joe === modified file 'src/crypto/crypto.c' --- src/crypto/crypto.c 2010-07-16 15:00:32 +0000 +++ src/crypto/crypto.c 2012-08-09 09:28:28 +0000 @@ -297,6 +297,11 @@ return NULL; } + if (trust && type != X509_FILETYPE_PEM) { + PyErr_SetString(PyExc_ValueError, "can only write trusted certs with FILETYPE_PEM"); + return NULL; + } + bio = BIO_new(BIO_s_mem()); switch (type) { |