From 42c5dd87faed931e6c352fa96294b3c47679f114 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 23 Nov 2016 14:30:48 +0100 Subject: avoid the use of c_isascii() and use c_isprint() That latter detects correctly the printable characters we are interested in. --- lib/str.c | 2 +- lib/x509/common.c | 2 +- lib/x509/output.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/str.c b/lib/str.c index 2893c32c2c..4a72a2f27f 100644 --- a/lib/str.c +++ b/lib/str.c @@ -722,7 +722,7 @@ _gnutls_hostname_compare(const char *certname, unsigned i; for (i=0;isize; 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;isize;i++) { - if (c_isascii(name->data[i]) == 0) { + if (c_isprint(name->data[i]) == 0) { non_ascii = 1; break; } -- cgit v1.2.1