Add workarounds for some symbols that are hidden under !LIBRESSL_INTERNAL
authortb <tb@openbsd.org>
Wed, 3 Aug 2022 20:17:38 +0000 (20:17 +0000)
committertb <tb@openbsd.org>
Wed, 3 Aug 2022 20:17:38 +0000 (20:17 +0000)
until the next bump exposes new symbols that we can use.

usr.bin/openssl/pkcs12.c

index b725d77..6195a2c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkcs12.c,v 1.20 2022/04/28 15:42:10 inoguchi Exp $ */
+/* $OpenBSD: pkcs12.c,v 1.21 2022/08/03 20:17:38 tb Exp $ */
 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project.
  */
 #include <openssl/pem.h>
 #include <openssl/pkcs12.h>
 
+/* XXX: temporary workarounds until the next libcrypto bump. */
+#define PKCS12_get_attr(bag, attr_nid) \
+                        PKCS12_get_attr_gen(bag->attrib, attr_nid)
+#undef PKCS12_certbag2x509
+X509 *PKCS12_certbag2x509(PKCS12_SAFEBAG *bag);
+
 #define NOKEYS         0x1
 #define NOCERTS        0x2
 #define INFO           0x4