]> granicus.if.org Git - rtmpdump/commitdiff
Clarify NO_SSL initialization
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Fri, 30 Apr 2010 00:01:52 +0000 (00:01 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Fri, 30 Apr 2010 00:01:52 +0000 (00:01 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@457 400ebc74-4327-4243-bc38-086b20814532

librtmp/rtmp.c

index 28098c11e8e4714538b5c9e2c2eedfd6e05b33f3..f91e60c511d0383188eac6047441f6c6810a0453 100644 (file)
@@ -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();