Added `CERT_OPTIONAL` and changed `CERT_REQUIRED` to require peer certificate

pull/61/head
Matan Radomski 2025-12-14 15:44:52 +02:00
parent 71742e399a
commit d063ddb805
1 changed files with 4 additions and 2 deletions

View File

@ -56,9 +56,11 @@ from wolfssl._methods import ( # noqa: F401
)
CERT_NONE = 0
CERT_REQUIRED = 1
CERT_OPTIONAL = 1
_CERT_VERIFY_FAIL_IF_NO_PEER_CERT = 2
CERT_REQUIRED = CERT_OPTIONAL | _CERT_VERIFY_FAIL_IF_NO_PEER_CERT
_VERIFY_MODE_LIST = [CERT_NONE, CERT_REQUIRED]
_VERIFY_MODE_LIST = [CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED]
_SSL_SUCCESS = 1
_SSL_FILETYPE_PEM = 1