summaryrefslogtreecommitdiff
path: root/lib/str-unicode.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-11-09 10:48:04 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-11-20 17:31:49 +0100
commita54cec97d068291eb0ad1588f6edf07770aa557f (patch)
tree0387cad863590abd267614a7bfe96d56fe99697d /lib/str-unicode.c
parent28ac7caaf13f12d009cd8bc649bf82bcb051619f (diff)
downloadgnutls-a54cec97d068291eb0ad1588f6edf07770aa557f.tar.gz
PKCS#7/8: normalize the password according to rfc7613
Diffstat (limited to 'lib/str-unicode.c')
-rw-r--r--lib/str-unicode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/str-unicode.c b/lib/str-unicode.c
index 544ce1da84..c83d1daec8 100644
--- a/lib/str-unicode.c
+++ b/lib/str-unicode.c
@@ -40,7 +40,7 @@
* to the normalization rules in RFC7613. If GnuTLS is compiled without
* unicode support this function will return %GNUTLS_E_UNIMPLEMENTED_FEATURE.
*
- * Returns: %GNUTLS_E_PARSING_ERROR on invalid UTF-8 data, or 0 on success.
+ * Returns: %GNUTLS_E_INVALID_UTF8_STRING on invalid UTF-8 data, or 0 on success.
**/
int gnutls_utf8_password_normalize(const unsigned char *password, unsigned password_len,
gnutls_datum_t *out, unsigned flags)
@@ -66,7 +66,7 @@ int gnutls_utf8_password_normalize(const unsigned char *password, unsigned passw
/* check for invalid UTF-8 */
if (u8_check((uint8_t*)password, plen) != NULL) {
gnutls_assert();
- return GNUTLS_E_PARSING_ERROR;
+ return GNUTLS_E_INVALID_UTF8_STRING;
}
/* convert to UTF-32 */