A lot of things are undeclared unless x509.h is included.
[openssl.git] / crypto / pkcs7 / example.c
index 1539cd16037c6822b3b3894d7d16b947c8fde022..c993947cc378914c9fba3a6d7cd25176ddb67d85 100644 (file)
@@ -1,7 +1,9 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <openssl/pkcs7.h>
 #include <openssl/asn1_mac.h>
+#include <openssl/x509.h>
 
 int add_signed_time(PKCS7_SIGNER_INFO *si)
        {
@@ -25,7 +27,7 @@ ASN1_UTCTIME *get_signed_time(PKCS7_SIGNER_INFO *si)
        return NULL;
        }
        
-static signed_string_nid= -1;
+static int signed_string_nid= -1;
 
 void add_signed_string(PKCS7_SIGNER_INFO *si, char *str)
        {
@@ -68,7 +70,7 @@ int get_signed_string(PKCS7_SIGNER_INFO *si, char *buf, int len)
        return(0);
        }
 
-static signed_seq2string_nid= -1;
+static int signed_seq2string_nid= -1;
 /* ########################################### */
 int add_signed_seq2string(PKCS7_SIGNER_INFO *si, char *str1, char *str2)
        {