2007-10-19 [colin] 3.0.2cvs90
authorColin Leroy <colin@colino.net>
Fri, 19 Oct 2007 06:32:42 +0000 (06:32 +0000)
committerColin Leroy <colin@colino.net>
Fri, 19 Oct 2007 06:32:42 +0000 (06:32 +0000)
* src/common/ssl.c
Fix return value check on GnuTLS, and
display the error

ChangeLog
PATCHSETS
configure.ac
src/common/ssl.c

index f77d0e2544c7b1c52061e7b74e0b7fc39c10b96c..8768680d46014c8edee31da32020fe5a210293e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-19 [colin]     3.0.2cvs90
+
+       * src/common/ssl.c
+               Fix return value check on GnuTLS, and
+               display the error
+
 2007-10-18 [colin]     3.0.2cvs89
 
        * src/common/ssl_certificate.c
index bfa906c6270b662353bf3219e68c1517f78476a7..f05de933ba75d74181c6de9a4578ea0c85be7658 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.53.2.31 -r 1.53.2.32 po/POTFILES.in;  ) > 3.0.2cvs87.patchset
 ( cvs diff -u -r 1.155.2.79 -r 1.155.2.80 src/Makefile.am;  ) > 3.0.2cvs88.patchset
 ( cvs diff -u -r 1.4.2.21 -r 1.4.2.22 src/common/ssl_certificate.c;  ) > 3.0.2cvs89.patchset
+( cvs diff -u -r 1.9.2.22 -r 1.9.2.23 src/common/ssl.c;  ) > 3.0.2cvs90.patchset
index b664104db18ef460a8a15ca7227647331930155c..9fe916fb1980e8639b3dbceab78ee54f9b0543f5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=89
+EXTRA_VERSION=90
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 8228543aa3272f8aa75a69a091ba73da2e8ae419..bdf2b3e9a893248296e4ef54f747b5a1bdf2e66f 100644 (file)
@@ -187,6 +187,7 @@ gboolean ssl_init_socket(SockInfo *sockinfo)
        return ssl_init_socket_with_method(sockinfo, SSL_METHOD_SSLv23);
 }
 
+#ifdef USE_GNUTLS
 static const gchar *ssl_get_cert_file(void)
 {
        if (g_getenv("SSL_CERT_FILE"))
@@ -197,6 +198,7 @@ static const gchar *ssl_get_cert_file(void)
        return "put_what_s_needed_here";
 #endif
 }
+#endif
 
 gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method)
 {
@@ -298,8 +300,8 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method)
        gnutls_transport_set_ptr(session, (gnutls_transport_ptr) 
                sockinfo->sock);
 
-       if (SSL_connect_nb(session) == -1) {
-               g_warning("SSL connection failed");
+       if ((r = SSL_connect_nb(session)) < 0) {
+               g_warning("SSL connection failed (%s)", gnutls_strerror(r));
                gnutls_deinit(session);
                return FALSE;
        }