return response;
}
private X509Certificate getCertificateFromRequest(Object requestObject) throws CertificateException {
UseKeyType useKeyType = extractType(requestObject, UseKeyType.class);
byte[] x509 = null;
if (null != useKeyType) {
KeyInfoType keyInfoType = extractType(useKeyType.getAny(),
KeyInfoType.class);
if (null != keyInfoType) {
for (Object keyInfoContent : keyInfoType.getContent()) {
X509DataType x509DataType = extractType(keyInfoContent,
X509DataType.class);
if (null != x509DataType) {
for (Object x509Object : x509DataType
.getX509IssuerSerialOrX509SKIOrX509SubjectName()) {
x509 = extractType(x509Object, byte[].class);
if (null != x509) {
break;
}
}
}
}
} else {
Element elementNSImpl = (Element) useKeyType.getAny();
NodeList x509CertData = elementNSImpl.getElementsByTagNameNS(
Constants.SignatureSpecNS, Constants._TAG_X509CERTIFICATE);
if (x509CertData != null && x509CertData.getLength() > 0) {
try {
x509 = Base64Utility.decode(x509CertData.item(0)