Get rid of using deprecated function isascii
authorDmitry Belyavskiy <beldmit@gmail.com>
Sun, 18 Aug 2019 08:29:50 +0000 (11:29 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Mon, 19 Aug 2019 17:52:25 +0000 (20:52 +0300)
Avoid using functions deprecated in some libcs (e.g. uClibc-ng).
Fixes #9557

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9628)

apps/s_server.c

index 3ded4f8..28937bd 100644 (file)
@@ -470,7 +470,7 @@ static int ssl_servername_cb(SSL *s, int *ad, void *arg)
         BIO_printf(p->biodebug, "Hostname in TLS extension: \"");
         while ((uc = *cp++) != 0)
             BIO_printf(p->biodebug,
-                       isascii(uc) && isprint(uc) ? "%c" : "\\x%02x", uc);
+                       (((uc) & ~127) == 0) && isprint(uc) ? "%c" : "\\x%02x", uc);
         BIO_printf(p->biodebug, "\"\n");
     }