public class KeyProviderImplSecurityTokenRef extends java.lang.Object implements KeyProviderInterface
KeyProviderInterface for the SecurityTokenReference key information hints. A
SecurityTokenReference key contains a reference to a BinarySecurityToken. Both SecurityTokenReference and BinarySecurityToken
are defined in the WS-Security specification, available at
http://www.oasis-open.org/committees/wss/documents/WSS-SOAPMessageSecurity-10-0223-merged.pdf.KeyProviderInterface| Modifier and Type | Field and Description |
|---|---|
protected org.w3c.dom.Document |
signatureDOMDoc_
The DOM document containing the XML signature.
|
protected X509TrustManagerInterface |
trustManager_
The implementation of the trust management system interface
X509TrustManagerInterface. |
protected X509Certificate |
verificationCert_
The verification certificate.
|
protected java.security.Key |
verifierKey_
The verification key.
|
| Constructor and Description |
|---|
KeyProviderImplSecurityTokenRef()
Constructor.
|
KeyProviderImplSecurityTokenRef(org.w3c.dom.Document signatureDOMDoc,
X509Certificate verificationCert)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Element[] |
getKeyInfoSubelements()
Used in signature generation.
|
X509Certificate |
getVerificationCertificate()
Provides the verification certificate.
|
java.security.Key |
getVerifierKey()
Provides the public key in the verification certificate.
|
void |
setKeyInfoSubelements(org.w3c.dom.Element[] securityTokenRefSubelements)
Examines the KeyInfo <SecurityTokenReference> subelement and tries to set the verification certificate from this.
|
void |
setTrustManager(X509TrustManagerInterface trustManager)
Used by the application in the verification use case to set the trust management system.
|
void |
setURIResolverParameters(URIResolverParameters params)
Sets the parameters to be used by the key provider when resolving URIs.
|
void |
setVerifierKey(java.security.Key verifierKey)
Used by the application in the signature creation use case.
|
protected java.security.Key verifierKey_
protected X509Certificate verificationCert_
protected org.w3c.dom.Document signatureDOMDoc_
getKeyInfoSubelements() to create DOM nodes.protected X509TrustManagerInterface trustManager_
X509TrustManagerInterface.public KeyProviderImplSecurityTokenRef()
KeyManagerImpl class in the verification use case.public KeyProviderImplSecurityTokenRef(org.w3c.dom.Document signatureDOMDoc,
X509Certificate verificationCert)
signatureDOMDoc - The DOM document containing the XML signature. Used in method getKeyInfoSubelements() to
create DOM nodes. Must not be null.verificationCert - The signer's verification certificate.public void setTrustManager(X509TrustManagerInterface trustManager)
trustManager - The trust management system which should back this key provider. Must not be null.public java.security.Key getVerifierKey()
throws KeyProviderException
getVerifierKey in interface KeyProviderInterfaceKeyProviderException - If the verification key cannot be obtained or cannot be trusted.public org.w3c.dom.Element[] getKeyInfoSubelements()
throws KeyProviderException
getKeyInfoSubelements in interface KeyProviderInterfaceKeyProviderException - If the wrong constructor has been used by the application, and therefore no DOM Document has
been specified.public void setKeyInfoSubelements(org.w3c.dom.Element[] securityTokenRefSubelements)
throws KeyProviderException
setKeyInfoSubelements in interface KeyProviderInterfacesecurityTokenRefSubelements - An array, of length 1, of SecurityTokenReference elements.KeyProviderException - If verification certificate cannot be set from the information in the
<SecurityTokenReference> element of <KeyInfo>.public X509Certificate getVerificationCertificate() throws KeyProviderException
KeyProviderException - If the verification certificate is null.public void setVerifierKey(java.security.Key verifierKey)
verifierKey - The verification key. It must be an instance of either RSAPublicKey or DSAPublicKey.public void setURIResolverParameters(URIResolverParameters params)
KeyProviderInterfacesetURIResolverParameters in interface KeyProviderInterfaceparams - The parameters to be set. May be null to indicate a restore of the default
values.