Skip to content

Store context flags vs verification parameters flags #9042

@colmenero

Description

@colmenero

Version

5.8.2

Description

In OpenSSL X509_STORE_CTX_set_flags translates to X509_VERIFY_PARAM_set_flags (see here).
In wolfSSL, X509_STORE_CTX_set_flags sets the context flags (see here). These are not the same as the verification parameters flags (see here). They are both part of the WOLFSSL_X509_STORE_CTX, where we have a flags member and a param->flags member. What is the difference between them?

Setting the X509_V_FLAG_PARTIAL_CHAIN flag in the verification parameter doesn't affect how the certificate is verified, but setting the context's flag does affect it. The relevant code is here). wolfSSL checks for the context flags and the store verification parameter flags, but not the context verification parameter flags. Basically, we have to use:

X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_PARTIAL_CHAIN);

This is a difference in behavior with respect to OpenSSL, and I'm wondering if the two types of flags in the context are needed.

Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions