Constructor and Description |
---|
SignatureProcessor() |
Modifier and Type | Method and Description |
---|---|
X509Certificate[] |
getCertificatesTokenReference(org.w3c.dom.Element elem,
Crypto crypto)
Extracts the certificate(s) from the Binary Security token reference.
|
String |
getId()
Get the Id of the processor.
|
void |
handleToken(org.w3c.dom.Element elem,
Crypto crypto,
Crypto decCrypto,
javax.security.auth.callback.CallbackHandler cb,
WSDocInfo wsDocInfo,
Vector returnResults,
WSSConfig wsc) |
protected Principal |
verifyXMLSignature(org.w3c.dom.Element elem,
Crypto crypto,
X509Certificate[] returnCert,
Set returnElements,
List protectedElements,
byte[][] signatureValue,
javax.security.auth.callback.CallbackHandler cb,
WSDocInfo wsDocInfo)
Verify the WS-Security signature.
|
public void handleToken(org.w3c.dom.Element elem, Crypto crypto, Crypto decCrypto, javax.security.auth.callback.CallbackHandler cb, WSDocInfo wsDocInfo, Vector returnResults, WSSConfig wsc) throws WSSecurityException
handleToken
in interface Processor
WSSecurityException
protected Principal verifyXMLSignature(org.w3c.dom.Element elem, Crypto crypto, X509Certificate[] returnCert, Set returnElements, List protectedElements, byte[][] signatureValue, javax.security.auth.callback.CallbackHandler cb, WSDocInfo wsDocInfo) throws WSSecurityException
KeyInfo
that is
contained in the signature contains standard X509 data. If yes then
get the certificate data via the standard KeyInfo
methods.
Otherwise, if the KeyInfo
info does not contain X509 data, check
if we can find a wsse:SecurityTokenReference
element. If yes, the next
step is to check how to get the certificate. Two methods are currently supported
here:
wsse:Security
header. If the dereferenced token is
of the correct type the contained certificate is extracted.
crypto
parameter.
verification
function.elem
- the XMLSignature DOM Element.crypto
- the object that implements the access to the keystore and the
handling of certificates.returnCert
- verifyXMLSignature stores the certificate in the first
entry of this array. The caller may then further validate
the certificatereturnElements
- verifyXMLSignature adds the wsu:ID attribute values for
the signed elements to this Setcb
- CallbackHandler instance to extract key passwordsWSSecurityException
public X509Certificate[] getCertificatesTokenReference(org.w3c.dom.Element elem, Crypto crypto) throws WSSecurityException
elem
- The element containing the binary security token. This is
either X509 certificate(s) or a PKIPath.WSSecurityException
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.