Skip to content

Commit fa68b1a

Browse files
map of entires
1 parent 41b982f commit fa68b1a

File tree

1 file changed

+10
-19
lines changed
  • x-pack/plugin/security/cli/src/main/java/org/elasticsearch/xpack/security/cli

1 file changed

+10
-19
lines changed

x-pack/plugin/security/cli/src/main/java/org/elasticsearch/xpack/security/cli/CertGenUtils.java

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,16 @@ public class CertGenUtils {
8383
*/
8484
public static final Map<String, Integer> KEY_USAGE_MAPPINGS = Collections.unmodifiableMap(
8585
new TreeMap<>(
86-
Map.of(
87-
"digitalSignature",
88-
KeyUsage.digitalSignature,
89-
"nonRepudiation",
90-
KeyUsage.nonRepudiation,
91-
"keyEncipherment",
92-
KeyUsage.keyEncipherment,
93-
"dataEncipherment",
94-
KeyUsage.dataEncipherment,
95-
"keyAgreement",
96-
KeyUsage.keyAgreement,
97-
"keyCertSign",
98-
KeyUsage.keyCertSign,
99-
"cRLSign",
100-
KeyUsage.cRLSign,
101-
"encipherOnly",
102-
KeyUsage.encipherOnly,
103-
"decipherOnly",
104-
KeyUsage.decipherOnly
86+
Map.ofEntries(
87+
Map.entry("digitalSignature", KeyUsage.digitalSignature),
88+
Map.entry("nonRepudiation", KeyUsage.nonRepudiation),
89+
Map.entry("keyEncipherment", KeyUsage.keyEncipherment),
90+
Map.entry("dataEncipherment", KeyUsage.dataEncipherment),
91+
Map.entry("keyAgreement", KeyUsage.keyAgreement),
92+
Map.entry("keyCertSign", KeyUsage.keyCertSign),
93+
Map.entry("cRLSign", KeyUsage.cRLSign),
94+
Map.entry("encipherOnly", KeyUsage.encipherOnly),
95+
Map.entry("decipherOnly", KeyUsage.decipherOnly)
10596
)
10697
)
10798
);

0 commit comments

Comments
 (0)