Skip to content

Commit

Permalink
make sigAlgo configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
max402 committed May 14, 2024
1 parent 7c2e74e commit 6e12fd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ public CaSignedCertificateBuilder withNotBeforeInDays(Integer notBeforeInDays) {
return this;
}

public CaSignedCertificateBuilder withSignatureAlgo(String signatureAlgo) {
this.signatureAlgo = signatureAlgo;
return this;
}

public CaSignedCertificateBuilder withKeyUsage(int keyUsage) {
if (keyUsageSet) {
this.keyUsage = this.keyUsage | keyUsage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public SelfSignedKeyPairData build(KeyPair keyPair) {
.withNotBeforeInDays(notBeforeInDays)
.withNotAfterInDays(notAfterInDays)
.withSubjectDN(subjectDN)
.withSignatureAlgo(signatureAlgo)
.withSubjectPublicKey(keyPair.getPublic());

if (keyUsages != null) {
Expand Down

0 comments on commit 6e12fd4

Please sign in to comment.