CertificateValidationFlags Enumeration |
Namespace: MailBee.Security
Member name | Value | Description | |
---|---|---|---|
None | 0 | No errors. | |
IsNotTimeValid | 1 | This certificate or one of the certificates in the certificate chain is not time-valid. | |
IsNotTimeNested | 2 | Certificates in the chain are not properly time-nested. | |
IsRevoked | 4 | Trust for this certificate or one of the certificates in the chain has been revoked. | |
IsNotSignatureValid | 8 | The certificate or one of the certificates in the chain does not have a valid signature. | |
IsNotValidForUsage | 16 | The certificate or the chain is not valid in its proposed usage. | |
IsUntrustedRoot | 32 | The certificate or the chain is based on an untrusted root. | |
RevocationStatusUnknown | 64 | The revocation status of the certificate or one of the certificates in the chain is unknown. | |
IsCyclic | 128 | One of the certificates in the chain was issued by a certification authority which had certified the original certificate. | |
IsPartialChain | 65536 | The certificate chain is not complete. | |
IsNotTimeValidCtl | 131072 | A CTL used to create this chain was not time-valid. | |
IsNotSignatureValidCtl | 262144 | A CTL used to create this chain did not have a valid signature. | |
IsNotValidForUsageCtl | 524288 | A CTL used to create this chain is not valid for this usage. | |
NameMismatch | 16777216 | Certificate name mismatch. | |
All | 17760447 | All the flags listed above. |
Validate method returns CertificateValidationFlags value for the given certificate.
When checking S/MIME signatures of e-mail messages, you can use Verify(MailMessage, MessageVerificationFlags, CertificateStore) method which can perform complex verification of the message signature including validating its certificate.
When making SSL connections to mail servers, you can set AutoValidation property to tell MailBee to automatically validate the server certificate accordingly the specified criteria and throw MailBeeCertificateValidationException if the validation process fails for any of the criteria.