Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding capability to support PKI #509

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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("TLS")) { //$NON-NLS-1$
useJREHttp = true;
Activator.getDefault().useJREHttpClient();
}
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use ILog.log().error(e.getMessage(), e)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickaelistria I noticed that most of the other try catch blocks just throw and dont print anything out. There are no other ILog messages in that bundle. Maybe better to stick with the picture show and just throw?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickaelistria Looking again, the software is supposed to be transparent and not required, so perhaps btter to not do anything in the catch block. Software does not even need to know an exception may have occurred.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please 🙏 try to keep a PR to a single commit. Amend and force push further changes. Then you won’t be asked to squash the commits later.

}
AuthenticationInfo loginDetails = null;
URI secureToDownload;
try {
Expand Down
Loading