Commit 1d97f708 authored by Albert Astals Cid's avatar Albert Astals Cid

Differentiate between unknown and untrusted issuer

parent 19e20dc6
......@@ -323,8 +323,10 @@ CertificateValidationStatus SignatureHandler::NSS_CertTranslate(SECErrorCodes ns
switch(nss_code)
{
case SEC_ERROR_UNKNOWN_ISSUER:
return CERTIFICATE_UNKNOWN_ISSUER;
case SEC_ERROR_UNTRUSTED_ISSUER:
return CERTIFICATE_UNTRUSTED;
return CERTIFICATE_UNTRUSTED_ISSUER;
case SEC_ERROR_REVOKED_CERTIFICATE:
return CERTIFICATE_REVOKED;
......
......@@ -6,6 +6,7 @@
//
// Copyright 2015 André Guerreiro <aguerreiro1985@gmail.com>
// Copyright 2015 André Esser <bepandre@hotmail.com>
// Copyright 2015 Albert Astals Cid <aacid@kde.org>
//
//========================================================================
......@@ -28,7 +29,8 @@ enum SignatureValidationStatus
enum CertificateValidationStatus
{
CERTIFICATE_TRUSTED,
CERTIFICATE_UNTRUSTED,
CERTIFICATE_UNTRUSTED_ISSUER,
CERTIFICATE_UNKNOWN_ISSUER,
CERTIFICATE_REVOKED,
CERTIFICATE_EXPIRED,
CERTIFICATE_GENERIC_ERROR,
......
......@@ -57,8 +57,11 @@ const char * getReadableCertState(CertificateValidationStatus cert_vs)
case CERTIFICATE_TRUSTED:
return "Certificate is Trusted.";
case CERTIFICATE_UNTRUSTED:
return "Certificate isn't Trusted.";
case CERTIFICATE_UNTRUSTED_ISSUER:
return "Certificate issuer isn't Trusted.";
case CERTIFICATE_UNKNOWN_ISSUER:
return "Certificate issuer is unknown.";
case CERTIFICATE_REVOKED:
return "Certificate has been Revoked.";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment