}
X500Principal subject = new X500Principal("CN=" + "root");
CertificateAndKey certificateAndKey = createSelfSigned(subject, 2048);
WrappedCertificate response = new WrappedCertificate();
response.certificate = new Certificate();
response.certificate.data = Hex.toHex(certificateAndKey.getPublicKey().getEncoded());
return response;
}