com.sap.security.core.server.ssf
Class SsfProfileKeyStore

java.lang.Object
  |
  +--com.sap.security.core.server.ssf.SsfProfileKeyStore
All Implemented Interfaces:
ISsfProfile

public class SsfProfileKeyStore
extends java.lang.Object
implements ISsfProfile

Use this class to create an SSF profile from a KeyStore.


Constructor Summary
SsfProfileKeyStore(java.io.InputStream is, java.lang.String type, java.lang.String kspwd, java.lang.String alias, java.lang.String pwd)
          Constructs an SSF profile from a KeyStore input stream
SsfProfileKeyStore(java.security.KeyStore keyStore, java.lang.String alias, java.lang.String pwd)
          Constructs an SSF profile from a KeyStore
 
Method Summary
 java.security.cert.X509Certificate getCertificate()
          Get the certificate of a signer or recipient.
 java.security.cert.X509Certificate[] getCertificateChain()
          Get the certificate chain of a signer or recipient.
 java.security.PrivateKey getPrivateKey()
          Get the private key of a signer or recipient
 java.lang.String toString()
          Get description of SSF profile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SsfProfileKeyStore

public SsfProfileKeyStore(java.security.KeyStore keyStore,
                          java.lang.String alias,
                          java.lang.String pwd)
                   throws java.security.KeyStoreException
Constructs an SSF profile from a KeyStore
Parameters:
keyStore - java.security.KeyStore object
alias - alias name of key entry (if null, use first key entry)
pwd - password of key entry
Throws:
java.security.KeyStoreException - if KeyStore cannot be opened

SsfProfileKeyStore

public SsfProfileKeyStore(java.io.InputStream is,
                          java.lang.String type,
                          java.lang.String kspwd,
                          java.lang.String alias,
                          java.lang.String pwd)
                   throws java.security.KeyStoreException
Constructs an SSF profile from a KeyStore input stream
Parameters:
type - KeyStore type
is - InputStream to read from (if null, create an empty keystore)
kspwd - password of key store (optional, may be null)
alias - alias name of key entry (if null, use first key entry)
pwd - password of key entry
Throws:
java.security.KeyStoreException - if KeyStore cannot be opened
Method Detail

getPrivateKey

public java.security.PrivateKey getPrivateKey()
Description copied from interface: ISsfProfile
Get the private key of a signer or recipient
Specified by:
getPrivateKey in interface ISsfProfile
See Also:
ISsfProfile.getPrivateKey()

getCertificate

public java.security.cert.X509Certificate getCertificate()
Description copied from interface: ISsfProfile
Get the certificate of a signer or recipient.
Specified by:
getCertificate in interface ISsfProfile
See Also:
ISsfProfile.getCertificate()

getCertificateChain

public java.security.cert.X509Certificate[] getCertificateChain()
Description copied from interface: ISsfProfile
Get the certificate chain of a signer or recipient. The first certificate is the certificate of the signer or recipient.
Specified by:
getCertificateChain in interface ISsfProfile
See Also:
ISsfProfile.getCertificateChain()

toString

public java.lang.String toString()
Get description of SSF profile
Overrides:
toString in class java.lang.Object
Returns:
string containing the certificate chain