From 95b7defd486f5736d9f91a6f71156c20f91756e9 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 20 Aug 2022 09:16:18 +0000 Subject: Add an empty pkcs12_local.h and include it where it will soon be needed. --- src/lib/libcrypto/Makefile | 3 +- src/lib/libcrypto/pkcs12/p12_add.c | 4 +- src/lib/libcrypto/pkcs12/p12_asn.c | 4 +- src/lib/libcrypto/pkcs12/p12_attr.c | 3 +- src/lib/libcrypto/pkcs12/p12_crt.c | 4 +- src/lib/libcrypto/pkcs12/p12_init.c | 4 +- src/lib/libcrypto/pkcs12/p12_kiss.c | 4 +- src/lib/libcrypto/pkcs12/p12_mutl.c | 3 +- src/lib/libcrypto/pkcs12/p12_npas.c | 3 +- src/lib/libcrypto/pkcs12/p12_sbag.c | 3 +- src/lib/libcrypto/pkcs12/p12_utl.c | 4 +- src/lib/libcrypto/pkcs12/pkcs12_local.h | 66 +++++++++++++++++++++++++++++++++ 12 files changed, 94 insertions(+), 11 deletions(-) create mode 100644 src/lib/libcrypto/pkcs12/pkcs12_local.h (limited to 'src') diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile index 714f6e80b4..a3091616a5 100644 --- a/src/lib/libcrypto/Makefile +++ b/src/lib/libcrypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.78 2022/08/03 20:16:06 tb Exp $ +# $OpenBSD: Makefile,v 1.79 2022/08/20 09:16:18 tb Exp $ LIB= crypto LIBREBUILD=y @@ -43,6 +43,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/hmac CFLAGS+= -I${LCRYPTO_SRC}/kdf CFLAGS+= -I${LCRYPTO_SRC}/modes CFLAGS+= -I${LCRYPTO_SRC}/ocsp +CFLAGS+= -I${LCRYPTO_SRC}/pkcs12 CFLAGS+= -I${LCRYPTO_SRC}/rsa CFLAGS+= -I${LCRYPTO_SRC}/ts CFLAGS+= -I${LCRYPTO_SRC}/x509 diff --git a/src/lib/libcrypto/pkcs12/p12_add.c b/src/lib/libcrypto/pkcs12/p12_add.c index e423c76411..d9de395c5b 100644 --- a/src/lib/libcrypto/pkcs12/p12_add.c +++ b/src/lib/libcrypto/pkcs12/p12_add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_add.c,v 1.18 2022/08/03 20:16:06 tb Exp $ */ +/* $OpenBSD: p12_add.c,v 1.19 2022/08/20 09:16:18 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -61,6 +61,8 @@ #include #include +#include "pkcs12_local.h" + /* Pack an object into an OCTET STRING and turn into a safebag */ PKCS12_SAFEBAG * diff --git a/src/lib/libcrypto/pkcs12/p12_asn.c b/src/lib/libcrypto/pkcs12/p12_asn.c index 5103e093ee..f8239eac62 100644 --- a/src/lib/libcrypto/pkcs12/p12_asn.c +++ b/src/lib/libcrypto/pkcs12/p12_asn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_asn.c,v 1.11 2022/07/24 18:48:04 tb Exp $ */ +/* $OpenBSD: p12_asn.c,v 1.12 2022/08/20 09:16:18 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -61,6 +61,8 @@ #include #include +#include "pkcs12_local.h" + /* PKCS#12 ASN1 module */ static const ASN1_TEMPLATE PKCS12_seq_tt[] = { diff --git a/src/lib/libcrypto/pkcs12/p12_attr.c b/src/lib/libcrypto/pkcs12/p12_attr.c index 01a7a3ea8c..989a1476c2 100644 --- a/src/lib/libcrypto/pkcs12/p12_attr.c +++ b/src/lib/libcrypto/pkcs12/p12_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_attr.c,v 1.16 2022/08/03 20:16:06 tb Exp $ */ +/* $OpenBSD: p12_attr.c,v 1.17 2022/08/20 09:16:18 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -60,6 +60,7 @@ #include +#include "pkcs12_local.h" #include "x509_lcl.h" /* Add a local keyid to a safebag */ diff --git a/src/lib/libcrypto/pkcs12/p12_crt.c b/src/lib/libcrypto/pkcs12/p12_crt.c index dbcfd25478..794b749fb8 100644 --- a/src/lib/libcrypto/pkcs12/p12_crt.c +++ b/src/lib/libcrypto/pkcs12/p12_crt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_crt.c,v 1.19 2022/08/03 20:16:06 tb Exp $ */ +/* $OpenBSD: p12_crt.c,v 1.20 2022/08/20 09:16:18 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -61,6 +61,8 @@ #include #include +#include "pkcs12_local.h" + static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags, PKCS12_SAFEBAG *bag); diff --git a/src/lib/libcrypto/pkcs12/p12_init.c b/src/lib/libcrypto/pkcs12/p12_init.c index 13dbe3664a..e305bde13a 100644 --- a/src/lib/libcrypto/pkcs12/p12_init.c +++ b/src/lib/libcrypto/pkcs12/p12_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_init.c,v 1.13 2022/01/20 11:18:49 inoguchi Exp $ */ +/* $OpenBSD: p12_init.c,v 1.14 2022/08/20 09:16:18 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -61,6 +61,8 @@ #include #include +#include "pkcs12_local.h" + /* Initialise a PKCS12 structure to take data */ PKCS12 * diff --git a/src/lib/libcrypto/pkcs12/p12_kiss.c b/src/lib/libcrypto/pkcs12/p12_kiss.c index 42a84a5458..f755185644 100644 --- a/src/lib/libcrypto/pkcs12/p12_kiss.c +++ b/src/lib/libcrypto/pkcs12/p12_kiss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_kiss.c,v 1.24 2022/08/03 20:16:06 tb Exp $ */ +/* $OpenBSD: p12_kiss.c,v 1.25 2022/08/20 09:16:18 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -61,6 +61,8 @@ #include #include +#include "pkcs12_local.h" + /* Simplified PKCS#12 routines */ static int parse_pk12( PKCS12 *p12, const char *pass, int passlen, diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c index 5c9cea90db..b1aafe9b8e 100644 --- a/src/lib/libcrypto/pkcs12/p12_mutl.c +++ b/src/lib/libcrypto/pkcs12/p12_mutl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_mutl.c,v 1.31 2022/08/03 20:16:06 tb Exp $ */ +/* $OpenBSD: p12_mutl.c,v 1.32 2022/08/20 09:16:18 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -70,6 +70,7 @@ #include "evp_locl.h" #include "hmac_local.h" +#include "pkcs12_local.h" #include "x509_lcl.h" int diff --git a/src/lib/libcrypto/pkcs12/p12_npas.c b/src/lib/libcrypto/pkcs12/p12_npas.c index 62ec368af7..7141e3ce88 100644 --- a/src/lib/libcrypto/pkcs12/p12_npas.c +++ b/src/lib/libcrypto/pkcs12/p12_npas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_npas.c,v 1.14 2021/11/01 20:53:08 tb Exp $ */ +/* $OpenBSD: p12_npas.c,v 1.15 2022/08/20 09:16:18 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -63,6 +63,7 @@ #include #include +#include "pkcs12_local.h" #include "x509_lcl.h" /* PKCS#12 password change routine */ diff --git a/src/lib/libcrypto/pkcs12/p12_sbag.c b/src/lib/libcrypto/pkcs12/p12_sbag.c index 4e9f7ed3dd..cbcb02d23c 100644 --- a/src/lib/libcrypto/pkcs12/p12_sbag.c +++ b/src/lib/libcrypto/pkcs12/p12_sbag.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_sbag.c,v 1.4 2022/08/03 20:16:06 tb Exp $ */ +/* $OpenBSD: p12_sbag.c,v 1.5 2022/08/20 09:16:18 tb Exp $ */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project * 1999-2018. @@ -62,6 +62,7 @@ #include #include +#include "pkcs12_local.h" #include "x509_lcl.h" const ASN1_TYPE * diff --git a/src/lib/libcrypto/pkcs12/p12_utl.c b/src/lib/libcrypto/pkcs12/p12_utl.c index 8efe7a2653..5c15720e21 100644 --- a/src/lib/libcrypto/pkcs12/p12_utl.c +++ b/src/lib/libcrypto/pkcs12/p12_utl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p12_utl.c,v 1.17 2022/08/03 20:16:06 tb Exp $ */ +/* $OpenBSD: p12_utl.c,v 1.18 2022/08/20 09:16:18 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -62,6 +62,8 @@ #include +#include "pkcs12_local.h" + /* Cheap and nasty Unicode stuff */ unsigned char * diff --git a/src/lib/libcrypto/pkcs12/pkcs12_local.h b/src/lib/libcrypto/pkcs12/pkcs12_local.h new file mode 100644 index 0000000000..c5a0de36c9 --- /dev/null +++ b/src/lib/libcrypto/pkcs12/pkcs12_local.h @@ -0,0 +1,66 @@ +/* $OpenBSD: pkcs12_local.h,v 1.1 2022/08/20 09:16:18 tb Exp $ */ +/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL + * project 1999. + */ +/* ==================================================================== + * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * licensing@OpenSSL.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + +#ifndef HEADER_PKCS12_LOCAL_H +#define HEADER_PKCS12_LOCAL_H + +__BEGIN_HIDDEN_DECLS + +__END_HIDDEN_DECLS + +#endif /* HEADER_PKCS12_LOCAL_H */ -- cgit v1.2.3-55-g6feb