use of de.carne.certmgr.certs.x509.GenerateCertRequest in project certmgr by hdecarne.
the class UserCertStoreTest method basicRequest.
private GenerateCertRequest basicRequest() {
KeyPairAlgorithm keyPairAlgorithm = Check.notNull(KeyPairAlgorithm.getDefaultSet(null, false).getDefault());
GenerateCertRequest request = new GenerateCertRequest(X500Names.fromString("CN=TestCert"), keyPairAlgorithm, Check.notNull(keyPairAlgorithm.getStandardKeySizes(null).getDefault()));
Date notBefore = new Date();
Date notAfter = new Date(notBefore.getTime() + 1000 * 60 * 24);
request.setNotBefore(notBefore);
request.setNotAfter(notAfter);
return request;
}
Aggregations