fixing SNI_GetFromBuffer return code on success.
This commit is contained in:
parent
4ce2e59adf
commit
3e24a446b9
@ -988,7 +988,7 @@ int TLSX_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz,
|
||||
len16 -= MIN(2 * OPAQUE16_LEN + extLen, len16);
|
||||
}
|
||||
|
||||
return len16 ? BUFFER_ERROR : 0;
|
||||
return len16 ? BUFFER_ERROR : SSL_SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -379,11 +379,11 @@ static void test_CyaSSL_SNI_GetFromBuffer(void)
|
||||
byte result[32] = {0};
|
||||
word32 length = 32;
|
||||
|
||||
AssertIntEQ(0, CyaSSL_SNI_GetFromBuffer(buffer3, sizeof(buffer3), 0,
|
||||
result, &length));
|
||||
AssertIntEQ(SSL_SUCCESS, CyaSSL_SNI_GetFromBuffer(buffer3, sizeof(buffer3),
|
||||
0, result, &length));
|
||||
|
||||
AssertIntEQ(0, CyaSSL_SNI_GetFromBuffer(buffer2, sizeof(buffer2), 1,
|
||||
result, &length));
|
||||
AssertIntEQ(SSL_SUCCESS, CyaSSL_SNI_GetFromBuffer(buffer2, sizeof(buffer2),
|
||||
1, result, &length));
|
||||
|
||||
AssertIntEQ(-228, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0,
|
||||
result, &length));
|
||||
|
Loading…
Reference in New Issue
Block a user