diff options
Diffstat (limited to 'xmlsecurity/source/dialogs/certificateviewer.cxx')
-rw-r--r-- | xmlsecurity/source/dialogs/certificateviewer.cxx | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 980bceec97c3..af2ffc4352ed 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -125,16 +125,8 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif //Verify the certificate sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(mpDlg->mxCert, Sequence<Reference<css::security::XCertificate> >()); - //We currently have two status - //These errors are alloweds - sal_Int32 validCertErrors = css::security::CertificateValidity::VALID - | css::security::CertificateValidity::UNKNOWN_REVOKATION; - //Build a mask to filter out the allowed errors - sal_Int32 mask = ~validCertErrors; - // "subtract" the allowed error flags from the result - sal_Int32 certErrors = certStatus & mask; - bool bCertValid = certErrors > 0 ? false : true; + bool bCertValid = certStatus == css::security::CertificateValidity::VALID ? true : false; bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); if ( !bCertValid ) @@ -485,16 +477,7 @@ void CertificateViewerCertPathTP::ActivatePage() //Verify the certificate sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(rCert, Sequence<Reference<css::security::XCertificate> >()); - //We currently have two status - //These errors are alloweds - sal_Int32 validCertErrors = css::security::CertificateValidity::VALID - | css::security::CertificateValidity::UNKNOWN_REVOKATION; - - //Build a mask to filter out the allowed errors - sal_Int32 mask = ~validCertErrors; - // "subtract" the allowed error flags from the result - sal_Int32 certErrors = certStatus & mask; - bool bCertValid = certErrors > 0 ? false : true; + bool bCertValid = certStatus == css::security::CertificateValidity::VALID ? true : false; pParent = InsertCert( pParent, sName, rCert, bCertValid); } |