feat: Allow certification results to be usages

This commit is contained in:
Magnus Leßmann (@MarkL4YG) 2024-11-19 23:07:53 +01:00
parent fc34320ffd
commit 1d6bf0facc
2 changed files with 31 additions and 7 deletions

View file

@ -90,7 +90,13 @@ public class OpenSSLCertificateCreator {
try (var certAuthority = certificateProvider.requestCertificateUsage(request.getTrustingAuthority())) {
Path unsignedCert = createSigningRequest(request, keyFile, tmpDir.resolve("child.csr"), certPassword);
Path signedCert = signCertificate(request, certAuthority.certificatePath(), certAuthority.certificateKeyPath(), unsignedCert, certPassword);
Path signedCert = signCertificate(
request,
certAuthority.certificatePath(),
certAuthority.certificateKeyPath(),
unsignedCert,
certPassword
);
String fingerprint = getCertificateFingerprint(signedCert);
passwordProvider.setPasswordFor(fingerprint, certPassword);
return new OpenSSLCertificateResult(tmpDir, signedCert, keyFile, fingerprint);