Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Oehm2011-09-07 14:51:17 +0000
committerTobias Oberlies2011-09-08 07:57:30 +0000
commit114c88c9dc5fa2ef2e97d58f4b30eabaec35fafb (patch)
treed861138d1e570dfb652609a8c64fba8bb3385cfe /bundles/org.eclipse.equinox.p2.director.app
parentcca13ad4e969670bcb3025d11ac5ec6b31c1ebf3 (diff)
downloadrt.equinox.p2-114c88c9dc5fa2ef2e97d58f4b30eabaec35fafb.tar.gz
rt.equinox.p2-114c88c9dc5fa2ef2e97d58f4b30eabaec35fafb.tar.xz
rt.equinox.p2-114c88c9dc5fa2ef2e97d58f4b30eabaec35fafb.zip
DirectorApplication: trust every certificatev20110908-0757
changed default behavior to accept not only unsigned jar files but also signed jar files that have no known root certificate Bug: 340345
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.director.app')
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
index 03a7569ad..4bdaa08fc 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
@@ -47,7 +47,7 @@ import org.osgi.framework.*;
import org.osgi.service.packageadmin.PackageAdmin;
public class DirectorApplication implements IApplication, ProvisioningListener {
- class AvoidTrustPromptService extends UIServices {
+ public static class AvoidTrustPromptService extends UIServices {
@Override
public AuthenticationInfo getUsernamePassword(String location) {
return null;
@@ -59,8 +59,17 @@ public class DirectorApplication implements IApplication, ProvisioningListener {
}
@Override
- public TrustInfo getTrustInfo(Certificate[][] untrustedChain, String[] unsignedDetail) {
- return new TrustInfo(null, false, true);
+ public TrustInfo getTrustInfo(Certificate[][] untrustedChains, String[] unsignedDetail) {
+ final Certificate[] trusted;
+ if (untrustedChains == null) {
+ trusted = null;
+ } else {
+ trusted = new Certificate[untrustedChains.length];
+ for (int i = 0; i < untrustedChains.length; i++) {
+ trusted[i] = untrustedChains[i][0];
+ }
+ }
+ return new TrustInfo(trusted, false, true);
}
}

Back to the top