mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
fixing SNI_GetFromBuffer return code on success.
This commit is contained in:
@@ -988,7 +988,7 @@ int TLSX_SNI_GetFromBuffer(const byte* clientHello, word32 helloSz,
|
|||||||
len16 -= MIN(2 * OPAQUE16_LEN + extLen, len16);
|
len16 -= MIN(2 * OPAQUE16_LEN + extLen, len16);
|
||||||
}
|
}
|
||||||
|
|
||||||
return len16 ? BUFFER_ERROR : 0;
|
return len16 ? BUFFER_ERROR : SSL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -379,11 +379,11 @@ static void test_CyaSSL_SNI_GetFromBuffer(void)
|
|||||||
byte result[32] = {0};
|
byte result[32] = {0};
|
||||||
word32 length = 32;
|
word32 length = 32;
|
||||||
|
|
||||||
AssertIntEQ(0, CyaSSL_SNI_GetFromBuffer(buffer3, sizeof(buffer3), 0,
|
AssertIntEQ(SSL_SUCCESS, CyaSSL_SNI_GetFromBuffer(buffer3, sizeof(buffer3),
|
||||||
result, &length));
|
0, result, &length));
|
||||||
|
|
||||||
AssertIntEQ(0, CyaSSL_SNI_GetFromBuffer(buffer2, sizeof(buffer2), 1,
|
AssertIntEQ(SSL_SUCCESS, CyaSSL_SNI_GetFromBuffer(buffer2, sizeof(buffer2),
|
||||||
result, &length));
|
1, result, &length));
|
||||||
|
|
||||||
AssertIntEQ(-228, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0,
|
AssertIntEQ(-228, CyaSSL_SNI_GetFromBuffer(buffer, sizeof(buffer), 0,
|
||||||
result, &length));
|
result, &length));
|
||||||
|
Reference in New Issue
Block a user