-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
add SSL certificate configuration support for HTTP/3 #14520
Conversation
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.
@oxsean PTAL
Assertions.assertNotNull(serverKeyUrl, "serverKeyUrl should not be null"); | ||
sslConfig.setServerPrivateKeyPath( | ||
Paths.get(serverKeyUrl.toURI()).toAbsolutePath().toString()); | ||
Assertions.assertNotNull(trustCertUrl, "serverKeyUrl should not be null"); |
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.
trustCertUrl
Assertions.assertNotNull(clientCertUrl, "clientCertUrl should not be null"); | ||
sslConfig.setClientKeyCertChainPath( | ||
Paths.get(clientCertUrl.toURI()).toAbsolutePath().toString()); | ||
Assertions.assertNotNull(clientKeyUrl, "serverKeyUrl should not be null"); |
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.
clientKeyUrl
sslConfig.setClientPrivateKeyPath( | ||
Paths.get(clientKeyUrl.toURI()).toAbsolutePath().toString()); | ||
Assertions.assertNotNull(trustCertUrl, "trustCertUrl should not be null"); | ||
sslConfig.setClientTrustCertCollectionPath( |
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.
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()
}
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.
Thank you for pointing that out.
@@ -0,0 +1,28 @@ | |||
-----BEGIN PRIVATE KEY----- |
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.
No need for csr
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.
Thank you, I've already corrected it.
@@ -0,0 +1,28 @@ | |||
-----BEGIN PRIVATE KEY----- |
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.
Confirm all certificates are valid for more than 50 years
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.
Thank you for pointing that out.
@AlbumenJ LGTM. |
|
What is the purpose of the change
Brief changelog
Verifying this change
Checklist