Commit d4b23f08 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Implement client support for TLS-PSK

For both OpenSSL and mbedTLS

PUBLISHED_FROM=0bfd5f128b4c4c062cb6f0ca0da9b30790aa8bf8
parent d6d956b9
......@@ -44,6 +44,15 @@ signature: |
* 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
};
---
......
This diff is collapsed.
......@@ -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
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment