mirror of
https://github.com/espressif/mbedtls.git
synced 2026-10-02 07:07:22 +00:00
Fix bug in ALPN loading from serialized session
Signed-off-by: Waleed Elmelegy <[email protected]>
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
Bugfix
|
||||||
|
* Fix the restoration of the ALPN when loading serialized connection with
|
||||||
|
* the mbedtls_ssl_context_load() API.
|
||||||
+1
-1
@@ -6680,7 +6680,7 @@ static int ssl_context_load(mbedtls_ssl_context *ssl,
|
|||||||
/* alpn_chosen should point to an item in the configured list */
|
/* alpn_chosen should point to an item in the configured list */
|
||||||
for (cur = ssl->conf->alpn_list; *cur != NULL; cur++) {
|
for (cur = ssl->conf->alpn_list; *cur != NULL; cur++) {
|
||||||
if (strlen(*cur) == alpn_len &&
|
if (strlen(*cur) == alpn_len &&
|
||||||
memcmp(p, cur, alpn_len) == 0) {
|
memcmp(p, *cur, alpn_len) == 0) {
|
||||||
ssl->alpn_chosen = *cur;
|
ssl->alpn_chosen = *cur;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user