mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
Config to use RSA or ECDSA
This commit is contained in:
parent
c70a0eb07c
commit
8c42ad622b
1 changed files with 7 additions and 2 deletions
|
@ -73,8 +73,10 @@ srs_error_t SrsDtls::init(const SrsRequest& req)
|
||||||
{
|
{
|
||||||
srs_error_t err = srs_success;
|
srs_error_t err = srs_success;
|
||||||
|
|
||||||
// Initialize SRTP first.
|
// Initialize once.
|
||||||
srs_assert(srtp_init() == 0);
|
if (dtls_ctx) {
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L // v1.1.x
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L // v1.1.x
|
||||||
// Initialize SSL library by registering algorithms
|
// Initialize SSL library by registering algorithms
|
||||||
|
@ -92,6 +94,9 @@ srs_error_t SrsDtls::init(const SrsRequest& req)
|
||||||
//dtls_ctx = SSL_CTX_new(DTLSv1_2_method());
|
//dtls_ctx = SSL_CTX_new(DTLSv1_2_method());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Initialize SRTP first.
|
||||||
|
srs_assert(srtp_init() == 0);
|
||||||
|
|
||||||
// Whether use ECDSA certificate.
|
// Whether use ECDSA certificate.
|
||||||
bool is_ecdsa = _srs_config->get_rtc_server_ecdsa();
|
bool is_ecdsa = _srs_config->get_rtc_server_ecdsa();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue