summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs/certificateviewer.cxx
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2009-11-13 13:51:33 +0100
committerJoachim Lingner <jl@openoffice.org>2009-11-13 13:51:33 +0100
commitcb83dca227b5f2738ef20f66989e5d6708901117 (patch)
treec9287f78ebf425b74913824ff87ea30b71bb0e75 /xmlsecurity/source/dialogs/certificateviewer.cxx
parentcd64c27de4ba66ade14aa5a977d4f7c02547387b (diff)
jl137: #i103420# fixed windows certificate verfification regarding revocation
Diffstat (limited to 'xmlsecurity/source/dialogs/certificateviewer.cxx')
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx21
1 files changed, 2 insertions, 19 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 7f04872f7a63..4efd22aadc32 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -128,16 +128,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 bIsDark = ( GetSettings().GetStyleSettings().GetWindowColor().IsDark() != FALSE );
if ( !bCertValid )
@@ -488,16 +480,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);
}