On Thu, May 23, 2013 at 5:33 AM, Dr. Stephen Henson <st...@openssl.org>wrote:
> On Wed, May 22, 2013, Phillip Hellewell wrote: > > > Looking at the implementation of CMS_get0_signers(), it looks like it > > creates a new stack of X509 that I will have to free. > > It's midway between 1 and 0 ;-) > > The STACK needs to be freed buty not each individual member. So you call > sk_X509_free and NOT sk_X509_pop_free(). > Ah, I see. Hey, we should come up with a new prefix like "0_5" for that (j/k). So just to confirm: CMS_get0_signers(): free with sk_X509_free() CMS_get1_certs(): free with sk_X509_pop_free() CMS_get1_crls(): free with sk_X509_CRL_pop_free() Phillip