Fix for d2i_ASN1_bytes and stop PKCS#7 routines crashing is signed message
[oweals/openssl.git] / crypto / asn1 / asn1_mac.h
index a1bbfddc7ffdc55434794862795ca813db390f81..93f9c5193c507e90f84d6d89fe1c948a4922f47a 100644 (file)
@@ -64,8 +64,6 @@ extern "C" {
 #endif
 
 #include <openssl/asn1.h>
-#include <openssl/x509.h>
-#include <openssl/pkcs7.h>
 
 #ifndef ASN1_MAC_ERR_LIB
 #define ASN1_MAC_ERR_LIB       ERR_LIB_ASN1
@@ -163,6 +161,11 @@ err:\
                V_ASN1_CONSTRUCTED|V_ASN1_SET)))\
                { M_ASN1_D2I_get_set(r,func,free_func); }
 
+#define M_ASN1_D2I_get_set_opt_type(type,r,func,free_func) \
+       if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \
+               V_ASN1_CONSTRUCTED|V_ASN1_SET)))\
+               { M_ASN1_D2I_get_set_type(type,r,func,free_func); }
+
 #define M_ASN1_I2D_len_SET_opt(a,f) \
        if ((a != NULL) && (sk_num(a) != 0)) \
                M_ASN1_I2D_len_SET(a,f);