spki
Class Certificate

java.lang.Object
  |
  +--spki.BaseObj
        |
        +--spki.Certificate

public class Certificate
extends BaseObj
implements SeqDefValue, SeqEntry

spki Certificate class.

Formal definitions:

 <cert>:: "(" "cert" <cert-body> <sig-val> ")" ;
 

Version:
$Id: Certificate.java,v 1.7 2002/05/10 07:07:59 tep Exp $
Author:
Tep Narula <tep@win.trlabs.ca>
See Also:
CertBody, Signature

Field Summary
private static String __ME
          This class's full name.
private  CertBody body
          The cert-body field.
static String SEXP_NAME
          This class S-Expression type name, used by toSExpression() and other methods.
private  Signature signature
          The sig-val field.
 
Fields inherited from class spki.BaseObj
__ME, cache_sexp, cached_sexp, DEFAULT_HASH_ALG, locked, SEXP_NAME
 
Constructor Summary
protected Certificate()
          Don't use me!
  Certificate(CertBody body, Signature signature)
          Create an immutable Certificate object from given cert-body and signature.
  Certificate(SExpression sexp)
          Create an immutable Certificate object from given S-Expression.
 
Method Summary
 CertBody getCertBody()
          Get the certificate body field.
 Signature getSignature()
          Get the signature.
 SExpression toSExpression()
          Build an SExpression representing this object.
 
Methods inherited from class spki.BaseObj
disableSExpressionCaching, enableSExpressionCaching, extractHashAlgId, getCachedSExpression, isLocked, isSListOfType, lock, providerToSPKI, setCachedSExpression, spkiToProvider, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

__ME

private static final String __ME
This class's full name.

SEXP_NAME

public static final String SEXP_NAME
This class S-Expression type name, used by toSExpression() and other methods.
See Also:
toSExpression()

body

private CertBody body
The cert-body field.

signature

private Signature signature
The sig-val field.
Constructor Detail

Certificate

protected Certificate()
Don't use me!
See Also:
Certificate(SExpression), Certificate(CertBody,Signature)

Certificate

public Certificate(SExpression sexp)
            throws ParseException,
                   SPKIException
Create an immutable Certificate object from given S-Expression.

Certificate

public Certificate(CertBody body,
                   Signature signature)
            throws SPKIException
Create an immutable Certificate object from given cert-body and signature.
Parameters:
body - the cert-body field.
signature - the Signature object containg the sig-val field.
Throws:
SPKIException - if something went wrong.
Method Detail

toSExpression

public SExpression toSExpression()
                          throws SPKIException
Description copied from interface: SPKIObject
Build an SExpression representing this object.
Overrides:
toSExpression in class BaseObj
Tags copied from interface: SPKIObject
Returns:
SExpression object representing this object, or null.
Throws:
SPKIException - if something went wrong during conversion.

getCertBody

public CertBody getCertBody()
Get the certificate body field.
Returns:
a CertBody object.

getSignature

public Signature getSignature()
Get the signature.
Returns:
a Signature object.