mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8278560: X509KeyManagerImpl::getAliases might return a good key with others
Reviewed-by: xuelei
This commit is contained in:
parent
247ea71d24
commit
6412d57a0a
2 changed files with 101 additions and 8 deletions
|
@ -382,15 +382,13 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager
|
|||
issuerSet, false, checkType, constraints,
|
||||
requestedServerNames, idAlgorithm);
|
||||
if (results != null) {
|
||||
// the results will either be a single perfect match
|
||||
// or 1 or more imperfect matches
|
||||
// if it's a perfect match, return immediately
|
||||
EntryStatus status = results.get(0);
|
||||
if (status.checkResult == CheckResult.OK) {
|
||||
if (SSLLogger.isOn && SSLLogger.isOn("keymanager")) {
|
||||
SSLLogger.fine("KeyMgr: choosing key: " + status);
|
||||
for (EntryStatus status : results) {
|
||||
if (status.checkResult == CheckResult.OK) {
|
||||
if (SSLLogger.isOn && SSLLogger.isOn("keymanager")) {
|
||||
SSLLogger.fine("KeyMgr: choosing key: " + status);
|
||||
}
|
||||
return makeAlias(status);
|
||||
}
|
||||
return makeAlias(status);
|
||||
}
|
||||
if (allResults == null) {
|
||||
allResults = new ArrayList<EntryStatus>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue