Skip to content

Commit 09f698e

Browse files
respect custom keyUsage
1 parent 8c7fa75 commit 09f698e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ private void writeCertificateAndKeyDetails(
353353
keyPair,
354354
cert.subject,
355355
sanList,
356-
buildKeyUsage(DEFAULT_CERT_KEY_USAGE),
356+
buildKeyUsage(cert.keyUsage),
357357
Set.of(new ExtendedKeyUsage(KeyPurposeId.id_kp_serverAuth))
358358
);
359359
final String csrFile = "http-" + cert.name + ".csr";
@@ -387,7 +387,7 @@ private void writeCertificateAndKeyDetails(
387387
notBefore,
388388
notAfter,
389389
null,
390-
buildKeyUsage(DEFAULT_CERT_KEY_USAGE),
390+
buildKeyUsage(cert.keyUsage),
391391
Set.of(new ExtendedKeyUsage(KeyPurposeId.id_kp_serverAuth))
392392
);
393393

0 commit comments

Comments
 (0)