Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2008-05-21 15:01:58 -0400
committerThomas Watson2008-05-21 15:01:58 -0400
commit32bd3c5a028e0f74023da2cc285007be5c0b1984 (patch)
treecc07954745734f7bfea567c7effbf002a326d591 /bundles
parent5a4f6842c5752721de973b9692361ea5d482eb22 (diff)
downloadrt.equinox.framework-32bd3c5a028e0f74023da2cc285007be5c0b1984.tar.gz
rt.equinox.framework-32bd3c5a028e0f74023da2cc285007be5c0b1984.tar.xz
rt.equinox.framework-32bd3c5a028e0f74023da2cc285007be5c0b1984.zip
Bug 232159 Can't access update site with 3.4.0 I20080502-0100v20080521-1400
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java b/bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java
index 643d7ca98..cd3ca9ecc 100644
--- a/bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java
+++ b/bundles/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java
@@ -112,11 +112,14 @@ public class KeyStoreTrustEngine extends TrustEngine {
rootCert = certChain[i]; // this is a self-signed certificate
} else {
// try to find a parent, we have an incomplete chain
- for (Enumeration e = store.aliases(); e.hasMoreElements();) {
- Certificate nextCert = store.getCertificate((String) e.nextElement());
- if (nextCert instanceof X509Certificate && ((X509Certificate) nextCert).getSubjectDN().equals(cert.getIssuerDN())) {
- cert.verify(nextCert.getPublicKey());
- rootCert = nextCert;
+ synchronized (store) {
+ for (Enumeration e = store.aliases(); e.hasMoreElements();) {
+ Certificate nextCert = store.getCertificate((String) e.nextElement());
+ if (nextCert instanceof X509Certificate && ((X509Certificate) nextCert).getSubjectDN().equals(cert.getIssuerDN())) {
+ cert.verify(nextCert.getPublicKey());
+ rootCert = nextCert;
+ break;
+ }
}
}
}

Back to the top