net.jradius.tls
Class Certificate

java.lang.Object
  extended by net.jradius.tls.Certificate

public class Certificate
extends Object

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


Field Summary
protected  org.bouncycastle.asn1.x509.X509CertificateStructure[] certs
          The certificates.
 
Constructor Summary
Certificate(org.bouncycastle.asn1.x509.X509CertificateStructure[] certs)
          Private constructor from a cert array.
 
Method Summary
protected  void encode(OutputStream os)
          Encodes version of the ClientCertificate message
 org.bouncycastle.asn1.x509.X509CertificateStructure[] getCerts()
           
static Certificate parse(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

certs

protected org.bouncycastle.asn1.x509.X509CertificateStructure[] certs
The certificates.

Constructor Detail

Certificate

public Certificate(org.bouncycastle.asn1.x509.X509CertificateStructure[] certs)
Private constructor from a cert array.

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

parse

public static Certificate parse(InputStream is)
                         throws 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:
IOException - If something goes wrong during parsing.

encode

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

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

getCerts

public org.bouncycastle.asn1.x509.X509CertificateStructure[] getCerts()
Returns:
An array which contains the certs, this chain contains.


Copyright © 2011 Coova Technologies, LLC, All Rights Reserved.