summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2022-11-03 11:55:13 +1100
committerPauli <pauli@openssl.org>2022-11-11 08:14:47 +1100
commit905ba924398f474e647de70345b4ae4089fedba7 (patch)
tree3293d5ab6af18a5c5ca27e33b0b595a8d6b1b9f6 /include/crypto
parent373d90128042cb0409e347827d80b50a99d3965a (diff)
punycode: update to use WPACKET instead of using custom range checking
Add test for `.' overflows, remove the output size argument from ossl_a2ulabel() since it was never used and greatly complicated the code. Convert ossl_a2ulabel() to use WPACKET for building the output string. Update the documentation to match the new definition of ossl_a2ulabel(). x509: let punycode handle the '\0' string termination. Saves a memset(3) and some size fiddling. Also update to deal with the modified parameters. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/19591)
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/punycode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/crypto/punycode.h b/include/crypto/punycode.h
index 133826d87e..1cc52c544a 100644
--- a/include/crypto/punycode.h
+++ b/include/crypto/punycode.h
@@ -18,7 +18,8 @@ int ossl_punycode_decode (
unsigned int *pout_length
);
-int ossl_a2ulabel(const char *in, char *out, size_t *outlen);
+int ossl_a2ulabel(const char *in, char *out, size_t outlen);
int ossl_a2ucompare(const char *a, const char *u);
+
#endif