return null;
} else {
log.debug("Found a KeyInfo in form control data, extracting validation credentials");
}
Unmarshaller unmarshaller = Configuration.getUnmarshallerFactory()
.getUnmarshaller(KeyInfo.DEFAULT_ELEMENT_NAME);
if (unmarshaller == null) {
throw new SecurityPolicyException("Could not obtain a KeyInfo unmarshaller");
}
ByteArrayInputStream is = new ByteArrayInputStream(Base64.decode(kiBase64));
KeyInfo keyInfo = null;
try {
Document doc = parser.parse(is);
keyInfo = (KeyInfo) unmarshaller.unmarshall(doc.getDocumentElement());
} catch (XMLParserException e) {
log.error("Error parsing KeyInfo data", e);
throw new SecurityPolicyException("Error parsing KeyInfo data", e);
} catch (UnmarshallingException e) {
log.error("Error unmarshalling KeyInfo data", e);