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

java.lang.Object
  |
  +--com.sap.security.core.server.ssf.SsfSigRcpInfo

public class SsfSigRcpInfo
extends java.lang.Object

Class for representing data of a signer or recipient, containing the certificate and some status information.


Field Summary
 java.security.cert.X509Certificate cert
          Certificate of signer or recipient
 int rc
          Status of certificate or return code of verification
static int SSF_INITIAL
          Initial state.
static int SSF_INVALID_CERT
          Certificate is not valid.
static int SSF_INVALID_REFERENCE
          Invalid reference to external data.
static int SSF_INVALID_SIG
          Signature is not valid.
static int SSF_NO_CERTIFICATE
          No certificate found.
static int SSF_OK
          Everything ok.
static int SSF_UNKNOWN_CANONALG
          Unknown canonicalization algorithm.
static int SSF_UNKNOWN_ENCRYPTALG
          Unknown encryption algorithm.
static int SSF_UNKNOWN_HASHALG
          Unknown hash algorithm.
static int SSF_UNKNOWN_SIGALG
          Unknown signature algorithm.
static int SSF_UNKNOWN_TRANSFORM
          Unknown transformation.
static int SSF_UNTRUSTED_CERT
          Certificate is not trusted.
 
Constructor Summary
SsfSigRcpInfo()
           
SsfSigRcpInfo(java.security.cert.X509Certificate cert)
           
SsfSigRcpInfo(java.security.cert.X509Certificate cert, int rc)
           
 
Method Summary
 boolean checkInitialCert(ISsfPab pab)
          If the status is SSF_INITIAL, check if the certificate is valid and trusted and change the status to SSF_OK, SSF_NO_CERTIFICATE, SSF_INVALID_CERT or SSF_UNTRUSTED_CERT.
 void setInitial()
          Set the status to SSF_INITIAL.
 java.lang.String toString()
          Get description of the signer/recipient information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SSF_INITIAL

public static final int SSF_INITIAL
Initial state.

SSF_OK

public static final int SSF_OK
Everything ok.

SSF_INVALID_SIG

public static final int SSF_INVALID_SIG
Signature is not valid.

SSF_NO_CERTIFICATE

public static final int SSF_NO_CERTIFICATE
No certificate found.

SSF_INVALID_CERT

public static final int SSF_INVALID_CERT
Certificate is not valid.

SSF_UNTRUSTED_CERT

public static final int SSF_UNTRUSTED_CERT
Certificate is not trusted.

SSF_INVALID_REFERENCE

public static final int SSF_INVALID_REFERENCE
Invalid reference to external data.

SSF_UNKNOWN_SIGALG

public static final int SSF_UNKNOWN_SIGALG
Unknown signature algorithm.

SSF_UNKNOWN_ENCRYPTALG

public static final int SSF_UNKNOWN_ENCRYPTALG
Unknown encryption algorithm.

SSF_UNKNOWN_HASHALG

public static final int SSF_UNKNOWN_HASHALG
Unknown hash algorithm.

SSF_UNKNOWN_TRANSFORM

public static final int SSF_UNKNOWN_TRANSFORM
Unknown transformation.

SSF_UNKNOWN_CANONALG

public static final int SSF_UNKNOWN_CANONALG
Unknown canonicalization algorithm.

cert

public java.security.cert.X509Certificate cert
Certificate of signer or recipient

rc

public int rc
Status of certificate or return code of verification
Constructor Detail

SsfSigRcpInfo

public SsfSigRcpInfo()

SsfSigRcpInfo

public SsfSigRcpInfo(java.security.cert.X509Certificate cert)

SsfSigRcpInfo

public SsfSigRcpInfo(java.security.cert.X509Certificate cert,
                     int rc)
Method Detail

setInitial

public void setInitial()
Set the status to SSF_INITIAL.

checkInitialCert

public boolean checkInitialCert(ISsfPab pab)
If the status is SSF_INITIAL, check if the certificate is valid and trusted and change the status to SSF_OK, SSF_NO_CERTIFICATE, SSF_INVALID_CERT or SSF_UNTRUSTED_CERT.
Parameters:
pab - Private address book containg the trusted root certificates
Returns:
true, if certifiacte is valid and trusted

toString

public java.lang.String toString()
Get description of the signer/recipient information
Overrides:
toString in class java.lang.Object
Returns:
string containing the description