fixed a bug where broker's private-key file was not loaded
fixed a bug where the mosquitto-broker's private-key file(.pem) dose not load with tls-engine. Signed-off-by: Hyeongon Kim <khyeongon@gmail.com>
This commit is contained in:
parent
a6347cd7d2
commit
19fbfee791
@ -479,7 +479,7 @@ int net__load_certificates(struct mosquitto__listener *listener)
|
||||
net__print_ssl_error(NULL);
|
||||
return MOSQ_ERR_TLS;
|
||||
}
|
||||
if(listener->tls_engine == NULL){
|
||||
if(listener->tls_engine == NULL || listener->tls_keyform == mosq_k_pem){
|
||||
rc = SSL_CTX_use_PrivateKey_file(listener->ssl_ctx, listener->keyfile, SSL_FILETYPE_PEM);
|
||||
if(rc != 1){
|
||||
log__printf(NULL, MOSQ_LOG_ERR, "Error: Unable to load server key file \"%s\". Check keyfile.", listener->keyfile);
|
||||
|
Loading…
Reference in New Issue
Block a user