subjectBean.setSubjectNameIDFormat(subjectNameIDFormat);
}
if (STSConstants.SYMMETRIC_KEY_KEYTYPE.equals(keyType)) {
Crypto crypto = stsProperties.getEncryptionCrypto();
CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
EncryptionProperties encryptionProperties = providerParameters.getEncryptionProperties();
String encryptionName = encryptionProperties.getEncryptionName();
if (encryptionName == null) {
// Fall back on the STS encryption name
encryptionName = stsProperties.getEncryptionUsername();
}
if (encryptionName == null) {
LOG.fine("No encryption Name is configured for Symmetric KeyType");
throw new STSException("No Encryption Name is configured", STSException.REQUEST_FAILED);
}
cryptoType.setAlias(encryptionName);
try {
X509Certificate[] certs = crypto.getX509Certificates(cryptoType);
if (certs == null || certs.length <= 0) {
new STSException("Encryption certificate is not found for alias: " + encryptionName,
STSException.REQUEST_FAILED);