1
0
mirror of https://github.com/coturn/coturn.git synced 2025-11-01 15:31:00 +01:00

compilation fixed for old openssls

This commit is contained in:
mom040267 2014-09-20 16:16:07 +00:00
parent 952c89006f
commit 32b1b98e1a
2 changed files with 12 additions and 2 deletions

View File

@ -41,13 +41,21 @@
//////////// OAUTH //////////////////
static const char* shas[]={"SHA1","SHA256",NULL};
static const char* shas[]={"SHA1",
#if !defined(OPENSSL_NO_SHA256) && defined(SSL_TXT_SHA256)
"SHA256",
#endif
NULL};
static const char* encs[]={"AES-256-CBC","AES-128-CBC",
#if !defined(TURN_NO_GCM)
"AEAD_AES_128_GCM", "AEAD_AES_256_GCM",
#endif
NULL};
static const char* hmacs[]={"HMAC-SHA-1","HMAC-SHA-256","HMAC-SHA-256-128",NULL};
static const char* hmacs[]={"HMAC-SHA-1",
#if !defined(OPENSSL_NO_SHA256) && defined(SSL_TXT_SHA256)
"HMAC-SHA-256","HMAC-SHA-256-128",
#endif
NULL};
static int print_extra = 0;

View File

@ -1912,9 +1912,11 @@ static const EVP_MD *get_auth_type(AUTH_ALG aa)
switch(aa) {
case AUTH_ALG_HMAC_SHA_1:
return EVP_sha1();
#if !defined(OPENSSL_NO_SHA256) && defined(SSL_TXT_SHA256)
case AUTH_ALG_HMAC_SHA_256_128:
case AUTH_ALG_HMAC_SHA_256:
return EVP_sha256();
#endif
default:
break;
};