Skip to content

Commit 9e2fe37

Browse files
committed
tests: skip superfluous cert generation in EnsureCertFor()
The certificate generated by `PkiUtility::NewCert()` is self-signed, and so the subsequent `PkiUtility::SignCsr()` call is required. However, `PkiUtility::SignCsr()` doesn't reuse existin cert, instead it'll generate a fresh one on its own. So, skip the first one entirely!
1 parent f74cddb commit 9e2fe37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/remote-certificate-fixture.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct CertificateFixture : ConfigurationDataDirFixture
5353
cert.csrFile = (m_CertsDir / (name + ".csr")).string();
5454

5555
if (overrideExisting || !Utility::PathExists(cert.crtFile)) {
56-
PkiUtility::NewCert(name, cert.keyFile, cert.csrFile, cert.crtFile);
56+
PkiUtility::NewCert(name, cert.keyFile, cert.csrFile, "");
5757
PkiUtility::SignCsr(cert.csrFile, cert.crtFile);
5858
}
5959

0 commit comments

Comments
 (0)