Better error handling.
FossilOrigin-Name: 292995e8721f99b1623452bf3708fab623ed40b7a6265dcf6e09841e5a15ac22
This commit is contained in:
parent
2dd8d4b19c
commit
64ae384018
@ -17,6 +17,9 @@ int dtls_gnutls_connect(struct conn *conn)
|
|||||||
d = dtls_gnutls_data_create(conn,
|
d = dtls_gnutls_data_create(conn,
|
||||||
GNUTLS_CLIENT | GNUTLS_DATAGRAM | GNUTLS_NONBLOCK);
|
GNUTLS_CLIENT | GNUTLS_DATAGRAM | GNUTLS_NONBLOCK);
|
||||||
|
|
||||||
|
if (!d)
|
||||||
|
return 0;
|
||||||
|
|
||||||
// gnutls_dh_set_prime_bits(d->session, 512);
|
// gnutls_dh_set_prime_bits(d->session, 512);
|
||||||
#if GNUTLS_VERSION_NUMBER >= 0x030100
|
#if GNUTLS_VERSION_NUMBER >= 0x030100
|
||||||
gnutls_handshake_set_timeout(d->session, GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT);
|
gnutls_handshake_set_timeout(d->session, GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT);
|
||||||
|
Loading…
Reference in New Issue
Block a user