87 janus_sctp_association *sctp;
134 void janus_dtls_wrap_sctp_data(
janus_dtls_srtp *dtls,
char *buf,
int len);
141 int janus_dtls_send_sctp_data(
janus_dtls_srtp *dtls,
char *buf,
int len);
147 void janus_dtls_notify_data(
janus_dtls_srtp *dtls,
char *buf,
int len);
gchar * janus_dtls_get_local_fingerprint(void)
Method to return a string representation (SHA-256) of the certificate fingerprint.
Definition: dtls.c:98
gint janus_dtls_srtp_init(const char *server_pem, const char *server_key)
DTLS stuff initialization.
Definition: dtls.c:310
SCTP processing for data channels (headers)
struct janus_dtls_srtp janus_dtls_srtp
Janus DTLS-SRTP handle.
void janus_dtls_fd_bridge(janus_dtls_srtp *dtls)
DTLS BIOs to/from socket bridge.
Definition: dtls.c:845
OpenSSL BIO filter for fragmentation.
janus_dtls_state dtls_state
DTLS state of this component: -1=failed, 0=nothing, 1=trying, 2=connected.
Definition: dtls.h:58
void janus_dtls_srtp_cleanup(void)
Method to cleanup DTLS stuff before exiting.
Definition: dtls.c:400
BIO * filter_bio
Filter BIO (fix MTU fragmentation on outgoing DTLS data, if required)
Definition: dtls.h:68
SSL * ssl
SSL context used for DTLS for this component.
Definition: dtls.h:62
janus_mutex srtp_mutex
Mutex to lock/unlock this libsrtp context.
Definition: dtls.h:80
void janus_dtls_srtp_destroy(janus_dtls_srtp *dtls)
Destroy a janus_dtls_srtp instance.
Definition: dtls.c:759
int retransmissions
The number of retransmissions that have occurred for this DTLS instance so far.
Definition: dtls.h:84
int janus_dtls_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
DTLS certificate verification callback (http://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html)
Definition: dtls.c:839
srtp_policy_t local_policy
libsrtp policy for outgoing SRTP packets
Definition: dtls.h:78
void janus_dtls_srtp_send_alert(janus_dtls_srtp *dtls)
Send an alert on a janus_dtls_srtp instance.
Definition: dtls.c:751
gint srtp_valid
Whether SRTP has been correctly set up for this component or not.
Definition: dtls.h:70
srtp_t srtp_out
libsrtp context for outgoing SRTP packets
Definition: dtls.h:74
pthread_mutex_t janus_mutex
Janus mutex implementation.
Definition: mutex.h:19
Janus DTLS-SRTP handle.
Definition: dtls.h:52
void janus_dtls_srtp_incoming_msg(janus_dtls_srtp *dtls, char *buf, uint16_t len)
Handle an incoming DTLS message.
Definition: dtls.c:528
int ready
Whether this DTLS stack is now ready to be used for messages as well (e.g., SCTP encapsulation) ...
Definition: dtls.h:82
gboolean janus_dtls_retry(gpointer stack)
DTLS retransmission timer.
Definition: dtls.c:934
gint64 dtls_connected
Monotonic time of when the DTLS state has switched to connected.
Definition: dtls.h:60
BIO * write_bio
Write BIO (outgoing DTLS data)
Definition: dtls.h:66
void janus_dtls_srtp_handshake(janus_dtls_srtp *dtls)
Start a DTLS handshake.
Definition: dtls.c:516
const gchar * janus_get_dtls_srtp_state(janus_dtls_state state)
Helper method to get a string representation of a Janus DTLS state.
Definition: dtls.c:29
void * component
Opaque pointer to the component this DTLS-SRTP context belongs to.
Definition: dtls.h:54
janus_dtls_role dtls_role
DTLS role of the gateway for this stream: 1=client, 0=server.
Definition: dtls.h:56
janus_dtls_srtp * janus_dtls_srtp_create(void *component, janus_dtls_role role)
Create a janus_dtls_srtp instance.
Definition: dtls.c:416
janus_dtls_state
DTLS state.
Definition: dtls.h:44
srtp_policy_t remote_policy
libsrtp policy for incoming SRTP packets
Definition: dtls.h:76
void janus_dtls_callback(const SSL *ssl, int where, int ret)
DTLS alert callback (http://www.openssl.org/docs/ssl/SSL_CTX_set_info_callback.html) ...
Definition: dtls.c:797
janus_dtls_role
DTLS roles.
Definition: dtls.h:37
const gchar * janus_get_dtls_srtp_role(janus_dtls_role role)
Helper method to get a string representation of a DTLS role.
Definition: dtls.c:45
BIO * read_bio
Read BIO (incoming DTLS data)
Definition: dtls.h:64
srtp_t srtp_in
libsrtp context for incoming SRTP packets
Definition: dtls.h:72