From 2ba449b0db5f0241789c2da4a0568c138cef8a3f Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 30 Apr 2024 09:26:16 -0400 Subject: [PATCH 1/6] Adding org.eclipse.core.pki capability --- .../p2/transport/ecf/RepositoryTransport.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java index d8789e8cfe..9d77a44698 100644 --- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java +++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java @@ -15,9 +15,11 @@ import java.io.*; import java.net.*; +import java.security.NoSuchAlgorithmException; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; +import javax.net.ssl.SSLContext; import org.eclipse.core.runtime.*; import org.eclipse.ecf.core.identity.IDCreateException; import org.eclipse.ecf.core.security.ConnectContextFactory; @@ -95,7 +97,18 @@ public RepositoryTransport(IProvisioningAgent agent) { @Override public IStatus download(URI toDownload, OutputStream target, IProgressMonitor monitor) { boolean promptUser = false; + boolean useJREHttp = false; + try { + // DELMARVA - is org.eclipse.core.pki installed and configured + if (SSLContext.getDefault().getProvider().getName().contains("PKCS")) { //$NON-NLS-1$ + useJREHttp = true; + Activator.getDefault().useJREHttpClient(); + } + } catch (NoSuchAlgorithmException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } AuthenticationInfo loginDetails = null; URI secureToDownload; try { From 27dbca0cc8c01570a1ff0e638198f122fec7d6df Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 2 May 2024 08:24:28 -0400 Subject: [PATCH 2/6] Check if PKI has been installed and configured --- .../equinox/internal/p2/transport/ecf/RepositoryTransport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java index 9d77a44698..2d4e85e0d4 100644 --- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java +++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java @@ -101,7 +101,7 @@ public IStatus download(URI toDownload, OutputStream target, IProgressMonitor mo boolean useJREHttp = false; try { // DELMARVA - is org.eclipse.core.pki installed and configured - if (SSLContext.getDefault().getProvider().getName().contains("PKCS")) { //$NON-NLS-1$ + if (SSLContext.getDefault().getProvider().getName().contains("TLS")) { //$NON-NLS-1$ useJREHttp = true; Activator.getDefault().useJREHttpClient(); } From 2c2b5bc062aee44e1433625a2ced0ab337460956 Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 11 May 2024 09:28:28 -0400 Subject: [PATCH 3/6] Get rid of catch clause printstacktrace --- .../equinox/internal/p2/transport/ecf/RepositoryTransport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java index 2d4e85e0d4..aa255780a6 100644 --- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java +++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java @@ -107,7 +107,7 @@ public IStatus download(URI toDownload, OutputStream target, IProgressMonitor mo } } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block - e.printStackTrace(); + // No TLS is installed, so let the process work as it would have with no mod } AuthenticationInfo loginDetails = null; URI secureToDownload; From d3baa2a00ef4899a27b0ac593f8bafc8194daf72 Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 30 Apr 2024 09:26:16 -0400 Subject: [PATCH 4/6] Adding org.eclipse.core.pki capability Check if PKI has been installed and configured --- .../internal/p2/transport/ecf/RepositoryTransport.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java index aa255780a6..cb836dcd64 100644 --- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java +++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java @@ -107,7 +107,11 @@ public IStatus download(URI toDownload, OutputStream target, IProgressMonitor mo } } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block +<<<<<<< Upstream, based on origin/master // No TLS is installed, so let the process work as it would have with no mod +======= + e.printStackTrace(); +>>>>>>> b63a969 Adding org.eclipse.core.pki capability Check if PKI has been installed and configured } AuthenticationInfo loginDetails = null; URI secureToDownload; From a18bb698de71f5e1a9462f7640e55add3f24478d Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 16 Jun 2024 10:52:10 -0400 Subject: [PATCH 5/6] Accept changed no stack output --- .../internal/p2/transport/ecf/RepositoryTransport.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java index cb836dcd64..aa255780a6 100644 --- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java +++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java @@ -107,11 +107,7 @@ public IStatus download(URI toDownload, OutputStream target, IProgressMonitor mo } } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block -<<<<<<< Upstream, based on origin/master // No TLS is installed, so let the process work as it would have with no mod -======= - e.printStackTrace(); ->>>>>>> b63a969 Adding org.eclipse.core.pki capability Check if PKI has been installed and configured } AuthenticationInfo loginDetails = null; URI secureToDownload; From b1dd6f8714b4efa9b521d7d5e26edbf718a10755 Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 18 Jun 2024 07:06:01 -0400 Subject: [PATCH 6/6] Add missing JRE connection statements --- .../p2/transport/ecf/RepositoryTransport.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java index aa255780a6..415005c7ac 100644 --- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java +++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java @@ -209,6 +209,16 @@ public InputStream stream(URI toDownload, IProgressMonitor monitor) boolean promptUser = false; boolean useJREHttp = false; + try { + // DELMARVA - is org.eclipse.core.pki installed and configured + if (SSLContext.getDefault().getProvider().getName().contains("TLS")) { //$NON-NLS-1$ + useJREHttp = true; + Activator.getDefault().useJREHttpClient(); + } + } catch (NoSuchAlgorithmException e) { + // TODO Auto-generated catch block + // No TLS is installed, so let the process work as it would have with no mod + } AuthenticationInfo loginDetails = null; URI secureToDownload = getSecureLocation(toDownload); for (int i = RepositoryPreferences.getLoginRetryCount(); i > 0; i--) { @@ -275,6 +285,16 @@ public long getLastModified(URI toDownload, IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException { boolean promptUser = false; boolean useJREHttp = false; + try { + // DELMARVA - is org.eclipse.core.pki installed and configured + if (SSLContext.getDefault().getProvider().getName().contains("TLS")) { //$NON-NLS-1$ + useJREHttp = true; + Activator.getDefault().useJREHttpClient(); + } + } catch (NoSuchAlgorithmException e) { + // TODO Auto-generated catch block + // No TLS is installed, so let the process work as it would have with no mod + } AuthenticationInfo loginDetails = null; URI secureToDownload = getSecureLocation(toDownload); for (int i = RepositoryPreferences.getLoginRetryCount(); i > 0; i--) {