diff options
author | Diego Biurrun <diego@biurrun.de> | 2017-05-23 10:15:28 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2017-06-02 10:41:52 +0200 |
commit | 61cec5adaacb358783c18aa07362f15824c1b274 (patch) | |
tree | 974bfc9f4461436d5e9f3584051b8d9e6327b11f /libavformat/network.c | |
parent | 5edded9df31bc4712a023f89941b4c278f1bd6f5 (diff) | |
download | ffmpeg-61cec5adaacb358783c18aa07362f15824c1b274.tar.gz |
tls: Hide backend implementation details from users
TLS is currently implemented over either OpenSSL or GnuTLS, with more
backends likely to appear in the future. Currently, those backend libraries
are part of the protocol names used during e.g. the configure stage of a
build. Hide those details behind a generically-named declaration for the
TLS protocol to avoid leaking those details into the configuration stage.
Diffstat (limited to 'libavformat/network.c')
-rw-r--r-- | libavformat/network.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libavformat/network.c b/libavformat/network.c index 2c34b4a14b..86d79553f7 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -27,22 +27,26 @@ void ff_tls_init(void) { -#if CONFIG_TLS_OPENSSL_PROTOCOL +#if CONFIG_TLS_PROTOCOL +#if CONFIG_OPENSSL ff_openssl_init(); #endif -#if CONFIG_TLS_GNUTLS_PROTOCOL +#if CONFIG_GNUTLS ff_gnutls_init(); #endif +#endif } void ff_tls_deinit(void) { -#if CONFIG_TLS_OPENSSL_PROTOCOL +#if CONFIG_TLS_PROTOCOL +#if CONFIG_OPENSSL ff_openssl_deinit(); #endif -#if CONFIG_TLS_GNUTLS_PROTOCOL +#if CONFIG_GNUTLS ff_gnutls_deinit(); #endif +#endif } int ff_network_inited_globally; |