Compare commits
4 Commits
4e8d70735d
...
b662a4ec38
Author | SHA1 | Date |
---|---|---|
Fabrice Fontaine | b662a4ec38 | |
Andrey Volk | 5e82e4f305 | |
Andrey Volk | d895fdff60 | |
Fabrice Fontaine | 7033501267 |
|
@ -990,6 +990,8 @@ ESL_DECLARE(esl_status_t) esl_connect_timeout(esl_handle_t *handle, const char *
|
|||
}
|
||||
|
||||
memcpy(&handle->sockaddr, result->ai_addr, result->ai_addrlen);
|
||||
freeaddrinfo(result);
|
||||
|
||||
switch(handle->sockaddr.ss_family) {
|
||||
case AF_INET:
|
||||
sockaddr_in = (struct sockaddr_in*)&(handle->sockaddr);
|
||||
|
@ -1005,7 +1007,6 @@ ESL_DECLARE(esl_status_t) esl_connect_timeout(esl_handle_t *handle, const char *
|
|||
strncpy(handle->err, "Host resolves to unsupported address family", sizeof(handle->err));
|
||||
goto fail;
|
||||
}
|
||||
freeaddrinfo(result);
|
||||
|
||||
handle->sock = socket(handle->sockaddr.ss_family, SOCK_STREAM, IPPROTO_TCP);
|
||||
|
||||
|
|
|
@ -80,7 +80,8 @@ static srtp_err_status_t srtp_hmac_alloc(srtp_auth_t **a,
|
|||
|
||||
/* OpenSSL 1.1.0 made HMAC_CTX an opaque structure, which must be allocated
|
||||
using HMAC_CTX_new. But this function doesn't exist in OpenSSL 1.0.x. */
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
|
||||
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L)
|
||||
{
|
||||
/* allocate memory for auth and HMAC_CTX structures */
|
||||
uint8_t *pointer;
|
||||
|
@ -126,7 +127,8 @@ static srtp_err_status_t srtp_hmac_dealloc(srtp_auth_t *a)
|
|||
|
||||
hmac_ctx = (HMAC_CTX *)a->state;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
|
||||
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L)
|
||||
HMAC_CTX_cleanup(hmac_ctx);
|
||||
|
||||
/* zeroize entire state*/
|
||||
|
|
Loading…
Reference in New Issue