public class WSSKeyRetriever extends KeyRetriever
Users should override this class to implement retrieval of keys from persistant storage.
| Constructor and Description |
|---|
WSSKeyRetriever() |
| Modifier and Type | Method and Description |
|---|---|
java.security.cert.X509Certificate |
processCert(KeyInfoData kid)
Parse the KeyInfo data and obtain the X509Certificate certificate.
|
java.security.PrivateKey |
processPrivateKey(KeyInfoData kid)
Parse the KeyInfo data and obtain the private key.
|
javax.crypto.SecretKey |
processSymmetricKey(KeyInfoData kid)
Parse the KeyInfo data and obtain the symmetric key.
|
protected java.security.cert.X509Certificate |
retrieveCertificate(KeyInfoData keyInfo)
Retrieves the certificate identified by the given
KeyInfoData. |
protected java.security.PrivateKey |
retrievePrivateKey(KeyInfoData keyInfo)
Retrieves the private key identified by the given
KeyInfoData. |
protected java.security.PublicKey |
retrievePublicKey(KeyInfoData keyInfo)
Retrieves the public key identified by the given
KeyInfoData. |
protected javax.crypto.SecretKey |
retrieveSymmetricKey(KeyInfoData keyInfo)
Retrieves the secret key identified by the given
KeyInfoData. |
addKeyRetriever, getAuthenticator, getCertificate, getCertificate, getPrivateKey, getPrivateKey, getPublicKey, getPublicKey, getSymmetricKey, getSymmetricKey, removeKeyRetriever, retrieveCertificate, retrievePrivateKey, retrievePublicKey, retrieveSymmetricKey, setAuthenticator, setCertificateValidator, validateCertificate, validateCertificate, validateCertificateprotected java.security.cert.X509Certificate retrieveCertificate(KeyInfoData keyInfo) throws KeyRetrievalException
KeyRetrieverKeyInfoData. If this method is not overridden it always returns null.retrieveCertificate in class KeyRetrieverkeyInfo - A KeyInfoData to be used to locate the certificate.X509Certificate, or null if none could be located.StorageAuthenticationException - If an error occurs authenticating to the key source.KeyRetrievalExceptionprotected java.security.PublicKey retrievePublicKey(KeyInfoData keyInfo) throws KeyRetrievalException
KeyRetrieverKeyInfoData. If this method is not overridden it always returns null.retrievePublicKey in class KeyRetrieverkeyInfo - A KeyInfoData to be used to locate the public key.PublicKey, or null if none could be located.StorageAuthenticationException - If an error occurs authenticating to the key source.KeyRetrievalExceptionprotected java.security.PrivateKey retrievePrivateKey(KeyInfoData keyInfo) throws KeyRetrievalException
KeyRetrieverKeyInfoData. If this method is not overridden it always returns null.retrievePrivateKey in class KeyRetrieverkeyInfo - A KeyInfoData to be used to locate the private key.PrivateKey, or null if none could be located.StorageAuthenticationException - If an error occurs authenticating to the key source.KeyRetrievalExceptionprotected javax.crypto.SecretKey retrieveSymmetricKey(KeyInfoData keyInfo) throws KeyRetrievalException
KeyRetrieverKeyInfoData. If this method is not overridden it always returns null.retrieveSymmetricKey in class KeyRetrieverkeyInfo - A KeyInfoData to be used to locate the secret key.SecretKey, or null if none could be located.StorageAuthenticationException - If an error occurs authenticating to the key source.KeyRetrievalExceptionpublic java.security.cert.X509Certificate processCert(KeyInfoData kid) throws WSSException
Document.kid - The wsse:SecurityTokenReference element.null.WSSExceptionpublic java.security.PrivateKey processPrivateKey(KeyInfoData kid) throws WSSException
kid - The wsse:SecurityTokenReference element.null.WSSExceptionpublic javax.crypto.SecretKey processSymmetricKey(KeyInfoData kid) throws WSSException
kid - The wsse:SecurityTokenReference element.null.WSSException