On Saturday 25 February 2017 12:22:09 Dr. Stephen Henson wrote:
 
> You can set the values in place using something like this:
> 
> unsigned char *tmps = NULL;
> int tmpslen;
> X509_SIG *sig = X509_SIG_new();
> X509_ALGOR *alg;
> ASN1_OCTET_STRING *digest;
> X509_SIG_getm(sig, &alg, &digest);
> X509_ALGOR_set0(alg, OBJ_nid2obj(type), V_ASN1_NULL, NULL);
> ASN1_STRING_set(digest, m, m_len);
> /* Allocate and encode */
> tmpslen = i2d_X509_SIG(&sig, &tmps);
> X509_SIG_free(sig);

Thanks. Totally clear now. But, I have to say, this method is badly named. It 
walks and 
talks like a set0() but is called getm(). This is why I assumed, the pointers 
may have 
been filled by X509_SIG_new() and I'd be responsible for them.

-- 
Melvyn Sopacua
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Reply via email to