[ca] Fix the UpdateRootCA function to also update the ExternalCA's rootCA#2210
Merged
aaronlehmann merged 1 commit intomoby:masterfrom Jun 5, 2017
Merged
[ca] Fix the UpdateRootCA function to also update the ExternalCA's rootCA#2210aaronlehmann merged 1 commit intomoby:masterfrom
aaronlehmann merged 1 commit intomoby:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2210 +/- ##
==========================================
- Coverage 60.23% 60.16% -0.07%
==========================================
Files 124 124
Lines 20143 20121 -22
==========================================
- Hits 12133 12106 -27
- Misses 6647 6664 +17
+ Partials 1363 1351 -12 |
This was referenced Jun 1, 2017
diogomonica
approved these changes
Jun 2, 2017
aaronlehmann
reviewed
Jun 5, 2017
ca/config.go
Outdated
|
|
||
| s.externalCA.mu.Lock() | ||
| s.externalCA.rootCA = rootCA | ||
| s.externalCA.mu.Unlock() |
Collaborator
There was a problem hiding this comment.
The rootCA field is used without holding the mutex in Sign.
Also, could you please add a setter method for this? There is already one for URLs.
Contributor
Author
There was a problem hiding this comment.
Good point, thanks, added.
Collaborator
There was a problem hiding this comment.
Not seeing the setter used here, but GitHub seems to be acting up, so maybe it's not showing the full change.
Contributor
Author
There was a problem hiding this comment.
Github is 500'ing for me a bunch. :| I'll force push again maybe.
8310cae to
a771b69
Compare
since if it's not updated when getting a cert signed by an external CA, no intermediates are appended Signed-off-by: Ying Li <ying.li@docker.com>
a771b69 to
7bef8ec
Compare
Collaborator
|
LGTM |
tiborvass
pushed a commit
to aluzzardi/docker-ce
that referenced
this pull request
Jun 6, 2017
Includes: - moby/swarmkit#2203 - moby/swarmkit#2210 - moby/swarmkit#2212 Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com> Signed-off-by: Tibor Vass <tibor@docker.com>
This was referenced Jun 6, 2017
silvin-lubecki
pushed a commit
to silvin-lubecki/docker-ce
that referenced
this pull request
Feb 3, 2020
Includes: - moby/swarmkit#2203 - moby/swarmkit#2210 - moby/swarmkit#2212 Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com> Signed-off-by: Tibor Vass <tibor@docker.com>
silvin-lubecki
pushed a commit
to silvin-lubecki/engine-extract
that referenced
this pull request
Feb 3, 2020
Includes: - moby/swarmkit#2203 - moby/swarmkit#2210 - moby/swarmkit#2212 Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com> Signed-off-by: Tibor Vass <tibor@docker.com>
silvin-lubecki
pushed a commit
to silvin-lubecki/engine-extract
that referenced
this pull request
Mar 10, 2020
Includes: - moby/swarmkit#2203 - moby/swarmkit#2210 - moby/swarmkit#2212 Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com> Signed-off-by: Tibor Vass <tibor@docker.com>
silvin-lubecki
pushed a commit
to silvin-lubecki/engine-extract
that referenced
this pull request
Mar 23, 2020
Includes: - moby/swarmkit#2203 - moby/swarmkit#2210 - moby/swarmkit#2212 Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com> Signed-off-by: Tibor Vass <tibor@docker.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since if it's not updated when getting a cert signed by an external CA, no intermediates are appended.
Previously the test for this (
TestRequestAndSaveNewCertificatesWithIntermediates) passed due a combination of both this bug and a bug in how the test CA utility worked (it updated the RootCA to one without intermediates, but since updating the root CA didn't actually propagate to the external CA signing object, the external CA signer did produce a cert with intermediates).I've updated the test CA utility and the tests as well. I'll also open a PR against the 17.06 branch.
cc @aaronlehmann @diogomonica @jlhawn