mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Config to use RSA or ECDSA
This commit is contained in:
parent
5e06a2568b
commit
c70a0eb07c
7 changed files with 48 additions and 10 deletions
|
@ -142,10 +142,14 @@ SrsDtlsSession::~SrsDtlsSession()
|
|||
}
|
||||
}
|
||||
|
||||
srs_error_t SrsDtlsSession::initialize()
|
||||
srs_error_t SrsDtlsSession::initialize(const SrsRequest& req)
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
if ((err = SrsDtls::instance()->init(req)) != srs_success) {
|
||||
return srs_error_wrap(err, "DTLS init");
|
||||
}
|
||||
|
||||
if ((dtls = SSL_new(SrsDtls::instance()->get_dtls_ctx())) == NULL) {
|
||||
return srs_error_new(ERROR_OpenSslCreateSSL, "SSL_new dtls");
|
||||
}
|
||||
|
@ -593,7 +597,7 @@ SrsRtcSession::SrsRtcSession(SrsRtcServer* rtc_svr, const SrsRequest& req, const
|
|||
rtc_server = rtc_svr;
|
||||
session_state = INIT;
|
||||
dtls_session = new SrsDtlsSession(this);
|
||||
dtls_session->initialize();
|
||||
dtls_session->initialize(req);
|
||||
strd = NULL;
|
||||
|
||||
username = un;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue