Skip to content

Commit

Permalink
8325022: Incorrect error message on client authentication
Browse files Browse the repository at this point in the history
Reviewed-by: jnimeh, hchao, djelinski
  • Loading branch information
John Jiang authored and pull[bot] committed Feb 5, 2024
1 parent aab2e44 commit a27b2ac
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -386,7 +386,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 @@ -403,7 +403,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 @@ -1224,7 +1224,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 a27b2ac

Please sign in to comment.