add SSL certificate configuration support for HTTP/3#14520
Merged
AlbumenJ merged 8 commits intoapache:3.3from Aug 21, 2024
Merged
add SSL certificate configuration support for HTTP/3#14520AlbumenJ merged 8 commits intoapache:3.3from
AlbumenJ merged 8 commits intoapache:3.3from
Conversation
AlbumenJ
reviewed
Aug 20, 2024
oxsean
requested changes
Aug 21, 2024
| Assertions.assertNotNull(serverKeyUrl, "serverKeyUrl should not be null"); | ||
| sslConfig.setServerPrivateKeyPath( | ||
| Paths.get(serverKeyUrl.toURI()).toAbsolutePath().toString()); | ||
| Assertions.assertNotNull(trustCertUrl, "serverKeyUrl should not be null"); |
| Assertions.assertNotNull(clientCertUrl, "clientCertUrl should not be null"); | ||
| sslConfig.setClientKeyCertChainPath( | ||
| Paths.get(clientCertUrl.toURI()).toAbsolutePath().toString()); | ||
| Assertions.assertNotNull(clientKeyUrl, "serverKeyUrl should not be null"); |
| sslConfig.setClientPrivateKeyPath( | ||
| Paths.get(clientKeyUrl.toURI()).toAbsolutePath().toString()); | ||
| Assertions.assertNotNull(trustCertUrl, "trustCertUrl should not be null"); | ||
| sslConfig.setClientTrustCertCollectionPath( |
Contributor
There was a problem hiding this comment.
You can create a common method such as:
private static String getCertPath(String name) {
java.net.URL certUrl = TripleHttp3ProtocolTest.class.getResource("/certs/"+name);
Assertions.assertNotNull(certUrl, "Cert file '/certs/"+ name + "' is required");
return Paths.get(certUrl.toURI()).toAbsolutePath().toString()
}
Contributor
Author
There was a problem hiding this comment.
Thank you for pointing that out.
| @@ -0,0 +1,28 @@ | |||
| -----BEGIN PRIVATE KEY----- | |||
Contributor
Author
There was a problem hiding this comment.
Thank you, I've already corrected it.
| @@ -0,0 +1,28 @@ | |||
| -----BEGIN PRIVATE KEY----- | |||
Contributor
There was a problem hiding this comment.
Confirm all certificates are valid for more than 50 years
Contributor
Author
There was a problem hiding this comment.
Thank you for pointing that out.
oxsean
approved these changes
Aug 21, 2024
Contributor
|
@AlbumenJ LGTM. |
|
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.



What is the purpose of the change
Brief changelog
Verifying this change
Checklist