Author: hyc Date: Fri Apr 30 02:01:52 2010 New Revision: 457 Log: Clarify NO_SSL initialization Modified: trunk/librtmp/rtmp.c Modified: trunk/librtmp/rtmp.c ============================================================================== --- trunk/librtmp/rtmp.c Fri Apr 30 01:47:30 2010 (r456) +++ trunk/librtmp/rtmp.c Fri Apr 30 02:01:52 2010 (r457) @@ -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();
participants (1)
-
hyc