Skip to content

Commit c5ed261

Browse files
committed
Return None from get_peer_x509
1 parent ad2f7c6 commit c5ed261

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wolfssl/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ def get_peer_x509(self):
850850
after making a successful SSL/TLS connection.
851851
"""
852852
if self.native_object == _ffi.NULL:
853-
return _ffi.NULL
853+
return None
854854

855855
return WolfSSLX509(self.native_object)
856856

@@ -863,7 +863,7 @@ def getpeercert(self, binary_form=False):
863863
x509 = self.get_peer_x509()
864864

865865
if not x509:
866-
return x509
866+
return None
867867

868868
if binary_form:
869869
return x509.get_der()

0 commit comments

Comments
 (0)