Skip to content

Commit

Permalink
8325022: Incorrect error message on client authentication
Browse files Browse the repository at this point in the history
Backport-of: fe78c0f1911c9fdc1d30e23847d102748dfa2063
  • Loading branch information
Amos Shi committed Aug 26, 2024
1 parent 3df1852 commit c67fe36
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ private void onCertificate(ServerHandshakeContext shc,
ClientAuthType.CLIENT_AUTH_REQUESTED) {
// unexpected or require client authentication
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
"Empty server certificate chain");
"Empty client certificate chain");
} else {
return;
}
Expand All @@ -405,7 +405,7 @@ private void onCertificate(ServerHandshakeContext shc,
}
} catch (CertificateException ce) {
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
"Failed to parse server certificates", ce);
"Failed to parse client certificates", ce);
}

checkClientCerts(shc, x509Certs);
Expand Down Expand Up @@ -1253,7 +1253,7 @@ private static X509Certificate[] checkClientCerts(
}
} catch (CertificateException ce) {
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
"Failed to parse server certificates", ce);
"Failed to parse client certificates", ce);
}

// find out the types of client authentication used
Expand Down

0 comments on commit c67fe36

Please sign in to comment.