Skip to content

Commit

Permalink
Improve building with BoringSSL (#2278)
Browse files Browse the repository at this point in the history
* Support negotiation of DTLSv1.2 with BoringSSL.
* Locking is not required with BoringSSL.
  • Loading branch information
fancycode committed Jul 13, 2020
1 parent 7569e96 commit 3ec52d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ gchar *janus_dtls_get_local_fingerprint(void) {
}


#if JANUS_USE_OPENSSL_PRE_1_1_API
#if JANUS_USE_OPENSSL_PRE_1_1_API && !defined(HAVE_BORINGSSL)
/*
* DTLS locking stuff to make OpenSSL thread safe (not needed for 1.1.0)
*
Expand Down Expand Up @@ -373,7 +373,7 @@ const char *janus_get_ssl_version(void) {
gint janus_dtls_srtp_init(const char *server_pem, const char *server_key, const char *password,
const char *ciphers, guint16 timeout, gboolean rsa_private_key, gboolean accept_selfsigned) {
const char *crypto_lib = NULL;
#if JANUS_USE_OPENSSL_PRE_1_1_API
#if JANUS_USE_OPENSSL_PRE_1_1_API && !defined(HAVE_BORINGSSL)
#if defined(LIBRESSL_VERSION_NUMBER)
crypto_lib = "LibreSSL";
#else
Expand All @@ -399,7 +399,7 @@ gint janus_dtls_srtp_init(const char *server_pem, const char *server_key, const
#endif

/* Go on and create the DTLS context */
#if JANUS_USE_OPENSSL_PRE_1_1_API
#if JANUS_USE_OPENSSL_PRE_1_1_API && !defined(HAVE_BORINGSSL)
#if defined(LIBRESSL_VERSION_NUMBER)
ssl_ctx = SSL_CTX_new(DTLSv1_method());
#else
Expand Down Expand Up @@ -534,7 +534,7 @@ void janus_dtls_srtp_cleanup(void) {
SSL_CTX_free(ssl_ctx);
ssl_ctx = NULL;
}
#if JANUS_USE_OPENSSL_PRE_1_1_API
#if JANUS_USE_OPENSSL_PRE_1_1_API && !defined(HAVE_BORINGSSL)
g_free(janus_dtls_locks);
#endif
}
Expand Down

0 comments on commit 3ec52d1

Please sign in to comment.