Split test/evptests.txt into separate files.
[oweals/openssl.git] / test / d2i_test.c
index 8dbb8f14ec658eb097eabfc4f14747460767c34c..527427009702b14042024fe4e3da66c88b372a54 100644 (file)
@@ -20,6 +20,9 @@
 #include <openssl/err.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
+#ifndef OPENSSL_NO_CMS
+# include <openssl/cms.h>
+#endif
 #include "e_os.h"
 
 static const ASN1_ITEM *item_type;
@@ -78,7 +81,7 @@ static int execute_test(D2I_TEST_FIXTURE fixture)
      * performs sanity checks on the input and can reject it before the
      * decoder is called.
      */
-    len = BIO_read(bio, buf, sizeof buf);
+    len = BIO_read(bio, buf, sizeof(buf));
     if (len < 0)
         goto err;
 
@@ -149,7 +152,10 @@ int main(int argc, char **argv)
         ASN1_ITEM_ref(ASN1_ANY),
         ASN1_ITEM_ref(X509),
         ASN1_ITEM_ref(GENERAL_NAME),
-        ASN1_ITEM_ref(ASN1_INTEGER)
+        ASN1_ITEM_ref(ASN1_INTEGER),
+#ifndef OPENSSL_NO_CMS
+        ASN1_ITEM_ref(CMS_ContentInfo)
+#endif
     };
 
     static error_enum expected_errors[] = {