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

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

public class SsfPabPKCS12File
extends java.lang.Object
implements ISsfPab

Use this class to create an SSF Pab (personal address book) from a PKCS#12 file.


Constructor Summary
SsfPabPKCS12File(java.io.InputStream is, java.lang.String pwd)
          Constructs an SSF PAB from a PKCS#12 input stream.
SsfPabPKCS12File(java.lang.String filename, java.lang.String pwd)
          Constructs an SSF PAB from a PKCS#12 file.
 
Method Summary
 boolean addUntrustedCertificate(java.security.cert.X509Certificate cert)
          Add untrusted certificate to the personal address book.
 java.security.cert.X509Certificate getCertificateBySubjectDN(java.lang.String subjectdn)
          Get the root certificate corresponding to the given SubjectDN
 java.security.cert.X509Certificate[] getCertificates()
          Get the root certificates contained in the personal address book
 boolean isTrusted(java.security.cert.X509Certificate cert)
          Checks if a supplied certificate is trusted
 java.lang.String toString()
          Get description of SSF personal address book
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SsfPabPKCS12File

public SsfPabPKCS12File(java.lang.String filename,
                        java.lang.String pwd)
                 throws java.io.FileNotFoundException,
                        java.security.KeyStoreException,
                        java.security.KeyManagementException
Constructs an SSF PAB 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

SsfPabPKCS12File

public SsfPabPKCS12File(java.io.InputStream is,
                        java.lang.String pwd)
                 throws java.security.KeyStoreException,
                        java.security.KeyManagementException
Constructs an SSF PAB 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 PKCS#12 file cannot be opened
java.security.KeyManagementException - if wrong password was supplied
Method Detail

addUntrustedCertificate

public boolean addUntrustedCertificate(java.security.cert.X509Certificate cert)
Description copied from interface: ISsfPab
Add untrusted certificate to the personal address book.
Specified by:
addUntrustedCertificate in interface ISsfPab
See Also:
ISsfPab.addUntrustedCertificate(java.security.cert.X509Certificate)

getCertificates

public java.security.cert.X509Certificate[] getCertificates()
Description copied from interface: ISsfPab
Get the root certificates contained in the personal address book
Specified by:
getCertificates in interface ISsfPab
See Also:
ISsfPab.getCertificates()

getCertificateBySubjectDN

public java.security.cert.X509Certificate getCertificateBySubjectDN(java.lang.String subjectdn)
Description copied from interface: ISsfPab
Get the root certificate corresponding to the given SubjectDN
Specified by:
getCertificateBySubjectDN in interface ISsfPab
See Also:
ISsfPab.getCertificateBySubjectDN(java.lang.String)

isTrusted

public boolean isTrusted(java.security.cert.X509Certificate cert)
Description copied from interface: ISsfPab
Checks if a supplied certificate is trusted
Specified by:
isTrusted in interface ISsfPab
See Also:
ISsfPab.isTrusted(java.security.cert.X509Certificate)

toString

public java.lang.String toString()
Get description of SSF personal address book
Overrides:
toString in class java.lang.Object
Returns:
string containing the trusted certificates