]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Fix OpenPGP hostname comparison.
authorSimon Josefsson <simon@josefsson.org>
Thu, 20 Aug 2009 10:21:09 +0000 (12:21 +0200)
committerSimon Josefsson <simon@josefsson.org>
Thu, 20 Aug 2009 10:21:09 +0000 (12:21 +0200)
lib/openpgp/pgp.c

index 8018ced20aafb28bbf0c67c4824cdcb736603534..aa2a235a231c228f778ad76aa178a7b010079a34 100644 (file)
@@ -589,6 +589,10 @@ gnutls_openpgp_crt_check_hostname (gnutls_openpgp_crt_t key,
 
       if (ret == 0)
        {
+         /* Length returned by gnutls_openpgp_crt_get_name includes
+            the terminating zero. */
+         dnsnamesize--;
+
          if (_gnutls_hostname_compare (dnsname, dnsnamesize, hostname))
            return 1;
        }