Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-04


oracle.security.xmlsec.keys.retrieval
Class KeyInfoTool

java.lang.Object
  extended by oracle.security.xmlsec.keys.retrieval.KeyRetriever
      extended by oracle.security.xmlsec.keys.retrieval.KeyInfoTool


public class KeyInfoTool
extends KeyRetriever

Utility for extracting keys and certificates from a KeyInfo.

Since:
2.0
See Also:
XSKeyInfo, KeyInfoData, KeyRetriever

Constructor Summary
KeyInfoTool()
          Creates a new KeyInfoTool instance.

 

Method Summary
 java.security.cert.X509Certificate retrieveCertificate(KeyInfoData keyInfo)
          Extracts the certificate from the given KeyInfoData.
 java.security.PublicKey retrievePublicKey(KeyInfoData keyInfo)
          Extracts the public key from the given KeyInfoData.
 javax.crypto.SecretKey retrieveSymmetricKey(KeyInfoData keyInfo)
          Extracts the symmetric key from the given KeyInfoData.

 

Methods inherited from class oracle.security.xmlsec.keys.retrieval.KeyRetriever
addKeyRetriever, getAuthenticator, getCertificate, getCertificate, getPrivateKey, getPrivateKey, getPublicKey, getPublicKey, getSymmetricKey, getSymmetricKey, removeKeyRetriever, retrieveCertificate, retrievePrivateKey, retrievePrivateKey, retrievePublicKey, retrieveSymmetricKey, setAuthenticator, setCertificateValidator, validateCertificate, validateCertificate, validateCertificate

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

KeyInfoTool

public KeyInfoTool()
Creates a new KeyInfoTool instance.

Method Detail

retrievePublicKey

public java.security.PublicKey retrievePublicKey(KeyInfoData keyInfo)
                                          throws KeyRetrievalException
Extracts the public key from the given KeyInfoData.
Overrides:
retrievePublicKey in class KeyRetriever
Parameters:
keyInfo - A KeyInfoData instance.
Returns:
A PublicKey if keyInfo is a KeyValue or a X509Data containing a X509Certificate, otherwise returns null.
Throws:
StorageAuthenticationException - If an error occurs authenticating to the key source.
KeyRetrievalException

retrieveSymmetricKey

public javax.crypto.SecretKey retrieveSymmetricKey(KeyInfoData keyInfo)
                                            throws KeyRetrievalException
Extracts the symmetric key from the given KeyInfoData.
Overrides:
retrieveSymmetricKey in class KeyRetriever
Parameters:
keyInfo - A KeyInfoData instance.
Returns:
A SecretKey if keyInfo is a XEEncryptedKey, otherwise returns null.
Throws:
StorageAuthenticationException - If an error occurs authenticating to the key source.
KeyRetrievalException

retrieveCertificate

public java.security.cert.X509Certificate retrieveCertificate(KeyInfoData keyInfo)
                                                       throws KeyRetrievalException
Extracts the certificate from the given KeyInfoData.
Overrides:
retrieveCertificate in class KeyRetriever
Parameters:
keyInfo - A KeyInfoData instance.
Returns:
A X509Certificate if keyInfo is a X509Data containing a X509Certificate, otherwise returns null.
Throws:
StorageAuthenticationException - If an error occurs authenticating to the key source.
KeyRetrievalException

Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-04


Copyright © 2005, 2011 , Oracle. All rights reserved.