use of net.shibboleth.utilities.java.support.security.SelfSignedCertificateGenerator in project cas by apereo.
the class TemplatedMetadataAndCertificatesGenerationService method buildSelfSignedEncryptionCert.
/**
* Build self signed encryption cert.
*
* @throws Exception the exception
*/
protected void buildSelfSignedEncryptionCert() throws Exception {
final SamlIdPProperties idp = casProperties.getAuthn().getSamlIdp();
final SelfSignedCertificateGenerator generator = new SelfSignedCertificateGenerator();
generator.setHostName(getIdPHostName());
generator.setCertificateFile(idp.getMetadata().getEncryptionCertFile().getFile());
generator.setPrivateKeyFile(idp.getMetadata().getEncryptionKeyFile().getFile());
generator.setURISubjectAltNames(Arrays.asList(getIdPHostName().concat(URI_SUBJECT_ALTNAME_POSTFIX)));
generator.generate();
}
use of net.shibboleth.utilities.java.support.security.SelfSignedCertificateGenerator in project cas by apereo.
the class TemplatedMetadataAndCertificatesGenerationService method buildSelfSignedSigningCert.
/**
* Build self signed signing cert.
*
* @throws Exception the exception
*/
protected void buildSelfSignedSigningCert() throws Exception {
final SamlIdPProperties idp = casProperties.getAuthn().getSamlIdp();
final SelfSignedCertificateGenerator generator = new SelfSignedCertificateGenerator();
generator.setHostName(getIdPHostName());
generator.setCertificateFile(idp.getMetadata().getSigningCertFile().getFile());
generator.setPrivateKeyFile(idp.getMetadata().getSigningKeyFile().getFile());
generator.setURISubjectAltNames(Arrays.asList(getIdPHostName().concat(URI_SUBJECT_ALTNAME_POSTFIX)));
generator.generate();
}
Aggregations