From: inoguchi Date: Mon, 28 Mar 2022 10:56:26 +0000 (+0000) Subject: Remove unused function cert_load in openssl(1) pkcs12 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=917dd50f5618579157a5aaea0603ca0dd1be2347;p=openbsd Remove unused function cert_load in openssl(1) pkcs12 ok tb@ --- diff --git a/usr.bin/openssl/pkcs12.c b/usr.bin/openssl/pkcs12.c index e1a89211c07..8d1ae415fa6 100644 --- a/usr.bin/openssl/pkcs12.c +++ b/usr.bin/openssl/pkcs12.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkcs12.c,v 1.16 2021/10/31 16:47:27 tb Exp $ */ +/* $OpenBSD: pkcs12.c,v 1.17 2022/03/28 10:56:26 inoguchi Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -88,7 +88,6 @@ int print_attribs(BIO *out, const STACK_OF(X509_ATTRIBUTE) *attrlst, const char *name); void hex_prin(BIO *out, unsigned char *buf, int len); int alg_print(BIO *x, const X509_ALGOR *alg); -int cert_load(BIO *in, STACK_OF(X509) *sk); static int set_pbe(BIO *err, int *ppbe, const char *str); static struct { @@ -1006,23 +1005,6 @@ alg_print(BIO *x, const X509_ALGOR *alg) return 1; } -/* Load all certificates from a given file */ - -int -cert_load(BIO *in, STACK_OF(X509) *sk) -{ - int ret; - X509 *cert; - ret = 0; - while ((cert = PEM_read_bio_X509(in, NULL, NULL, NULL))) { - ret = 1; - sk_X509_push(sk, cert); - } - if (ret) - ERR_clear_error(); - return ret; -} - /* Generalised attribute print: handle PKCS#8 and bag attributes */ void print_attribute(BIO *out, const ASN1_TYPE *av)