ALPN fixes
This commit is contained in:
parent
6c845ced0e
commit
a0ddb85245
@ -2357,12 +2357,12 @@ static int ServerALPNCallback(SSL *s,
|
||||
unsigned char current_len = *ptr;
|
||||
if(ptr+1+current_len > in+inlen)
|
||||
break;
|
||||
if((current_len == sa_len) && (memcmp(ptr+1,STUN_ALPN,sa_len)==0)) {
|
||||
if((!turn_params.no_stun) && (current_len == sa_len) && (memcmp(ptr+1,STUN_ALPN,sa_len)==0)) {
|
||||
*out = ptr+1;
|
||||
*outlen = sa_len;
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
if((current_len == ta_len) && (memcmp(ptr+1,TURN_ALPN,ta_len)==0)) {
|
||||
if((!turn_params.stun_only) && (current_len == ta_len) && (memcmp(ptr+1,TURN_ALPN,ta_len)==0)) {
|
||||
*out = ptr+1;
|
||||
*outlen = ta_len;
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
|
||||
@ -51,7 +51,7 @@ static int allocate_rtcp = 0;
|
||||
static const int never_allocate_rtcp = 0;
|
||||
|
||||
#if ALPN_SUPPORTED
|
||||
static const unsigned char kALPNProtos[] = "\x09stun.turn\x12stun.nat-discovery";
|
||||
static const unsigned char kALPNProtos[] = "\x08http/1.1\x09stun.turn\x12stun.nat-discovery";
|
||||
static const size_t kALPNProtosLen = sizeof(kALPNProtos) - 1;
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user