public class

Certificate

extends Object
java.lang.Object
   ↳ org.bouncycastle.crypto.tls.Certificate

Class Overview

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

Summary

Fields
public static final Certificate EMPTY_CHAIN
protected X509CertificateStructure[] certs The certificates.
Public Constructors
Certificate(X509CertificateStructure[] certs)
Private constructor from a cert array.
Public Methods
X509CertificateStructure[] getCerts()
boolean isEmpty()
Protected Methods
void encode(OutputStream os)
Encodes version of the ClientCertificate message
static Certificate parse(InputStream is)
Parse the ServerCertificate message.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final Certificate EMPTY_CHAIN

protected X509CertificateStructure[] certs

The certificates.

Public Constructors

public Certificate (X509CertificateStructure[] certs)

Private constructor from a cert array.

Parameters
certs The certs the chain should contain.

Public Methods

public X509CertificateStructure[] getCerts ()

Returns
  • An array which contains the certs, this chain contains.

public boolean isEmpty ()

Protected Methods

protected void encode (OutputStream os)

Encodes version of the ClientCertificate message

Parameters
os stream to write the message to
Throws
IOException If something goes wrong

protected static Certificate parse (InputStream is)

Parse the ServerCertificate message.

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