summaryrefslogtreecommitdiff
path: root/sbin/iked/ca.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/iked/ca.c')
-rw-r--r--sbin/iked/ca.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sbin/iked/ca.c b/sbin/iked/ca.c
index bb00a682d5a..49660d9a246 100644
--- a/sbin/iked/ca.c
+++ b/sbin/iked/ca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ca.c,v 1.60 2020/04/12 20:18:45 tobhe Exp $ */
+/* $OpenBSD: ca.c,v 1.61 2020/05/08 19:33:13 tobhe Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -1198,25 +1198,12 @@ ca_asn1_name(uint8_t *asn1, size_t len)
p = asn1;
if ((name = d2i_X509_NAME(NULL, &p, len)) == NULL)
return (NULL);
- str = ca_x509_name(name);
+ str = X509_NAME_oneline(name, NULL, 0);
X509_NAME_free(name);
return (str);
}
-char *
-ca_x509_name(void *ptr)
-{
- char buf[BUFSIZ];
- X509_NAME *name = ptr;
-
- bzero(buf, sizeof(buf));
- if (!X509_NAME_oneline(name, buf, sizeof(buf) - 1))
- return (NULL);
-
- return (strdup(buf));
-}
-
/*
* Copy 'src' to 'dst' until 'marker' is found while unescaping '\'
* characters. The return value tells the caller where to continue