FS-7425: #resolve dhparams might not be present, causing a seg. Make sure they are there before we apply them
This commit is contained in:
parent
d3bac671d2
commit
1b322bd952
|
@ -3127,8 +3127,10 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_dtls(switch_rtp_t *rtp_session, d
|
|||
bio = BIO_new_file(dtls->pem, "r");
|
||||
dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
|
||||
BIO_free(bio);
|
||||
SSL_CTX_set_tmp_dh(dtls->ssl_ctx, dh);
|
||||
DH_free(dh);
|
||||
if (dh) {
|
||||
SSL_CTX_set_tmp_dh(dtls->ssl_ctx, dh);
|
||||
DH_free(dh);
|
||||
}
|
||||
|
||||
SSL_CTX_set_mode(dtls->ssl_ctx, SSL_MODE_AUTO_RETRY);
|
||||
|
||||
|
|
Loading…
Reference in New Issue