Bouncy Castle Cryptography Library 1.48

org.bouncycastle.crypto.tls
Class Certificate

java.lang.Object
  extended by org.bouncycastle.crypto.tls.Certificate

public class Certificate
extends java.lang.Object

A representation for a certificate chain as used by a tls server.


Field Summary
protected  Certificate[] certs
          The certificates.
static Certificate EMPTY_CHAIN
           
 
Constructor Summary
Certificate(Certificate[] certs)
          Private constructor from a cert array.
 
Method Summary
protected  void encode(java.io.OutputStream os)
          Encodes version of the ClientCertificate message
 Certificate[] getCerts()
           
 boolean isEmpty()
           
protected static Certificate parse(java.io.InputStream is)
          Parse the ServerCertificate message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_CHAIN

public static final Certificate EMPTY_CHAIN

certs

protected Certificate[] certs
The certificates.

Constructor Detail

Certificate

public Certificate(Certificate[] certs)
Private constructor from a cert array.

Parameters:
certs - The certs the chain should contain.
Method Detail

parse

protected static Certificate parse(java.io.InputStream is)
                            throws java.io.IOException
Parse the ServerCertificate message.

Parameters:
is - The stream where to parse from.
Returns:
A Certificate object with the certs, the server has sended.
Throws:
java.io.IOException - If something goes wrong during parsing.

encode

protected void encode(java.io.OutputStream os)
               throws java.io.IOException
Encodes version of the ClientCertificate message

Parameters:
os - stream to write the message to
Throws:
java.io.IOException - If something goes wrong

getCerts

public Certificate[] getCerts()
Returns:
An array which contains the certs, this chain contains.

isEmpty

public boolean isEmpty()

Bouncy Castle Cryptography Library 1.48