summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--lib/x509/common.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index f5d49ed11b..f25e52d3b9 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ Copyright (C) 2000, 2001, 2002, 2003, 2004 Nikos Mavroyanopoulos
See the end for copying conditions.
* Version 1.1.21
+- Print DN of certificates with unknown characters in them, but in hexform
+ only.
* Version 1.1.20 (2004-10-12)
- Fix compile problem in gl/getpass.c on some systems.
diff --git a/lib/x509/common.c b/lib/x509/common.c
index 59e5e1b9da..13144ac175 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -210,15 +210,15 @@ int _gnutls_x509_oid_data2string(const char *oid, void *value,
asn1_delete_structure(&tmpasn);
return _gnutls_asn2err(result);
}
-
+
if (CHOICE == 0) {
- str[len] = 0;
- if (res)
+ str[len] = 0;
+
+ if (res)
_gnutls_str_cpy(res, *res_size, str);
*res_size = len;
-
} else { /* CHOICE */
- str[len] = 0;
+ str[len] = 0;
int non_printable = 0;
/* Note that we do not support strings other than
@@ -275,8 +275,6 @@ int _gnutls_x509_data2hex(const opaque * data, size_t data_size,
if (res) {
unsigned int size = strlen(res) + 1;
if (size + 1 > *sizeof_out) {
- fprintf(stderr, "size: %d\nreq: %d\n", *sizeof_out, size+1
- );
*sizeof_out = size;
return GNUTLS_E_SHORT_MEMORY_BUFFER;
}