} else if (keyInfo.getPublicKey() != null) { BasicCredential keyInfoCredential = new BasicCredential(keyInfo.getPublicKey()); BasicKeyInfoGeneratorFactory kiFactory = new BasicKeyInfoGeneratorFactory(); kiFactory.setEmitPublicKeyValue(true);
samlKeyInfo.setPrivateKey(((WSSSecurityProperties) getSecurityProperties()). getSignatureCrypto().getPrivateKey(alias, wsPasswordCallback.getPassword())); } else if (keyInfoBean.getPublicKey() != null) { PublicKey publicKey = keyInfoBean.getPublicKey(); samlKeyInfo.setPublicKey(publicKey); samlKeyInfo.setPrivateKey(((WSSSecurityProperties) getSecurityProperties()).