mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-31 13:00:49 +00:00
Implement client support for TLS-PSK
For both OpenSSL and mbedTLS PUBLISHED_FROM=0bfd5f128b4c4c062cb6f0ca0da9b30790aa8bf8
This commit is contained in:
1 parent
d6d956b9d8
commit
d4b23f08b6
3 files changed
+167
-11
No files matched your search
+11
@@ -3127,6 +3127,8 @@ struct mg_ssl_if_conn_params {
|
||||
const char *ca_cert;
|
||||
const char *server_name;
|
||||
const char *cipher_suites;
|
||||
const char *psk_identity;
|
||||
const char *psk_key;
|
||||
};
|
||||
|
||||
enum mg_ssl_if_result mg_ssl_if_conn_init(
|
||||
@@ -3544,6 +3546,15 @@ struct mg_connect_opts {
|
||||
* name verification.
|
||||
*/
|
||||
const char *ssl_server_name;
|
||||
/*
|
||||
* PSK identity and key. Identity is a NUL-terminated string and key is a hex
|
||||
* string. Key must be either 16 or 32 bytes (32 or 64 hex digits) for AES-128
|
||||
* or AES-256 respectively.
|
||||
* Note: Default list of cipher suites does not include PSK suites, if you
|
||||
* want to use PSK you will need to set ssl_cipher_suites as well.
|
||||
*/
|
||||
const char *ssl_psk_identity;
|
||||
const char *ssl_psk_key;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user