🚧 Work on allowing the creation of OpenSSL certificates
This commit is contained in:
parent
ebfde75853
commit
8f198f944e
5 changed files with 197 additions and 157 deletions
|
@ -1,28 +1,28 @@
|
|||
package de.mlessmann.certassist;
|
||||
|
||||
import de.mlessmann.certassist.CertificateRequest.RequestType;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
public class TestOpenSSLCertificateCreator {
|
||||
|
||||
private OpenSSLCertificateCreator openSSLCertificateCreator;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
ExecutableResolver executableResolver = new ExecutableResolver();
|
||||
openSSLCertificateCreator = new OpenSSLCertificateCreator(executableResolver);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCertificateCreation() {
|
||||
CertificateRequest certRequest = CertificateRequest.builder()
|
||||
.commonName("test.home")
|
||||
.type(RequestType.STANDALONE_CERTIFICATE)
|
||||
.build();
|
||||
|
||||
openSSLCertificateCreator.createCertificate(certRequest);
|
||||
}
|
||||
}
|
||||
package de.mlessmann.certassist;
|
||||
|
||||
import de.mlessmann.certassist.openssl.CertificateRequest;
|
||||
import de.mlessmann.certassist.openssl.CertificateRequest.RequestType;
|
||||
import de.mlessmann.certassist.openssl.OpenSSLCertificateCreator;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class TestOpenSSLCertificateCreator {
|
||||
|
||||
private OpenSSLCertificateCreator openSSLCertificateCreator;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
ExecutableResolver executableResolver = new ExecutableResolver();
|
||||
openSSLCertificateCreator = new OpenSSLCertificateCreator(executableResolver);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCertificateCreation() {
|
||||
CertificateRequest certRequest = CertificateRequest.builder()
|
||||
.commonName("test.home")
|
||||
.type(RequestType.STANDALONE_CERTIFICATE)
|
||||
.build();
|
||||
|
||||
openSSLCertificateCreator.createCertificate(certRequest);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue