diff options
author | tobhe <tobhe@cvs.openbsd.org> | 2020-05-08 19:33:14 +0000 |
---|---|---|
committer | tobhe <tobhe@cvs.openbsd.org> | 2020-05-08 19:33:14 +0000 |
commit | 3118543778dda220812e1e592428b335cd1470d5 (patch) | |
tree | e38001895cb1d5b5af52329d3930df4758998985 /sbin | |
parent | 501c3c7edb70311aee6c8bf77268b0d856e649ff (diff) |
Remove unneccessary X509_NAME_oneline wrapper. Passing NULL as buf
does the same thing.
ok patrick@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/ca.c | 17 | ||||
-rw-r--r-- | sbin/iked/iked.h | 3 |
2 files changed, 3 insertions, 17 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 diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h index 8264960cca7..5f95f814c32 100644 --- a/sbin/iked/iked.h +++ b/sbin/iked/iked.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.h,v 1.147 2020/04/23 20:17:48 tobhe Exp $ */ +/* $OpenBSD: iked.h,v 1.148 2020/05/08 19:33:13 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -994,7 +994,6 @@ int ca_pubkey_serialize(EVP_PKEY *, struct iked_id *); void ca_sslinit(void); void ca_sslerror(const char *); char *ca_asn1_name(uint8_t *, size_t); -char *ca_x509_name(void *); void *ca_x509_name_parse(char *); void ca_cert_info(const char *, X509 *); |