Add certificate-missing error code

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2019-12-03 09:41:58 +00:00
parent 24dd16ddff
commit 6f105c41c2
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74
3 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,7 @@ typedef enum {
SSL_CERT_ERR_CHAIN_SELF_SIGNED, /**< This certificate chain is self signed */
SSL_CERT_ERR_REVOKED, /**< This certificate has been revoked */
SSL_CERT_ERR_HOSTNAME_MISMATCH, /**< This certificate host did not match the server */
SSL_CERT_ERR_CERT_MISSING, /**< This certificate was missing from the chain, its data is useless */
} ssl_cert_err;
/** Always the max known ssl certificate error type */

View File

@ -1085,6 +1085,7 @@ en.all.SSLCertErrSelfSigned:The certificate is self signed.
en.all.SSLCertErrChainSelfSigned:The certificate chain is self signed.
en.all.SSLCertErrRevoked:The certificate has been revoked by the issuer.
en.all.SSLCertErrHostnameMismatch:The certificate is for a different host than the server
en.all.SSLCertErrCertMissing:The certificate was missing from the chain.
# Timeout error interface

View File

@ -445,6 +445,10 @@ const char *messages_get_sslcode(ssl_cert_err code)
/* Common name is invalid */
return messages_get_ctx("SSLCertErrHostnameMismatch", messages_hash);
case SSL_CERT_ERR_CERT_MISSING:
/* Common name is invalid */
return messages_get_ctx("SSLCertErrCertMissing", messages_hash);
}
/* The switch has no default, so the compiler should tell us when we