Help needed with X509_STORE_CTX structure

Viktor Dukhovni openssl-users at dukhovni.org
Mon May 9 06:19:54 UTC 2022


On Mon, May 09, 2022 at 06:00:14AM +0000, Srinivas, Saketh (c) wrote:

> I need to set the current_issuer field in an object of the
> X509_STORE_CTX structure. Can any suggest the setter function for
> this.

You almost certainly don't *need* to do this.  What is the actual
high-level task you're trying to achieve.

X509_STORE_CTX is used with X509_verify_cert():

    https://www.openssl.org/docs/manmaster/man3/X509_verify_cert.html

to verify a certificate chain.  The "current_issuer" field is filled in
so it can be read by callbacks, setting it in user code makes little
sense.

Note that the X509_STORE_CTX structure is not opaque, and you can just
set its fields, but in this is case it is likely a bad idea to do that.

> Also, current_crl_score and current_reasons also are needed to be 0
> for me. Can you suggest setters for these variables.

Ditto.

-- 
    Viktor.


More information about the openssl-users mailing list