diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2009-05-13 14:20:00 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2009-05-13 14:20:00 -0400 |
commit | 49f93ab110d88df63b52f98f682150683dd21015 (patch) | |
tree | 9a555ab3c89064989bc9be5501872791acc6cdb5 | |
parent | de207e77797b77c4703d5c9dd886a76b1964bde8 (diff) | |
download | pyopenssl-49f93ab110d88df63b52f98f682150683dd21015.tar.gz |
Remove now unused local; use bools for return value
-rw-r--r-- | OpenSSL/crypto/pkey.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/OpenSSL/crypto/pkey.c b/OpenSSL/crypto/pkey.c index e229757..7d5c6a8 100644 --- a/OpenSSL/crypto/pkey.c +++ b/OpenSSL/crypto/pkey.c @@ -119,7 +119,6 @@ static PyObject * crypto_PKey_check(crypto_PKeyObj *self, PyObject *args) { int r; - EVP_PKEY *pkey; if (!PyArg_ParseTuple(args, ":check")) return NULL; @@ -129,9 +128,9 @@ crypto_PKey_check(crypto_PKeyObj *self, PyObject *args) rsa = EVP_PKEY_get1_RSA(self->pkey); r = RSA_check_key(rsa); if (r == 1) - return PyInt_FromLong(1L); + return PyBool_FromLong(1L); else - return PyInt_FromLong(0L); + return PyBool_FromLong(0L); } else { PyErr_SetString( PyExc_TypeError, "key type unsupported"); return NULL; |