X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fpkcs7%2Fexample.c;h=2953d04b5c905e54a37c9dd7e0c1308be80b3852;hb=1a9d60d2e3b02d5e1954fc71c92bf3a6af691495;hp=1539cd16037c6822b3b3894d7d16b947c8fde022;hpb=5fe2085bbaee223088800f00d7e702542579a3d7;p=oweals%2Fopenssl.git diff --git a/crypto/pkcs7/example.c b/crypto/pkcs7/example.c index 1539cd1603..2953d04b5c 100644 --- a/crypto/pkcs7/example.c +++ b/crypto/pkcs7/example.c @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include 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) { @@ -121,7 +123,7 @@ int get_signed_seq2string(PKCS7_SIGNER_INFO *si, char **str1, char **str2) so=PKCS7_get_signed_attribute(si,signed_seq2string_nid); if (so && (so->type == V_ASN1_SEQUENCE)) { - ASN1_CTX c; + ASN1_const_CTX c; ASN1_STRING *s; long length; ASN1_OCTET_STRING *os1,*os2; @@ -142,7 +144,7 @@ int get_signed_seq2string(PKCS7_SIGNER_INFO *si, char **str1, char **str2) goto err; c.slen-=(c.p-c.q); - if (!asn1_Finish(&c)) goto err; + if (!asn1_const_Finish(&c)) goto err; *str1=malloc(os1->length+1); *str2=malloc(os2->length+1); memcpy(*str1,os1->data,os1->length); @@ -288,7 +290,7 @@ int sk_get_seq2string(STACK_OF(X509_ATTRIBUTE) *sk, char **str1, char **str2) so=PKCS7_get_signed_attribute(&si,signed_seq2string_nid); if (so->type == V_ASN1_SEQUENCE) { - ASN1_CTX c; + ASN1_const_CTX c; ASN1_STRING *s; long length; ASN1_OCTET_STRING *os1,*os2; @@ -309,7 +311,7 @@ int sk_get_seq2string(STACK_OF(X509_ATTRIBUTE) *sk, char **str1, char **str2) goto err; c.slen-=(c.p-c.q); - if (!asn1_Finish(&c)) goto err; + if (!asn1_const_Finish(&c)) goto err; *str1=malloc(os1->length+1); *str2=malloc(os2->length+1); memcpy(*str1,os1->data,os1->length);