File tree
6 files changed
+36
-4
lines changed- libraries/WiFiClientSecure
- src
6 files changed
+36
-4
lines changedLines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
|
Lines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| 46 | + | |
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
| |||
66 | 67 |
| |
67 | 68 |
| |
68 | 69 |
| |
| 70 | + | |
69 | 71 |
| |
70 | 72 |
| |
71 | 73 |
| |
| |||
127 | 129 |
| |
128 | 130 |
| |
129 | 131 |
| |
130 |
| - | |
| 132 | + | |
131 | 133 |
| |
132 | 134 |
| |
133 | 135 |
| |
| |||
147 | 149 |
| |
148 | 150 |
| |
149 | 151 |
| |
150 |
| - | |
| 152 | + | |
151 | 153 |
| |
152 | 154 |
| |
153 | 155 |
| |
| |||
341 | 343 |
| |
342 | 344 |
| |
343 | 345 |
| |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + |
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| 42 | + | |
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
| |||
73 | 74 |
| |
74 | 75 |
| |
75 | 76 |
| |
| 77 | + | |
76 | 78 |
| |
77 | 79 |
| |
78 | 80 |
| |
|
Lines changed: 8 additions & 1 deletion
@@ -51,7 +51,7 @@ void ssl_init(sslclient_context *ssl_client)
51
51
}
52
52
53
53
54
-int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t port, int timeout, const char *rootCABuff, const char *cli_cert, const char *cli_key, const char *pskIdent, const char *psKey, bool insecure)
54
+int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t port, int timeout, const char *rootCABuff, const char *cli_cert, const char *cli_key, const char *pskIdent, const char *psKey, bool insecure, const char **alpn_protos)
55
55
{
56
56
char buf[512];
57
57
int ret, flags;
@@ -156,6 +156,13 @@ int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t p
156
156
return handle_error(ret);
157
157
}
158
158
159
+ if (alpn_protos != NULL) {
160
+ log_v("Setting ALPN protocols");
161
+ if ((ret = mbedtls_ssl_conf_alpn_protocols(&ssl_client->ssl_conf, alpn_protos) ) != 0) {
162
+ return handle_error(ret);
163
+ }
164
+ }
165
+
159
166
// MBEDTLS_SSL_VERIFY_REQUIRED if a CA certificate is defined on Arduino IDE and
160
167
// MBEDTLS_SSL_VERIFY_NONE if not.
161
168
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
| 32 | + | |
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
|
0 commit comments