forked from merbanan/rtl_433
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: LibreSSL PSK error (closes merbanan#1569)
Fixes "Invalid PSK settings" error using LibreSSL when no PSK is used
- Loading branch information
1 parent
bca352e
commit bcac45e
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |