Ja.NET Standard Edition 5.0

Documentation API Specification

Contents

Certificate Class Reference

List of all members.


Detailed Description

The class encapsulates the ASN.1 DER encoding/decoding work with the X.509 certificate.

Its ASN notation is as follows (as specified in RFC 3280 - Internet X.509 Public Key Infrastructure. Certificate and Certificate Revocation List (CRL) Profile. http://www.ietf.org/rfc/rfc3280.txt):

  Certificate  ::=  SEQUENCE  {
      tbsCertificate       TBSCertificate,
      signatureAlgorithm   AlgorithmIdentifier,
      signatureValue       BIT STRING  
  }
 

Public Member Functions

 Certificate (TBSCertificate tbsCertificate, AlgorithmIdentifier signatureAlgorithm, byte[] signatureValue)
 TODO.
TBSCertificate getTbsCertificate ()
 Returns the value of tbsCertificate field of the structure.
AlgorithmIdentifier getSignatureAlgorithm ()
 Returns the value of signatureAlgorithm field of the structure.
byte[] getSignatureValue ()
 Returns the value of signatureValue field of the structure.
String toString ()
byte[] getEncoded ()
 Returns ASN.1 encoded form of this X.509 TBSCertificate value.

Static Public Attributes

static final ASN1Sequence ASN1
 X.509 Certificate encoder/decoder.

Private Member Functions

 Certificate (TBSCertificate tbsCertificate, AlgorithmIdentifier signatureAlgorithm, byte[] signatureValue, byte[] encoding)

Private Attributes

final TBSCertificate tbsCertificate
final AlgorithmIdentifier signatureAlgorithm
final byte[] signatureValue
byte[] encoding

Constructor & Destructor Documentation

Certificate ( TBSCertificate  tbsCertificate,
AlgorithmIdentifier  signatureAlgorithm,
byte[]  signatureValue 
)

TODO.

Parameters:
tbsCertificate,: TBSCertificate
signatureAlgorithm,: AlgorithmIdentifier
signatureValue,: byte[]

Certificate ( TBSCertificate  tbsCertificate,
AlgorithmIdentifier  signatureAlgorithm,
byte[]  signatureValue,
byte[]  encoding 
) [private]


Member Function Documentation

TBSCertificate getTbsCertificate (  ) 

Returns the value of tbsCertificate field of the structure.

Returns:
tbsCertificate

AlgorithmIdentifier getSignatureAlgorithm (  ) 

Returns the value of signatureAlgorithm field of the structure.

Returns:
signatureAlgorithm

byte [] getSignatureValue (  ) 

Returns the value of signatureValue field of the structure.

Returns:
signatureValue

String toString (  ) 

byte [] getEncoded (  ) 

Returns ASN.1 encoded form of this X.509 TBSCertificate value.

Returns:
a byte array containing ASN.1 encode form.


Member Data Documentation

final TBSCertificate tbsCertificate [private]

final byte [] signatureValue [private]

byte [] encoding [private]

final ASN1Sequence ASN1 [static]

Initial value:

 
        new ASN1Sequence(new ASN1Type[] 
                {TBSCertificate.ASN1, AlgorithmIdentifier.ASN1, ASN1BitString.getInstance()}) {

        protected Object getDecodedObject(BerInputStream in) {
            Object[] values = (Object[]) in.content;
            return new Certificate(
                    (TBSCertificate) values[0],
                    (AlgorithmIdentifier) values[1], 
                    ((BitString) values[2]).bytes, 
                    in.getEncoded()
                    );
        }

        protected void getValues(Object object, Object[] values) {

            Certificate cert = (Certificate) object;

            values[0] = cert.tbsCertificate;
            values[1] = cert.signatureAlgorithm;
            values[2] = new BitString(cert.signatureValue, 0);
        }
    }
X.509 Certificate encoder/decoder.