]> sjero.net Git - wget/blobdiff - src/gnutls.c
[mq]: cfg-mk
[wget] / src / gnutls.c
index 258c0156b133e82079053f2b725b4b7938d06900..af46171f39199b605af814f602dc1f30a866687c 100644 (file)
@@ -1,5 +1,6 @@
 /* SSL support via GnuTLS library.
-   Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+   Inc.
 
 This file is part of GNU Wget.
 
@@ -27,8 +28,6 @@ Corresponding Source for a non-source form of such a combination
 shall include the source code for the parts of OpenSSL used as well
 as that of the covered work.  */
 
-#define USE_GNULIB_ALLOC
-
 #include "wget.h"
 
 #include <assert.h>
@@ -182,7 +181,7 @@ static struct transport_implementation wgnutls_transport = {
 };
 
 bool
-ssl_connect (int fd) 
+ssl_connect (int fd)
 {
   static const int cert_type_priority[] = {
     GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0
@@ -225,7 +224,7 @@ ssl_check_certificate (int fd, const char *host)
   if (err < 0)
     {
       logprintf (LOG_NOTQUIET, _("%s: No certificate presented by %s.\n"),
-                 severity, escnonprint (host));
+                 severity, quotearg_style (escape_quoting_style, host));
       success = false;
       goto out;
     }
@@ -233,19 +232,19 @@ ssl_check_certificate (int fd, const char *host)
   if (status & GNUTLS_CERT_INVALID)
     {
       logprintf (LOG_NOTQUIET, _("%s: The certificate of %s is not trusted.\n"),
-                 severity, quote (escnonprint (host)));
+                 severity, quote (host));
       success = false;
     }
   if (status & GNUTLS_CERT_SIGNER_NOT_FOUND)
     {
       logprintf (LOG_NOTQUIET, _("%s: The certificate of %s hasn't got a known issuer.\n"),
-                 severity, quote (escnonprint (host)));
+                 severity, quote (host));
       success = false;
     }
   if (status & GNUTLS_CERT_REVOKED)
     {
       logprintf (LOG_NOTQUIET, _("%s: The certificate of %s has been revoked.\n"),
-                 severity, quote (escnonprint (host)));
+                 severity, quote (host));
       success = false;
     }
 
@@ -292,8 +291,8 @@ ssl_check_certificate (int fd, const char *host)
       if (!gnutls_x509_crt_check_hostname (cert, host))
         {
           logprintf (LOG_NOTQUIET,
-                     _("The certificate's owner does not match hostname '%s'\n"),
-                     host);
+                     _("The certificate's owner does not match hostname %s\n"),
+                     quote (host));
           success = false;
         }
       gnutls_x509_crt_deinit (cert);