Fix: LibreSSL PSK error (closes #1569)
Fixes "Invalid PSK settings" error using LibreSSL when no PSK is used
This commit is contained in:
parent
a9c6866cf7
commit
7cc2623953
2 changed files with 15 additions and 2 deletions
|
@ -5042,8 +5042,7 @@ static enum mg_ssl_if_result mg_ssl_if_ossl_set_psk(struct mg_ssl_if_ctx *ctx,
|
||||||
const char *identity,
|
const char *identity,
|
||||||
const char *key_str) {
|
const char *key_str) {
|
||||||
(void) ctx;
|
(void) ctx;
|
||||||
(void) identity;
|
if (identity == NULL && key_str == NULL) return MG_SSL_OK;
|
||||||
(void) key_str;
|
|
||||||
/* Krypton / LibreSSL does not support PSK. */
|
/* Krypton / LibreSSL does not support PSK. */
|
||||||
return MG_SSL_ERROR;
|
return MG_SSL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
14
src/mongoose_libressl.patch
Normal file
14
src/mongoose_libressl.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/src/mongoose.c b/src/mongoose.c
|
||||||
|
index d3d2ef99..c9c40863 100644
|
||||||
|
--- a/src/mongoose.c
|
||||||
|
+++ b/src/mongoose.c
|
||||||
|
@@ -5042,8 +5042,7 @@ static enum mg_ssl_if_result mg_ssl_if_ossl_set_psk(struct mg_ssl_if_ctx *ctx,
|
||||||
|
const char *identity,
|
||||||
|
const char *key_str) {
|
||||||
|
(void) ctx;
|
||||||
|
- (void) identity;
|
||||||
|
- (void) key_str;
|
||||||
|
+ if (identity == NULL && key_str == NULL) return MG_SSL_OK;
|
||||||
|
/* Krypton / LibreSSL does not support PSK. */
|
||||||
|
return MG_SSL_ERROR;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue