Fix wolfSSL_Init return type and check
parent
c81c839a24
commit
e1ede238e4
|
|
@ -152,7 +152,9 @@ class SSLContext(object):
|
|||
"""
|
||||
|
||||
def __init__(self, protocol, server_side=None):
|
||||
_lib.wolfSSL_Init()
|
||||
if _lib.wolfSSL_Init() != _SSL_SUCCESS:
|
||||
raise RuntimeError(
|
||||
"wolfSSL library initialization failed")
|
||||
method = _WolfSSLMethod(protocol, server_side)
|
||||
|
||||
self.protocol = protocol
|
||||
|
|
|
|||
|
|
@ -474,7 +474,7 @@ cdef += """
|
|||
/*
|
||||
* SSL/TLS Session functions
|
||||
*/
|
||||
void wolfSSL_Init();
|
||||
int wolfSSL_Init(void);
|
||||
WOLFSSL* wolfSSL_new(WOLFSSL_CTX*);
|
||||
void wolfSSL_free(WOLFSSL*);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue