From 116503cd51aa3195ce16a82ce9b789abe58a8928 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 5 Feb 2016 15:43:20 +0000 Subject: [PATCH] Only use compatibility macros for < 1.1 API. Reviewed-by: Rich Salz --- include/openssl/pkcs12.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/openssl/pkcs12.h b/include/openssl/pkcs12.h index d4862440f5..f97f95f68b 100644 --- a/include/openssl/pkcs12.h +++ b/include/openssl/pkcs12.h @@ -113,6 +113,8 @@ typedef struct pkcs12_bag_st PKCS12_BAGS; /* Compatibility macros */ +#if OPENSSL_API_COMPAT < 0x10100000L + # define M_PKCS12_x5092certbag PKCS12_x5092certbag # define M_PKCS12_x509crl2certbag PKCS12_x509crl2certbag @@ -131,7 +133,6 @@ typedef struct pkcs12_bag_st PKCS12_BAGS; # define M_PKCS12_cert_bag_type PKCS12_cert_bag_type # define M_PKCS12_crl_bag_type PKCS12_cert_bag_type -/* Compatibility macros for pre 1.1.0 function names */ # define PKCS12_certbag2x509 PKCS12_SAFEBAG_get1_cert # define PKCS12_certbag2scrl PKCS12_SAFEBAG_get1_crl # define PKCS12_get_attr PKCS12_SAFEBAG_get0_attr @@ -142,6 +143,8 @@ typedef struct pkcs12_bag_st PKCS12_BAGS; # define PKCS12_MAKE_KEYBAG PKCS12_SAFEBAG_create0_p8inf # define PKCS12_MAKE_SHKEYBAG PKCS12_SAFEBAG_create_pkcs8_encrypt +#endif + ASN1_TYPE *PKCS8_get_attr(PKCS8_PRIV_KEY_INFO *p8, int attr_nid); int PKCS12_mac_present(PKCS12 *p12); void PKCS12_get0_mac(ASN1_OCTET_STRING **pmac, X509_ALGOR **pmacalg, -- 2.25.1