Mercurial > hg
comparison mcabber/connwrap/connwrap.c @ 134:e19ad58c3cad
[/trunk] Changeset 147 by mikael
* Enable the connwrap module to compile when using gnutls-openssl.
author | mikael |
---|---|
date | Thu, 28 Apr 2005 17:39:57 +0000 |
parents | edb5591e2e64 |
children | f7f07794d2df |
comparison
equal
deleted
inserted
replaced
133:a27b22e3b3a1 | 134:e19ad58c3cad |
---|---|
16 | 16 |
17 #define OPENSSL_NO_KRB5 1 | 17 #define OPENSSL_NO_KRB5 1 |
18 #include <openssl/ssl.h> | 18 #include <openssl/ssl.h> |
19 #include <openssl/err.h> | 19 #include <openssl/err.h> |
20 | 20 |
21 #elif HAVE_GNUTLS | 21 #else |
22 | 22 # ifdef HAVE_GNUTLS |
23 #include <gnutls/openssl.h> | 23 # include <gnutls/openssl.h> |
24 #define HAVE_OPENSSL | 24 # define HAVE_OPENSSL |
25 | 25 # endif |
26 #endif | 26 #endif |
27 | 27 |
28 static int in_http_connect = 0; | 28 static int in_http_connect = 0; |
29 | 29 |
30 #ifdef HAVE_OPENSSL | 30 #ifdef HAVE_OPENSSL |
60 SSLeay_add_all_algorithms(); | 60 SSLeay_add_all_algorithms(); |
61 #else | 61 #else |
62 OpenSSL_add_all_algorithms(); | 62 OpenSSL_add_all_algorithms(); |
63 #endif | 63 #endif |
64 | 64 |
65 ctx = SSL_CTX_new(SSLv23_method()); | 65 //ctx = SSL_CTX_new(SSLv23_method()); |
66 ctx = SSL_CTX_new(SSLv23_client_method()); | |
66 } | 67 } |
67 | 68 |
68 p->ssl = SSL_new(ctx); | 69 p->ssl = SSL_new(ctx); |
69 SSL_set_fd(p->ssl, p->fd = fd); | 70 SSL_set_fd(p->ssl, p->fd = fd); |
70 | 71 |