summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-07-31 11:31:59 -0400
committerHynek Schlawack <hs@ox.cx>2016-07-31 17:31:59 +0200
commit3aeead90defbd1d4c533b51f4d9400beca3cc472 (patch)
tree903b8e9023520f27e7e286c9cd4c5c1cf20b93ea /src
parentd3b5d9b05c07b322c174270dcda4650659890a85 (diff)
downloadpyopenssl-git-3aeead90defbd1d4c533b51f4d9400beca3cc472.tar.gz
Simplify conditions and delete an unused function (#512)
Diffstat (limited to 'src')
-rw-r--r--src/OpenSSL/crypto.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py
index c31a9d2..116cc51 100644
--- a/src/OpenSSL/crypto.py
+++ b/src/OpenSSL/crypto.py
@@ -2130,9 +2130,7 @@ class PKCS7(object):
:return: True if the PKCS7 is of type signed
"""
- if _lib.PKCS7_type_is_signed(self._pkcs7):
- return True
- return False
+ return bool(_lib.PKCS7_type_is_signed(self._pkcs7))
def type_is_enveloped(self):
"""
@@ -2140,9 +2138,7 @@ class PKCS7(object):
:returns: True if the PKCS7 is of type enveloped
"""
- if _lib.PKCS7_type_is_enveloped(self._pkcs7):
- return True
- return False
+ return bool(_lib.PKCS7_type_is_enveloped(self._pkcs7))
def type_is_signedAndEnveloped(self):
"""
@@ -2150,9 +2146,7 @@ class PKCS7(object):
:returns: True if the PKCS7 is of type signedAndEnveloped
"""
- if _lib.PKCS7_type_is_signedAndEnveloped(self._pkcs7):
- return True
- return False
+ return bool(_lib.PKCS7_type_is_signedAndEnveloped(self._pkcs7))
def type_is_data(self):
"""
@@ -2160,9 +2154,7 @@ class PKCS7(object):
:return: True if the PKCS7 is of type data
"""
- if _lib.PKCS7_type_is_data(self._pkcs7):
- return True
- return False
+ return bool(_lib.PKCS7_type_is_data(self._pkcs7))
def get_type_name(self):
"""