|
Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10680-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.xmlsec.keys.retrieval.KeyRetriever
oracle.security.xmlsec.keys.retrieval.PKCS12KeyRetriever
public class PKCS12KeyRetriever
Class to retrieve keys and certificates from a PKCS #12 file.
Note: StorageAuthenticator
s used with this class must override the StorageAuthenticator.getPassword()
method.
Constructor Summary | |
---|---|
PKCS12KeyRetriever(java.io.InputStream p12Stream) Creates a new PKCS12KeyRetriever instance. |
|
PKCS12KeyRetriever(oracle.security.crypto.cert.PKCS12 pkcs12) Creates a new PKCS12KeyRetriever instance. |
Method Summary | |
---|---|
java.security.cert.X509Certificate |
retrieveCertificate(KeyInfoData keyInfo) Finds a certificate in the PKCS#12 by matching information in the given KeyInfoData 's KeyName or X509Data elements. |
java.security.PrivateKey |
retrievePrivateKey(KeyInfoData keyInfo) Finds a private key in the PKCS#12 by matching information in the given KeyInfoData 's KeyName element. |
java.security.PublicKey |
retrievePublicKey(KeyInfoData keyInfo) Finds a public key in the PKCS#12 by retrieving the certificate that matches information in the given KeyInfoData 's KeyName or X509Data elements. |
Methods inherited from class oracle.security.xmlsec.keys.retrieval.KeyRetriever |
---|
addKeyRetriever, getAuthenticator, getCertificate, getCertificate, getPrivateKey, getPrivateKey, getPublicKey, getPublicKey, getSymmetricKey, getSymmetricKey, removeKeyRetriever, retrieveCertificate, retrievePrivateKey, retrievePublicKey, retrieveSymmetricKey, 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 |
---|
public PKCS12KeyRetriever(java.io.InputStream p12Stream) throws java.io.IOException
PKCS12KeyRetriever
instance.
p12Stream
- An input stream containing the PKCS #12.java.io.IOException
public PKCS12KeyRetriever(oracle.security.crypto.cert.PKCS12 pkcs12) throws java.io.IOException
PKCS12KeyRetriever
instance.
pkcs12
- The PKCS #12 object.java.io.IOException
Method Detail |
---|
public java.security.PublicKey retrievePublicKey(KeyInfoData keyInfo) throws KeyRetrievalException
KeyInfoData
's KeyName or X509Data elements.
For a KeyName element, any of the following values may be used:
For a X509Data element, any of the following child element types may be used:
retrievePublicKey
in class KeyRetriever
keyInfo
- 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.KeyRetrievalException
KeyName
, X509Data
public java.security.cert.X509Certificate retrieveCertificate(KeyInfoData keyInfo) throws KeyRetrievalException
KeyInfoData
's KeyName or X509Data elements.
For a KeyName element, any of the following values may be used:
For a X509Data element, any of the following child element types may be used:
retrieveCertificate
in class KeyRetriever
keyInfo
- 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.KeyRetrievalException
KeyName
, X509Data
public java.security.PrivateKey retrievePrivateKey(KeyInfoData keyInfo) throws KeyRetrievalException
KeyInfoData
's KeyName element.
For a KeyName element, any of the following values may be used:
retrievePrivateKey
in class KeyRetriever
keyInfo
- 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.KeyRetrievalException
KeyName
|
Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10680-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |