Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-01-26 15:32:25 +0000
committerSteffen Pingel2012-01-26 15:32:25 +0000
commitb288ef95b6bf3d92a3cade0a3b5fef49718e0b81 (patch)
treeba432f49177a2971f58ececb59c188b85ed184ee /org.eclipse.mylyn.commons.sdk.util
parent647da34a13a5ea9de578e46d28d278f49f8ada68 (diff)
downloadorg.eclipse.mylyn.commons-b288ef95b6bf3d92a3cade0a3b5fef49718e0b81.tar.gz
org.eclipse.mylyn.commons-b288ef95b6bf3d92a3cade0a3b5fef49718e0b81.tar.xz
org.eclipse.mylyn.commons-b288ef95b6bf3d92a3cade0a3b5fef49718e0b81.zip
NEW - bug 369805: certificate authentication with custom keystore fails
behind proxy https://bugs.eclipse.org/bugs/show_bug.cgi?id=369805
Diffstat (limited to 'org.eclipse.mylyn.commons.sdk.util')
-rw-r--r--org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/RepositoryTestFixture.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/RepositoryTestFixture.java b/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/RepositoryTestFixture.java
index 6433a799..d1f916db 100644
--- a/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/RepositoryTestFixture.java
+++ b/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/RepositoryTestFixture.java
@@ -157,12 +157,22 @@ public abstract class RepositoryTestFixture {
if (username != null && password != null) {
location.setCredentials(AuthenticationType.REPOSITORY, new UserCredentials(username, password));
}
- if (isUseCertificateAuthentication()) {
+ if (isUseCertificateAuthentication() && !forceDefaultKeystore(proxy)) {
location.setCredentials(AuthenticationType.CERTIFICATE, CommonTestUtil.getCertificateCredentials());
}
return location;
}
+ /**
+ * Don't set certificate credentials if behind proxy. See bug 369805 for details.
+ */
+ private boolean forceDefaultKeystore(Proxy proxy) {
+ if (proxy != null && System.getProperty("javax.net.ssl.keyStore") != null) {
+ return true;
+ }
+ return false;
+ }
+
public void setUseCertificateAuthentication(boolean useCertificateAuthentication) {
this.useCertificateAuthentication = useCertificateAuthentication;
}

Back to the top