com.sun.identity.saml.xmlsig
Class  JKSKeyProvider
java.lang.Object
  |
  +--com.sun.identity.saml.xmlsig.JKSKeyProvider
- All Implemented Interfaces: 
- KeyProvider
- public synchronized class JKSKeyProvider- extends java.lang.Object- implements KeyProvider
 
| Method Summary | 
|  java.security.cert.Certificate | getCertificate(java.security.PublicKey)Returns certificate corresponding to the specified
 PublicKey. | 
|  java.security.cert.Certificate | getCertificate(java.lang.String)
 | 
|  java.lang.String | getCertificateAlias(java.security.cert.Certificate)Get the alias name of the first keystore entry whose certificate matches 
 the given certificate.
 | 
|  java.security.KeyStore | getKeyStore()
 | 
|  java.security.PrivateKey | getPrivateKey(java.lang.String)Returns
 java.security.PrivateKeyfor the specifiedcertAlias. | 
|  java.lang.String | getPrivateKeyPass()
 | 
|  java.security.PublicKey | getPublicKey(java.lang.String)Returns
 java.security.PublicKeyfor the specifiedkeyAlias | 
|  java.security.cert.X509Certificate | getX509Certificate(java.lang.String)Return
 java.security.cert.X509Certificatefor the specifiedcertAlias. | 
|  void | setCertificateEntry(java.lang.String,
                    java.security.cert.Certificate)
 | 
|  void | setKey(java.lang.String,
       java.lang.String)Set the key to access key store database.
 | 
|  void | store()
 | 
 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
JKSKeyProvider
public JKSKeyProvider()
setKey
public void setKey(java.lang.String,
                   java.lang.String)
- Description copied from interface: KeyProvider
- Set the key to access key store database. This method will only need to 
 be called once if the key could not be obtained by other means.- 
- Specified by: 
- setKeyin interface- KeyProvider
 
- Following copied from interface: com.sun.identity.saml.xmlsig.KeyProvider
- 
- Parameters:
- storepass- password for the key store
- keypass- password for the certificate
 
getX509Certificate
public java.security.cert.X509Certificate getX509Certificate(java.lang.String)
- Description copied from interface: KeyProvider
- Return java.security.cert.X509Certificatefor the specifiedcertAlias.
- 
- Specified by: 
- getX509Certificatein interface- KeyProvider
 
- Following copied from interface: com.sun.identity.saml.xmlsig.KeyProvider
- 
- Parameters:
- certAlias- Certificate alias name
- Returns:
- X509Certificatewhich matches the- certAlias, return null if the certificate could not
         be found.
 
getPublicKey
public java.security.PublicKey getPublicKey(java.lang.String)
- Description copied from interface: KeyProvider
- Returns java.security.PublicKeyfor the specifiedkeyAlias
- 
- Specified by: 
- getPublicKeyin interface- KeyProvider
 
- Following copied from interface: com.sun.identity.saml.xmlsig.KeyProvider
- 
- Parameters:
- keyAlias- Key alias name
- Returns:
- PublicKeywhich matches the- keyAlias,
         return null if the- PublicKeycould not be found.
 
getPrivateKey
public java.security.PrivateKey getPrivateKey(java.lang.String)
- Description copied from interface: KeyProvider
- Returns java.security.PrivateKeyfor the specifiedcertAlias.
- 
- Specified by: 
- getPrivateKeyin interface- KeyProvider
 
- Following copied from interface: com.sun.identity.saml.xmlsig.KeyProvider
- 
- Parameters:
- certAlias- Certificate alias name
- Returns:
- PrivateKeywhich matches the- certAlias,
         return null if the private key could not be found.
 
getCertificateAlias
public java.lang.String getCertificateAlias(java.security.cert.Certificate)
- Description copied from interface: KeyProvider
- Get the alias name of the first keystore entry whose certificate matches 
 the given certificate.- 
- Specified by: 
- getCertificateAliasin interface- KeyProvider
 
- Following copied from interface: com.sun.identity.saml.xmlsig.KeyProvider
- 
- Parameters:
- cert- Certificate
- Returns:
- the (alias) name of the first entry with matching certificate,
       or null if no such entry exists in this keystore. If the keystore 
       has not been loaded properly, return null as well.
 
getPrivateKeyPass
public java.lang.String getPrivateKeyPass()
- 
 
getKeyStore
public java.security.KeyStore getKeyStore()
- 
 
setCertificateEntry
public void setCertificateEntry(java.lang.String,
                                java.security.cert.Certificate)
                         throws SAMLException
- 
 
getCertificate
public java.security.cert.Certificate getCertificate(java.lang.String)
- 
 
store
public void store()
           throws SAMLException
- 
 
getCertificate
public java.security.cert.Certificate getCertificate(java.security.PublicKey)
- Description copied from interface: KeyProvider
- Returns certificate corresponding to the specified
 PublicKey.
- 
- Specified by: 
- getCertificatein interface- KeyProvider
 
- Following copied from interface: com.sun.identity.saml.xmlsig.KeyProvider
- 
- Parameters:
- publicKey- Certificate public key
- Returns:
- Certificate which matches the PublicKey, return
         null if the Certificate could not be found.
 
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.