mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8196584: TLS 1.3 Implementation
Co-authored-by: Adam Petcher <adam.petcher@oracle.com> Co-authored-by: Amanda Jiang <amanda.jiang@oracle.com> Co-authored-by: Anthony Scarpino <anthony.scarpino@oracle.com> Co-authored-by: Bradford Wetmore <bradford.wetmore@oracle.com> Co-authored-by: Jamil Nimeh <jamil.j.nimeh@oracle.com> Co-authored-by: John Jiang <sha.jiang@oracle.com> Co-authored-by: Rajan Halade <rajan.halade@oracle.com> Co-authored-by: Sibabrata Sahoo <sibabrata.sahoo@oracle.com> Co-authored-by: Valerie Peng <valerie.peng@oracle.com> Co-authored-by: Weijun Wang <weijun.wang@oracle.com> Reviewed-by: ascarpino, coffeys, dfuchs, jjiang, jnimeh, mullan, rhalade, ssahoo, valeriep, weijun, wetmore, xuelei
This commit is contained in:
parent
c7c819cd8b
commit
87c6761704
262 changed files with 44368 additions and 32552 deletions
|
@ -608,26 +608,17 @@ final class HttpsClient extends HttpClient
|
|||
HostnameChecker checker = HostnameChecker.getInstance(
|
||||
HostnameChecker.TYPE_TLS);
|
||||
|
||||
// Use ciphersuite to determine whether Kerberos is present.
|
||||
if (cipher.startsWith("TLS_KRB5")) {
|
||||
if (!HostnameChecker.match(host, getPeerPrincipal())) {
|
||||
throw new SSLPeerUnverifiedException("Hostname checker" +
|
||||
" failed for Kerberos");
|
||||
}
|
||||
} else { // X.509
|
||||
// get the subject's certificate
|
||||
peerCerts = session.getPeerCertificates();
|
||||
|
||||
// get the subject's certificate
|
||||
peerCerts = session.getPeerCertificates();
|
||||
|
||||
X509Certificate peerCert;
|
||||
if (peerCerts[0] instanceof
|
||||
java.security.cert.X509Certificate) {
|
||||
peerCert = (java.security.cert.X509Certificate)peerCerts[0];
|
||||
} else {
|
||||
throw new SSLPeerUnverifiedException("");
|
||||
}
|
||||
checker.match(host, peerCert);
|
||||
X509Certificate peerCert;
|
||||
if (peerCerts[0] instanceof
|
||||
java.security.cert.X509Certificate) {
|
||||
peerCert = (java.security.cert.X509Certificate)peerCerts[0];
|
||||
} else {
|
||||
throw new SSLPeerUnverifiedException("");
|
||||
}
|
||||
checker.match(host, peerCert);
|
||||
|
||||
// if it doesn't throw an exception, we passed. Return.
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue