BigInteger issuerSerial = cert.getSerialNumber();
String alias = getAliasForX509Cert(subjectDN, issuerSerial);
X509Certificate[] certs = getCertificates(alias);
KeyBinding keyBinding = XKMSUtil.createKeyBinding();
validateResult.addKeyBinding(keyBinding);
addKeyInfo(respondWith, alias, certs, keyBinding);
addKeyUsage(certs[0], keyBinding);
addStatus(true, keyBinding);
return validateResult;
} else {
ValidateResult result = XKMSUtil.createValidateResult();
buildResultType((RequestAbstractType) validateRequest,
(ResultType) result);
KeyBinding keybinding = XKMSUtil.createKeyBinding();
X509Certificate[] certs = new X509Certificate[] { cert };
addKeyInfo(validateRequest.getRespondWith(), null, certs,
keybinding);
addKeyUsage(certs[0], keybinding);