summaryrefslogtreecommitdiff
path: root/src/libstrongswan/utils/identification.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/utils/identification.c')
-rw-r--r--src/libstrongswan/utils/identification.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libstrongswan/utils/identification.c b/src/libstrongswan/utils/identification.c
index 0696c1030..facf9f6de 100644
--- a/src/libstrongswan/utils/identification.c
+++ b/src/libstrongswan/utils/identification.c
@@ -281,11 +281,20 @@ static void dntoa(chunk_t dn, char *buf, size_t len)
chunk_t oid_data, data, printable;
u_char type;
int oid, written;
+<<<<<<< HEAD
bool finished = FALSE;
+=======
+ bool finished = FALSE, empty = TRUE;
+>>>>>>> upstream/4.5.1
e = create_rdn_enumerator(dn);
while (e->enumerate(e, &oid_data, &type, &data))
{
+<<<<<<< HEAD
+=======
+ empty = FALSE;
+
+>>>>>>> upstream/4.5.1
oid = asn1_known_oid(oid_data);
if (oid == OID_UNKNOWN)
@@ -329,7 +338,15 @@ static void dntoa(chunk_t dn, char *buf, size_t len)
break;
}
}
+<<<<<<< HEAD
if (!finished)
+=======
+ if (empty)
+ {
+ snprintf(buf, len, "");
+ }
+ else if (!finished)
+>>>>>>> upstream/4.5.1
{
snprintf(buf, len, "(invalid ID_DER_ASN1_DN)");
}