Skip to content

Commit 2883afa

Browse files
committed
BCJSSE: Warn if early key shares configured but none are usable
1 parent 3501709 commit 2883afa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎tls/src/main/java/org/bouncycastle/jsse/provider/NamedGroupInfo.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,11 @@ private static int[] createEarlyCandidates(Map<Integer, NamedGroupInfo> index, S
664664
{
665665
result = Arrays.copyOf(result, count);
666666
}
667+
// NOTE: Only complain about an empty result if attempting to configure a non-empty list
668+
if (names.length > 0 && count < 1)
669+
{
670+
LOG.warning("'" + description + "' contained no usable NamedGroup values; no early key_share will be offered");
671+
}
667672
return result;
668673
}
669674

0 commit comments

Comments
 (0)