diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-08-20 12:21:09 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-08-20 12:21:09 +0200 |
commit | 9eed44b4ef9538117cc134956b32bc8fd39534fd (patch) | |
tree | 48eeefab0b731583953ba99945ccec55a9fecc64 /lib/openpgp/pgp.c | |
parent | a4e5f6581c55aee85cc805081a8b4171c326da5a (diff) | |
download | gnutls-9eed44b4ef9538117cc134956b32bc8fd39534fd.tar.gz |
Fix OpenPGP hostname comparison.
Diffstat (limited to 'lib/openpgp/pgp.c')
-rw-r--r-- | lib/openpgp/pgp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/openpgp/pgp.c b/lib/openpgp/pgp.c index 8018ced20a..aa2a235a23 100644 --- a/lib/openpgp/pgp.c +++ b/lib/openpgp/pgp.c @@ -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; } |