Is it good that the >>>>>'d line below
destroys part of the PKCS7 object it works with?

I cribbed from this code, and tried to use the
PKCS7 object afterward, only to find it wrecked,
tracking dozens of recursive calls, wondering
what went wrong.

- If this is wrong, please fix it.
- If it is not wrong, a note about what is
  going on in the code would be helpful.

- Bob

=============================================

        /* Ok, first we need to, for each subject entry, see if we can
verify */
        for (i=0; i<sk_PKCS7_SIGNER_INFO_num(sk); i++)
                {
                ASN1_UTCTIME *tm;
                char *str1,*str2;
                int rc;

                si=sk_PKCS7_SIGNER_INFO_value(sk,i);
                rc=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si);
                if (rc <= 0)
                        goto err;
                printf("signer info\n");
                if ((tm=get_signed_time(si)) != NULL)
                        {
                        BIO_printf(bio_out,"Signed time:");
                        ASN1_UTCTIME_print(bio_out,tm);
>>>>>           ASN1_UTCTIME_free(tm);
                        BIO_printf(bio_out,"\n");
                        }
                if (get_signed_seq2string(si,&str1,&str2))
                        {
                        BIO_printf(bio_out,"String 1 is %s\n",str1);
                        BIO_printf(bio_out,"String 2 is %s\n",str2);
                        }

                }

        X509_STORE_free(cert_store);



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to