POD: Fix list termination
[openssl.git] / crypto / pkcs7 / example.c
index f6656be28e19b30de5bc0039cb0959003d216c73..4dcfe6c37cbd1b4229ed902c1719e2f9d1200079 100644 (file)
@@ -3,6 +3,7 @@
 #include <string.h>
 #include <openssl/pkcs7.h>
 #include <openssl/asn1_mac.h>
+#include <openssl/x509.h>
 
 int add_signed_time(PKCS7_SIGNER_INFO *si)
        {
@@ -122,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;
@@ -131,7 +132,7 @@ int get_signed_seq2string(PKCS7_SIGNER_INFO *si, char **str1, char **str2)
                c.p=ASN1_STRING_data(s);
                c.max=c.p+ASN1_STRING_length(s);
                if (!asn1_GetSequence(&c,&length)) goto err;
-               /* Length is the length of the seqence */
+               /* Length is the length of the sequence */
 
                c.q=c.p;
                if ((os1=d2i_ASN1_OCTET_STRING(NULL,&c.p,c.slen)) == NULL) 
@@ -143,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);
@@ -289,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;
@@ -298,7 +299,7 @@ int sk_get_seq2string(STACK_OF(X509_ATTRIBUTE) *sk, char **str1, char **str2)
                c.p=ASN1_STRING_data(s);
                c.max=c.p+ASN1_STRING_length(s);
                if (!asn1_GetSequence(&c,&length)) goto err;
-               /* Length is the length of the seqence */
+               /* Length is the length of the sequence */
 
                c.q=c.p;
                if ((os1=d2i_ASN1_OCTET_STRING(NULL,&c.p,c.slen)) == NULL) 
@@ -310,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);