summaryrefslogtreecommitdiff
path: root/OpenSSL
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@divmod.com>2009-05-13 14:19:05 -0400
committerJean-Paul Calderone <exarkun@divmod.com>2009-05-13 14:19:05 -0400
commitde207e77797b77c4703d5c9dd886a76b1964bde8 (patch)
treeb70e8be2cef79fae5a28011a7cdb009dc01a7664 /OpenSSL
parent55ec1714c9e17f865d21416bca7522e44c16cd26 (diff)
downloadpyopenssl-de207e77797b77c4703d5c9dd886a76b1964bde8.tar.gz
self->pkey is always something
Diffstat (limited to 'OpenSSL')
-rw-r--r--OpenSSL/crypto/pkey.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/OpenSSL/crypto/pkey.c b/OpenSSL/crypto/pkey.c
index cfedfda..e229757 100644
--- a/OpenSSL/crypto/pkey.c
+++ b/OpenSSL/crypto/pkey.c
@@ -123,13 +123,10 @@ crypto_PKey_check(crypto_PKeyObj *self, PyObject *args)
if (!PyArg_ParseTuple(args, ":check"))
return NULL;
- pkey = self->pkey;
- if(pkey == NULL)
- return NULL;
- if(pkey->type == EVP_PKEY_RSA) {
+ if(self->pkey->type == EVP_PKEY_RSA) {
RSA *rsa;
- rsa = EVP_PKEY_get1_RSA(pkey);
+ rsa = EVP_PKEY_get1_RSA(self->pkey);
r = RSA_check_key(rsa);
if (r == 1)
return PyInt_FromLong(1L);