diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-11-10 16:43:23 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-11-11 13:38:37 +0100 |
commit | c2fa842bdcb88d0f7a16be9e49cc87b340cb68e2 (patch) | |
tree | 824bfcd9cd5f464699ed2b4983cfded8b726c039 /lib/str.h | |
parent | 6d5c80e2bf7efbc4e99588b8d8ec4f383d34375f (diff) | |
download | gnutls-tmp-uninorm-everywhere.tar.gz |
x509: when writing fields known to be in UTF-8 form convert to NFCtmp-uninorm-everywhere
This ensures that we always write proper UTF-8 data, uniquely encoded.
Diffstat (limited to 'lib/str.h')
-rw-r--r-- | lib/str.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -38,8 +38,10 @@ #if defined(HAVE_LIBUNISTRING) uint8_t *_gnutls_normalize_u8_password(const uint8_t *password); +uint8_t *_gnutls_normalize_u8_nfc(const uint8_t *str, size_t str_size); #else -# define _gnutls_normalize_u8_password(password) ((uint8_t*)strdup((char*)password)) +# define _gnutls_normalize_u8_password(password) ((uint8_t*)gnutls_strdup((char*)password)) +# define _gnutls_normalize_u8_nfc(str, str_size) ((uint8_t*)gnutls_strdup((char*)str)) #endif void _gnutls_str_cpy(char *dest, size_t dest_tot_size, const char *src); |