// at this point ... check token type: Binary
QName el =
new QName(bstElement.getNamespaceURI(),
bstElement.getLocalName());
if (el.equals(WSSecurityEngine.binaryToken)) {
X509Security token = null;
String value = bstElement.getAttribute(WSSecurityEngine.VALUE_TYPE);
if (!X509Security.getType().equals(value)
|| ((token = new X509Security(bstElement)) == null)) {
throw new WSSecurityException(WSSecurityException.UNSUPPORTED_SECURITY_TOKEN,
"unsupportedBinaryTokenType",
new Object[]{"for decryption (BST)"});
}
X509Certificate cert = token.getX509Certificate(crypto);
if (cert == null) {
throw new WSSecurityException(WSSecurityException.FAILURE,
"invalidX509Data",
new Object[]{"for decryption"});
}