KeyPair, KeyStore and Certificate utilities

Static helpers for KeyStores and KeyPairs, and a half-decent builder for X509 Certificates.


Given static imports:

import static;
import static;
import static;
import static;
import static java.time.ZoneId.systemDefault;
import static java.util.concurrent.TimeUnit.DAYS;

And a field (that’s time-expensive to create):

private static final KeyPair RSA = rsa();

Then generating a certificate is relatively simple:

	X509Certificate x509 = certificate()
			.issuer("foo corp")
			.subject("bar cert")

Back to top

Version: 1.2.1. Last Published: 2018-11-25.

Earcam Maven Skin.