diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2022-01-16 13:05:20 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-01-16 13:05:50 -0500 |
commit | 3426faf5aed33df451e88df7ba027e9d0e92d7dd (patch) | |
tree | b9985eab2eab26c1ed50158aee34b800827835f7 /src | |
parent | 3ac377177b19fb4be8f93604f1aa0b09626c1d44 (diff) | |
download | lighttpd-git-3426faf5aed33df451e88df7ba027e9d0e92d7dd.tar.gz |
[multiple] permit UTF-8 in SSL_CLIENT_S_DN_*
permit non-ASCII UTF-8 in SSL_CLIENT_S_DN_*
x-ref:
https://github.com/ARMmbed/mbedtls/pull/3326#issuecomment-1013921672
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_gnutls.c | 2 | ||||
-rw-r--r-- | src/mod_mbedtls.c | 2 | ||||
-rw-r--r-- | src/mod_nss.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_gnutls.c b/src/mod_gnutls.c index df6f446b..c51d57eb 100644 --- a/src/mod_gnutls.c +++ b/src/mod_gnutls.c @@ -2776,7 +2776,7 @@ https_add_ssl_client_subject (request_st * const r, gnutls_x509_dn_t dn) vlen = sizeof(buf)-1; for (n = 0; n < vlen; ++n) { unsigned char c = ava.value.data[n]; - buf[n] = (c < 32 || c == 127 || (c > 128 && c < 160)) ? '?' : c; + buf[n] = (c >= 32 && c != 127) ? c : '?'; } http_header_env_set(r, key, prelen+len, buf, n); diff --git a/src/mod_mbedtls.c b/src/mod_mbedtls.c index 3e84bdc1..bf4185df 100644 --- a/src/mod_mbedtls.c +++ b/src/mod_mbedtls.c @@ -2419,7 +2419,7 @@ https_add_ssl_client_subject (request_st * const r, const mbedtls_x509_name *nam vlen = sizeof(buf)-1; for (n = 0; n < vlen; ++n) { unsigned char c = name->val.p[n]; - buf[n] = (c < 32 || c == 127 || (c > 128 && c < 160)) ? '?' : c; + buf[n] = (c >= 32 && c != 127) ? c : '?'; } http_header_env_set(r, key, prelen+len, buf, n); diff --git a/src/mod_nss.c b/src/mod_nss.c index 9207422d..45c58e12 100644 --- a/src/mod_nss.c +++ b/src/mod_nss.c @@ -2542,7 +2542,7 @@ https_add_ssl_client_subject (request_st * const r, CERTName * const subj) unsigned int n; unsigned char c; for (n = 0; (c = ((unsigned char *)s)[n]); ++n) { - if (c < 32 || c == 127 || (c > 128 && c < 160)) s[n] = '?'; + if (c < 32 || c == 127) s[n] = '?'; } /*if (prelen+comp[i].tlen >= sizeof(key)) continue;*//*(not possible)*/ |