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

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

public class SsfProfilePKCS12File
extends java.lang.Object
implements ISsfProfile

Use this class to create an SSF profile from a PKCS#12 file.


Constructor Summary
SsfProfilePKCS12File(java.io.InputStream is, java.lang.String pwd)
          Constructs an SSF profile from a PKCS#12 input stream
SsfProfilePKCS12File(java.lang.String filename, java.lang.String pwd)
          Constructs an SSF profile from a PKCS#12 file.
 
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

SsfProfilePKCS12File

public SsfProfilePKCS12File(java.lang.String filename,
                            java.lang.String pwd)
                     throws java.io.FileNotFoundException,
                            java.security.KeyStoreException,
                            java.security.KeyManagementException
Constructs an SSF profile from a PKCS#12 file.
Parameters:
filename - path of PKCS#12 file
pwd - password used to protect the file
Throws:
java.io.FileNotFoundException - if PKCS12 file cannot be found
java.security.KeyStoreException - if PKCS12 file cannot be opened
java.security.KeyManagementException - if wrong password was supplied

SsfProfilePKCS12File

public SsfProfilePKCS12File(java.io.InputStream is,
                            java.lang.String pwd)
                     throws java.security.KeyStoreException,
                            java.security.KeyManagementException
Constructs an SSF profile from a PKCS#12 input stream
Parameters:
is - InputStream containing the PKCS#12 file
pwd - password used to protect the file
Throws:
java.security.KeyStoreException - if PKCS12 file cannot be opened
java.security.KeyManagementException - if wrong password was supplied
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