From eff63314d1f1f42ba121f42425df258df37e7f5d Mon Sep 17 00:00:00 2001 From: hyc Date: Fri, 30 Apr 2010 00:01:52 +0000 Subject: [PATCH] Clarify NO_SSL initialization git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@457 400ebc74-4327-4243-bc38-086b20814532 --- librtmp/rtmp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c index 28098c1..f91e60c 100644 --- a/librtmp/rtmp.c +++ b/librtmp/rtmp.c @@ -199,9 +199,14 @@ RTMP_TLS_Init() { #ifdef CRYPTO #ifdef USE_POLARSSL + /* Do this regardless of NO_SSL, we use havege for rtmpe too */ RTMP_TLS_ctx = calloc(1,sizeof(struct tls_ctx)); havege_init(&RTMP_TLS_ctx->hs); #elif defined(USE_GNUTLS) && !defined(NO_SSL) + /* Technically we need to initialize libgcrypt ourselves if + * we're not going to call gnutls_global_init(). Ignoring this + * for now. + */ gnutls_global_init(); RTMP_TLS_ctx = malloc(sizeof(struct tls_ctx)); gnutls_certificate_allocate_credentials(&RTMP_TLS_ctx->cred); @@ -209,6 +214,7 @@ RTMP_TLS_Init() gnutls_certificate_set_x509_trust_file(RTMP_TLS_ctx->cred, "ca.pem", GNUTLS_X509_FMT_PEM); #elif !defined(NO_SSL) /* USE_OPENSSL */ + /* libcrypto doesn't need anything special */ SSL_load_error_strings(); SSL_library_init(); OpenSSL_add_all_digests(); -- 2.50.1