-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Refactor configuration of SSL to allow override with custom config #596
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
Conversation
| // CHECKSTYLE:OFF | ||
| @Override | ||
| public boolean equals(Object o) { | ||
| if (this == o) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't reflectionEquals checks all this things?
|
from first lookup LGTM |
| if (customSslContext == null) { | ||
| if (dockerTlsVerify) { | ||
| dockerCertPath = checkDockerCertPath(dockerCertPath); | ||
| sslContext = new LocalDirectorySSLConfig(dockerCertPath).getSSLContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to store SSLConfig in DefaultClientConfig instead context?
I need know from what dockerCertPath connection was build.
Use case: calling default dockerclientconfig builder that gather configs, env vars, properties and they i extract dockercertPath for creating special remote test connection.
|
From second look i can't extract dockerCertPath from SSLContext, DefaultDockerClientConfig should store SSLConfig. |
|
Pushed commit into this branch |
Current coverage is 30.54%
@@ master #596 diff @@
==========================================
Files 296 296
Lines 6262 6260 -2
Methods 0 0
Messages 0 0
Branches 561 560 -1
==========================================
+ Hits 1464 1912 +448
+ Misses 4704 4348 -356
+ Partials 94 0 -94
|
|
What's the goal of your latest commit? Why you want |
Because i need know exact SSLConfig configuration that provided SSL connection. I can get hosts, names, etc, but not ssl part. That's why SSLConfig (like it was before) should be stored and not SSLContext. PS Found that |
|
Seems now works fine. Tested from my fork https://github.com/KostyaSha/docker-java/commits/3.0.0-kostyasha |
| */ | ||
| public class DefaultDockerClientConfig implements Serializable, DockerClientConfig { | ||
|
|
||
| private static final long serialVersionUID = -4307357472441531489L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1L if it new class
|
TODO update README.md after merge because builder will change? |
|
@KostyaSha OK, understood now. Feel free to fix your comments and merge. |
|
ok |
| "Enabled TLS verification (DOCKER_TLS_VERIFY=1) but certifate path (DOCKER_CERT_PATH) is not defined."); | ||
| } else { | ||
| File certPath = new File(dockerCertPath); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed nested ifs, should be better readable now
|
@marcuslinke please review |
|
@KostyaSha Thanks! |
|
@marcuslinke thanks to you for better solution! |
|
Would it be 3.0.1? I created 3.0.1 milestone. |
|
Causes issues in integration tests. Will try fix later |
…ocker-java#596) * Refactor configuration of SSL to allow override with custom config * Store SSLConfig instead SSLContext * avoid NPE * prepare release * Coding style changes
This change is