GnuTLS: X.509 errors
Our goal is to simplify the ecosystem by consolidating the errors and their documentation (similarly to web documentation) and better explaining what the validation errors mean.
Correctly validating X.509 certificates turns out to be pretty complicated (e.g., Georgiev2012, Ukrop2019). Yet certificate validation is crucial for secure communication on the Internet (think TLS).
For every error, we aim to provide our redesigned documentation ( ), an example certificate ( ), original documentation provided by the library ( , unused or deprecated errors denoted by ). Furthermore, we provide links to corresponding errors from other libraries ( ). In the future, we plan on adding error frequencies based on IP-wide scans and elaborating on the consequences of individual errors.
Time validity errors
Errors occuring when a certificate is outside its validity period or when it is revoked by its CA.
Relevant links: Certificate Validity (RFC 5280), Certificate Revocation (RFC 5280)
Original documentation:
The certificate is not yet activated. (source)
Original error message:
The certificate chain uses not yet valid certificate. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_CERT_NOT_ACTIVATED in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case not-yet-valid (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_CERT_NOT_ACTIVATED in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
- OpenSSL: X509_V_ERR_CERT_NOT_YET_VALID
- Botan: CERT_NOT_YET_VALID
- Mbed TLS: MBEDTLS_X509_BADCERT_FUTURE
Original documentation:
The certificate has expired. (source)
Original error message:
The certificate chain uses expired certificate. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_CERT_EXPIRED in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case expired (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_CERT_EXPIRED in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
- OpenSSL: X509_V_ERR_CERT_HAS_EXPIRED
- Botan: CERT_HAS_EXPIRED
- Mbed TLS: MBEDTLS_X509_BADCERT_EXPIRED
Trust or chain related errors
These errors occur when the trust chain to the root certificate is not built correctly or fails.
Relevant links: Certificate Paths (RFC 5280), Certificate Revocation Lists (RFC 5280), OCSP (RFC 2560)
Original documentation:
The certificate is not signed by one of the known authorities or the signature is invalid (deprecated by the flags GNUTLS_CERT_SIGNATURE_FAILURE and GNUTLS_CERT_SIGNER_NOT_FOUND ). (source)
Original error message:
The certificate is not signed by one of the known authorities or the signature is invalid. (source)
Unused: The documentation states that this error code is not used anymore.
Original documentation:
The certificate’s issuer is not known. This is the case if the issuer is not included in the trusted certificate list. (source)
Original error message:
The certificate issuer is unknown. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_CERT_SIGNER_NOT_FOUND in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case chain-loop (see the generation script)
- Case issuer-no-match-subject (see the generation script)
- Case self-signed-intermediate (see the generation script)
- Case unknown-root-cn (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_CERT_SIGNER_NOT_FOUND in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
(No detailed documentation provided by the library.)
Original error message:
The OCSP response provided doesn’t match the available certificates (source)
Basic extension errors
Errors related to extensions in general or to the BasicConstraints standard extension.
Relevant links: Certificate Extensions (RFC 5280), BasicConstraints Extension (RFC 5280)
Original documentation:
The certificate has extensions marked as critical which are not supported. (source)
Original error message:
The certificate contains an unknown critical extension. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_CERT_UNKNOWN_CRIT_EXTENSIONS in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case empty-ip-addr-blocks (see the generation script)
- Case ip-addr-blocks-no-subset (see the generation script)
- Case unknown-critical-extension (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_CERT_UNKNOWN_CRIT_EXTENSIONS in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
Original documentation:
The certificate’s signer was not a CA. This may happen if this was a version 1 certificate, which is common with some CAs, or a version 3 certificate without the basic constrains extension. (source)
Original error message:
The certificate issuer is not a CA. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_CERT_SIGNER_NOT_CA in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case issuer-ca-false (see the generation script)
- Case proxy-length-exceeded (see the generation script)
- Case proxy-name-no-match-issuer (see the generation script)
- Case proxy-with-san (see the generation script)
- Case valid-proxy (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_CERT_SIGNER_NOT_CA in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
- OpenSSL: X509_V_ERR_INVALID_CA, X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED, X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION, X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY, X509_V_OK
- Botan: CA_CERT_NOT_FOR_CERT_ISSUER, UNKNOWN_CRITICAL_EXTENSION
- Mbed TLS: MBEDTLS_X509_BADCERT_NOT_TRUSTED, MBEDTLS_ERR_X509_INVALID_EXTENSIONS
Name related errors
Errors signalizing problems with either hostname verification, NameConstaints standard extension or IP Address Delegation extension.
Relevant links: NameConstaints extension (RFC 5280), IP Address Delegation extension (RFC 3779), Certificate Common Name (RFC 5280)
Original documentation:
The owner is not the expected one. (source)
Original error message:
The name in the certificate does not match the expected. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_CERT_UNEXPECTED_OWNER in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case empty-subject-and-no-san (see the generation script)
- Case host-no-match-cn (see the generation script)
- Case nc-empty (see the generation script)
- Case nc-excluded-violation (see the generation script)
- Case nc-maximum-present (see the generation script)
- Case nc-minimum-not-zero (see the generation script)
- Case nc-permitted-violation (see the generation script)
- Case proxy-length-exceeded (see the generation script)
- Case proxy-with-san (see the generation script)
- Case unknown-ext-key-usage (see the generation script)
- Case valid-proxy (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_CERT_UNEXPECTED_OWNER in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
- OpenSSL: X509_V_OK, X509_V_ERR_EXCLUDED_VIOLATION, X509_V_ERR_SUBTREE_MINMAX, X509_V_ERR_PERMITTED_VIOLATION, X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED, X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
- Botan: CERT_NAME_NOMATCH, ENCODING_ERROR, VERIFIED, NAME_CONSTRAINT_ERROR, UNKNOWN_CRITICAL_EXTENSION, INVALID_USAGE
- Mbed TLS: MBEDTLS_X509_BADCERT_CN_MISMATCH, MBEDTLS_ERR_X509_INVALID_EXTENSIONS, MBEDTLS_X509_BADCERT_EXT_KEY_USAGE
Original documentation:
The certificate’s signer constraints were violated. (source)
Original error message:
The certificate chain violates the signer's constraints. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case bc-path-len-exceeded (see the generation script)
- Case nc-excluded-violation (see the generation script)
- Case nc-maximum-present (see the generation script)
- Case nc-minimum-not-zero (see the generation script)
- Case nc-permitted-violation (see the generation script)
- Case nc-unknown-name-type (see the generation script)
- Case no-certsign-in-keyusage (see the generation script)
- Case proxy-length-exceeded (see the generation script)
- Case proxy-name-no-match-issuer (see the generation script)
- Case proxy-with-san (see the generation script)
- Case valid-proxy (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
- OpenSSL: X509_V_ERR_PATH_LENGTH_EXCEEDED, X509_V_ERR_EXCLUDED_VIOLATION, X509_V_ERR_SUBTREE_MINMAX, X509_V_ERR_PERMITTED_VIOLATION, X509_V_ERR_INVALID_CA, X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED, X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION, X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY, X509_V_OK
- Botan: CERT_CHAIN_TOO_LONG, VERIFIED, NAME_CONSTRAINT_ERROR, UNKNOWN_CRITICAL_EXTENSION, CA_CERT_NOT_FOR_CERT_ISSUER
- Mbed TLS: MBEDTLS_X509_BADCERT_NOT_TRUSTED, MBEDTLS_ERR_X509_INVALID_EXTENSIONS
Usage and policy errors
Errors related to standard extensions CertificatePolicies, KeyUsage and ExtendedKeyUsage.
Relevant links: KeyUsage extension (RFC5280), ExtendedKeyUsage extension (RFC5280), CertificatePolicies extension (RFC5280)
(No detailed documentation provided by the library.)
Original error message:
Key usage violation in certificate has been detected. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_E_KEY_USAGE_VIOLATION in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case chain-loop (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_E_KEY_USAGE_VIOLATION in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
Algorithm related errors
Various errors signalizing usage of invalid or deprecated algorithms.
Relevant links: Algorithm and Key Size Profile for PKI (RFC 7935), Suite B Profile for TLS (RFC 6460)
Original documentation:
The certificate was signed using an insecure algorithm such as MD2 or MD5. These algorithms have been broken and should not be trusted. (source)
Original error message:
The certificate chain uses insecure algorithm. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_CERT_INSECURE_ALGORITHM in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case end-entity-rsa-key-1024 (see the generation script)
- Case issuer-hash-md5 (see the generation script)
- Case issuer-rsa-key-1024 (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_CERT_INSECURE_ALGORITHM in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
Formatting errors
These errors occur when a field of the certificate/CRL contains invalid values or is badly formatted.
Relevant links: Certificate Signature (RFC 5280), Certificate Time formatting (RFC 5280), Certificate Signature Algorithm (RFC 5280)
Original documentation:
The signature verification failed. (source)
Original error message:
The signature in the certificate is invalid. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_CERT_SIGNATURE_FAILURE in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case invalid-signature (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_CERT_SIGNATURE_FAILURE in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
- OpenSSL: X509_V_ERR_CERT_SIGNATURE_FAILURE
- Botan: SIGNATURE_ERROR
- Mbed TLS: MBEDTLS_X509_BADCERT_NOT_TRUSTED
(No detailed documentation provided by the library.)
Original error message:
Error in the certificate. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_E_CERTIFICATE_ERROR in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case duplicate-bc-extension (see the generation script)
- Case issuer-pubkey-info-invalid-oid (see the generation script)
- Case issuer-pubkey-invalid-oid-and-signature (see the generation script)
- Case pubkey-info-invalid-oid (see the generation script)
- Case san-empty-email (see the generation script)
- Case signature-algorithm-mismatch (see the generation script)
- Case v1-cert-with-extensions (see the generation script)
- Case wrong-signature-algorithm (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_E_CERTIFICATE_ERROR in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
- OpenSSL: X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY, X509_V_ERR_EE_KEY_TOO_SMALL, X509_V_ERR_UNSUPPORTED_NAME_SYNTAX, X509_V_ERR_EXTENSIONS_REQUIRE_VERSION_3, X509_V_ERR_CERT_SIGNATURE_FAILURE
- Botan: DUPLICATE_CERT_EXTENSION, TLS_EXCEPTION, DECODING_ERROR, VERIFIED
- Mbed TLS: MBEDTLS_ERR_X509_INVALID_EXTENSIONS, MBEDTLS_ERR_X509_INVALID_FORMAT, MBEDTLS_ERR_X509_SIG_MISMATCH
(No detailed documentation provided by the library.)
Original error message:
The certificate type is not supported. (source)
(No detailed documentation provided by the library.)
Original error message:
Unknown Subject Alternative name in X.509 certificate. (source)
(No detailed documentation provided by the library.)
Original error message:
ASN1 parser: Error in DER parsing. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_E_ASN1_DER_ERROR in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case notafter-field-invalid (see the generation script)
- Case notbefore-field-invalid (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_E_ASN1_DER_ERROR in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
(No detailed documentation provided by the library.)
Original error message:
The certificate has unsupported attributes. (source)
(No detailed documentation provided by the library.)
Original error message:
The OID is not supported. (source)
(No detailed documentation provided by the library.)
Original error message:
Duplicate extension in X.509 certificate. (source)
Uncategorized errors
These errors are not yet categorized, deprecated or not used at all.
(No detailed documentation provided by the library.)
Original error message:
The certificate is trusted. (source)
Example certificates
Below you can download one or more example malformed certificates causing GNUTLS_E_SUCCESS in GnuTLS. If you are interested in generating these certificates yourself, see the corresponding generating script for each case on the project Github.
- Case any-ext-key-usage (see the generation script)
- Case bc-not-critical-ca (see the generation script)
- Case bc-path-len-in-non-ca (see the generation script)
- Case bc-path-len-negative (see the generation script)
- Case cert_revoked (see the generation script)
- Case crl_has_expired (see the generation script)
- Case crl_not_yet_valid (see the generation script)
- Case crl_path_validation_error (see the generation script)
- Case crl_signature_failure (see the generation script)
- Case different_crl_scope (see the generation script)
- Case empty-ext-key-usage (see the generation script)
- Case error_in_crl_last_update_field (see the generation script)
- Case error_in_crl_next_update_field (see the generation script)
- Case keyusage_no_crl_sign (see the generation script)
- Case negative-serial-number (see the generation script)
- Case no-key-usage-in-ca (see the generation script)
- Case proxy-ca (see the generation script)
- Case san-null-byte-in-email (see the generation script)
- Case trusted-only-intermediate (see the generation script)
- Case unable_to_get_crl (see the generation script)
- Case unhandled_critical_crl_extension (see the generation script)
- Case v4-cert (see the generation script)
- Case valid-with-aia (see the generation script)
- Case valid-with-crldp (see the generation script)
- Case valid (see the generation script)
Corresponding errors
What validation errors do other libraries give for certificates causing GNUTLS_E_SUCCESS in GnuTLS? Below, you can see the basic overview based on the example certificates from the previous section. (The list may be incomplete.)
- OpenSSL: X509_V_ERR_CA_BCONS_NOT_CRITICAL, X509_V_ERR_PATHLEN_WITHOUT_KU_KEY_CERT_SIGN, X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY, X509_V_ERR_CERT_REVOKED, X509_V_ERR_CRL_HAS_EXPIRED, X509_V_ERR_CRL_NOT_YET_VALID, X509_V_ERR_CRL_PATH_VALIDATION_ERROR, X509_V_ERR_CRL_SIGNATURE_FAILURE, X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD, X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD, X509_V_ERR_KEYUSAGE_NO_CRL_SIGN, X509_V_OK, X509_V_ERR_CA_CERT_MISSING_KEY_USAGE, X509_V_ERR_INVALID_NON_CA, X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT, X509_V_ERR_UNABLE_TO_GET_CRL, X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION
- Botan: INVALID_USAGE, VERIFIED, UNKNOWN_CRITICAL_EXTENSION, CERT_ISSUER_NOT_FOUND, DECODING_ERROR
- Mbed TLS: MBEDTLS_OK, MBEDTLS_ERR_X509_INVALID_EXTENSIONS
About the project
The project is developed at the Centre for Research on Cryptography and Security (CRoCS) at Masaryk University, Brno, Czech Republic by Martin Ukrop, Pavol Žáčik, Marián Svitek, Eric Valčík with the help of Michaela Balážová and Matěj Grabovský. For more details, see the ReadMe file in the project repository on GitHub.
The authors are grateful for the financial support by Red Hat Czech and Kiwi.com.