diff --git a/wrapper/python/wolfssl/.gitignore b/wrapper/python/wolfssl/.gitignore index 421703396..5e6f6f9bd 100644 --- a/wrapper/python/wolfssl/.gitignore +++ b/wrapper/python/wolfssl/.gitignore @@ -13,3 +13,6 @@ dist/ .tox/ # Sphinx documentation docs/_build/ + +# Virtual env +.env diff --git a/wrapper/python/wolfssl/wolfssl/_methods.py b/wrapper/python/wolfssl/wolfssl/_methods.py index c5d7901e6..ae0a03d9f 100644 --- a/wrapper/python/wolfssl/wolfssl/_methods.py +++ b/wrapper/python/wolfssl/wolfssl/_methods.py @@ -45,16 +45,16 @@ class WolfSSLMethod: if protocol not in _PROTOCOL_LIST: raise ValueError("this protocol is not supported") - elif protocol is PROTOCOL_SSLv3: + elif protocol == PROTOCOL_SSLv3: raise ValueError("this protocol is not supported") - elif protocol is PROTOCOL_TLSv1: + elif protocol == PROTOCOL_TLSv1: raise ValueError("this protocol is not supported") - elif protocol is PROTOCOL_TLSv1_1: + elif protocol == PROTOCOL_TLSv1_1: raise ValueError("this protocol is not supported") - elif protocol is PROTOCOL_TLSv1_2: + elif protocol == PROTOCOL_TLSv1_2: self.native_object = \ _lib.wolfTLSv1_2_server_method() if server_side else \ _lib.wolfTLSv1_2_client_method()