diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-11-23 14:30:48 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-11-23 15:02:25 +0100 |
commit | 42c5dd87faed931e6c352fa96294b3c47679f114 (patch) | |
tree | b04a6ccfb71bf4af6786e8419ba2bf33a9d36693 | |
parent | 08bb4d33619dced0ecf72adbc47175a78b8789b5 (diff) | |
download | gnutls-42c5dd87faed931e6c352fa96294b3c47679f114.tar.gz |
avoid the use of c_isascii() and use c_isprint()
That latter detects correctly the printable characters we are
interested in.
-rw-r--r-- | lib/str.c | 2 | ||||
-rw-r--r-- | lib/x509/common.c | 2 | ||||
-rw-r--r-- | lib/x509/output.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -722,7 +722,7 @@ _gnutls_hostname_compare(const char *certname, unsigned i; for (i=0;i<certnamesize;i++) { - if (c_isascii(certname[i]) == 0) + if (c_isprint(certname[i]) == 0) return hostname_compare_raw(certname, certnamesize, hostname); } diff --git a/lib/x509/common.c b/lib/x509/common.c index 6d72338d42..d94761517a 100644 --- a/lib/x509/common.c +++ b/lib/x509/common.c @@ -299,7 +299,7 @@ make_printable_string(unsigned etype, const gnutls_datum_t * input, * characters then treat it as printable. */ for (i = 0; i < input->size; i++) - if (!c_isascii(input->data[i])) + if (!c_isprint(input->data[i])) ascii = 1; if (ascii == 0) { diff --git a/lib/x509/output.c b/lib/x509/output.c index a6b0b64e8a..db8bb9aa2b 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -68,7 +68,7 @@ int ret; case GNUTLS_SAN_DNSNAME: #ifdef HAVE_LIBIDN for (i=0;i<name->size;i++) { - if (c_isascii(name->data[i]) == 0) { + if (c_isprint(name->data[i]) == 0) { non_ascii = 1; break; } |