char *rbio_buf;
size_t rbio_size;
size_t rbio_pos;
-
+
BIO *wbio;
char *wbio_buf;
size_t wbio_size;
if (!hdr && hc->hc_rpos >= hc->hc_csize)
return 1;
return 0;
- }
+ }
csize = hc->hc_csize == (size_t)-1 ? 0 : hc->hc_csize;
l = len;
if (strcasecmp(scheme, "https") == 0 || strcasecmp(scheme, "rtsps") == 0) {
ssl = calloc(1, sizeof(*ssl));
hc->hc_ssl = ssl;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
ssl->ctx = SSL_CTX_new(SSLv23_client_method());
+#else
+ ssl->ctx = SSL_CTX_new(TLS_client_method());
+#endif
if (ssl->ctx == NULL) {
tvherror(LS_HTTPC, "%04X: Unable to get SSL_CTX", shortid(hc));
goto err1;
}
http_client_t *
-http_client_connect
+http_client_connect
( void *aux, http_ver_t ver, const char *scheme,
const char *host, int port, const char *bindaddr )
{
{
assert(hc->hc_data_received || hc->hc_conn_closed || hc->hc_data_complete);
assert(hc->hc_efd == NULL);
-
+
pthread_mutex_lock(&http_lock);
TAILQ_INSERT_TAIL(&http_clients, hc, hc_link);
#include <openssl/conf.h>
#include <openssl/err.h>
#include <openssl/rand.h>
+#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
+#endif
pthread_t main_tid;
sigprocmask(SIG_BLOCK, &set, NULL);
trap_init(argv[0]);
- /* SSL library init */
- OPENSSL_config(NULL);
- SSL_load_error_strings();
- SSL_library_init();
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
+ /* SSL library init */
+ OPENSSL_config(NULL);
+ SSL_load_error_strings();
+ SSL_library_init();
+ #endif
#ifndef OPENSSL_NO_ENGINE
/* ENGINE init */
if(opt_fork)
unlink(opt_pidpath);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
/* OpenSSL - welcome to the "cleanup" hell */
+ #ifndef OPENSSL_NO_ENGINE
ENGINE_cleanup();
+ #endif
RAND_cleanup();
CRYPTO_cleanup_all_ex_data();
EVP_cleanup();
sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
#endif
/* end of OpenSSL cleanup code */
+#endif
#if ENABLE_DBUS_1
extern void dbus_shutdown(void);