CERT_CHAIN_POLICY_STATUS structure (wincrypt.h)
The CERT_CHAIN_POLICY_STATUS structure holds certificate chain status information returned by the CertVerifyCertificateChainPolicy function when the certificate chains are validated.
Syntax
typedef struct _CERT_CHAIN_POLICY_STATUS {
DWORD cbSize;
DWORD dwError;
LONG lChainIndex;
LONG lElementIndex;
void *pvExtraPolicyStatus;
} CERT_CHAIN_POLICY_STATUS, *PCERT_CHAIN_POLICY_STATUS;
Members
cbSize
The size, in bytes, of this structure.
dwError
A value that indicates that an error or invalid condition was encountered during the validation process. The values of this member are specific to the policy type as specified by the value of the pszPolicyOID parameter of the CertVerifyCertificateChainPolicy function.
Base Policy errors (CERT_CHAIN_POLICY_BASE)
Value | Meaning |
---|---|
|
The signature of the certificate cannot be verified. |
|
The certificate or signature has been revoked. |
|
A certification chain processed correctly but terminated in a root certificate that is not trusted by the trust provider. |
|
The root certificate is a testing certificate, and policy settings disallow test certificates. |
|
A chain of certificates was not correctly created. |
|
The certificate is not valid for the requested usage. |
|
A required certificate is not within its validity period. |
|
The certificate has an invalid name. Either the name is not included in the permitted list, or it is explicitly excluded. |
|
The certificate has an invalid policy. |
|
The basic constraints of the certificate are not valid, or they are missing. |
|
The certificate is being used for a purpose other than the purpose specified by its CA. |
|
The validity periods of the certification chain do not nest correctly. |
|
The revocation function was unable to check revocation for the certificate. |
|
The revocation function was unable to check revocation because the revocation server was offline. |
Basic Constraints Policy errors (CERT_CHAIN_POLICY_BASIC_CONSTRAINTS).
Value | Meaning |
---|---|
|
The basic constraints of the certificate are not valid, or they are missing. |
Authenticode Policy errors (CERT_CHAIN_POLICY_AUTHENTICODE and CERT_CHAIN_POLICY_AUTHENTICODE_TS).
These errors are in addition to the Base Policy errors.
SSL Policy errors (CERT_CHAIN_POLICY_SSL).
These errors are in addition to the Base Policy errors.
Value | Meaning |
---|---|
|
A certification chain processed correctly but terminated in a root certificate that is not trusted by the trust provider. |
|
The certificate's CN name does not match the passed value. |
|
The certificate is being used for a purpose other than the purposes specified by its CA. |
|
A certificate that can only be used as an end-entity is being used as a CA or vice versa. |
Microsoft Root Policy errors (CERT_CHAIN_POLICY_MICROSOFT_ROOT).
Value | Meaning |
---|---|
|
A certification chain processed correctly but terminated in a root certificate that is not trusted by the trust provider. |
EV Policy errors.
Value | Meaning |
---|---|
|
The certificate chain to a trusted root authority could not be built. |
|
The certificate is not valid for the requested usage. |
lChainIndex
Index that indicates the chain in which an error or condition that is not valid was found. For more information, see Remarks.
lElementIndex
Index that indicates the element in a chain where an error or condition that is not valid was found. For more information, see Remarks.
pvExtraPolicyStatus
A pointer to a structure. The structure type is determined by the value of the pszPolicyOID parameter of the CertVerifyCertificateChainPolicy function. In addition to dwError errors, policy OID–specific extra status can also be returned here to provide additional chain status information. This pointer can be optionally set to point to an AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS structure.
Remarks
If both lChainIndex and lElementIndex are set to –1, the error or condition that is not valid applies to the whole chain context. If only lElementIndex is set to –1, the error or condition that is not valid applies to the chain indexed by lChainIndex. Otherwise, the error or condition that is not valid applies to the certificate element at pChainContext->rgpChain[lChainIndex]->rgpElement[lElementIndex].
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | wincrypt.h |