mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-19 19:40:56 +00:00
Merge pull request #3610 from cesanta/hostnoca
Allow hostname checking even when no CA cert was given
This commit is contained in:
8 files changed
+131
-48
No files matched your search
+5
-1
@@ -3507,13 +3507,14 @@ struct mg_tls {
|
||||
mbedtls_x509_crt cert; // Parsed certificate
|
||||
mbedtls_pk_context pk; // Private key context
|
||||
mbedtls_ssl_context ssl; // SSL/TLS context
|
||||
mbedtls_ssl_config conf; // SSL-TLS config
|
||||
mbedtls_ssl_config conf; // SSL/TLS config
|
||||
#ifdef MBEDTLS_SSL_SESSION_TICKETS
|
||||
mbedtls_ssl_ticket_context ticket; // Session tickets context
|
||||
#endif
|
||||
// https://github.com/Mbed-TLS/mbedtls/blob/3b3c652d/include/mbedtls/ssl.h#L5071C18-L5076C29
|
||||
unsigned char *throttled_buf; // see #3074
|
||||
size_t throttled_len;
|
||||
bool check_name; // set when hostname was set, but no CA certificate given
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -3522,11 +3523,14 @@ struct mg_tls {
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
struct mg_tls {
|
||||
BIO_METHOD *bm;
|
||||
SSL_CTX *ctx;
|
||||
SSL *ssl;
|
||||
char *name; // matching hostname
|
||||
bool check_name; // set when hostname was set, but no CA certificate given
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user