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.
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
Filter out CA PrivateKeyEntry when creating a KeyManager #73807
Filter out CA PrivateKeyEntry when creating a KeyManager #73807
Changes from 36 commits
8f4d1c8
de1cf4d
dacef10
f38429e
52f8ae6
03db8e2
b345f2b
6a741f9
a8fbc74
3a0983b
62047cd
7a40b6a
cbd0623
d408fa9
6b4e3a6
2c4ff7d
7467e99
b2fdcb6
2e24fd6
b6c5a91
d2bf651
03edb70
168d417
0a12420
ded0c1b
7ef6884
628d6ba
d80d443
7b30f62
896a922
115732f
16813e3
1aed5c4
480390c
90a8001
4733a06
beaee05
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think we can remove this assertion, it doesn't test something that we are interested in ( the certificate chain length of the non-ca certificate we happened to use in the test ) - same as below
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.
Just making sure we haven't deleted something we didn't mean to (like it happened before the last chage)
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.
This the certificate chain length of a single certificate chain of a single PrivateKeyEntry. (
final X509Certificate[] certificates = keyManager.getCertificateChain("http");
)We wouldn't have deleted one of the certificates in that chain before the last change.
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.
I still think we don't need this, but won't block the PR on this
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.
maybe quickly add one that contains a keystore with private key entries and trusted certificate entries and check the behavior there too ?
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.
What do you mean? A keystore with multiple not ca private key? Making sure nothing being deleted?
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.
A keystore with a TrustedCertificate entry, a CA PrivateKeyEntry and a non-ca PrivateKeyEntry and make sure that we removed the CA PrivateKeyEntry only
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.
I believe that's what httpCa.p12 is in
testCreateKeyManagerFromPKCS12ContainingCA