diff options
Diffstat (limited to 'OpenSSL/crypto/crl.c')
-rw-r--r-- | OpenSSL/crypto/crl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSSL/crypto/crl.c b/OpenSSL/crypto/crl.c index 614a606..543708e 100644 --- a/OpenSSL/crypto/crl.c +++ b/OpenSSL/crypto/crl.c @@ -138,6 +138,16 @@ crypto_CRL_export(crypto_CRLObj *self, PyObject *args, PyObject *keywds) { return NULL; } + /* Some versions of OpenSSL check for this, but more recent versions seem + * not to. + */ + if (!key->pkey->ameth) { + PyErr_SetString( + crypto_Error, "Cannot export with an unitialized key"); + return NULL; + } + + bio = BIO_new(BIO_s_mem()); tmptm = ASN1_TIME_new(); if (!tmptm) { |