anon.crypto
Class CertificationRequest

java.lang.Object
  extended by org.bouncycastle.asn1.ASN1Encodable
      extended by org.bouncycastle.asn1.DERObject
          extended by org.bouncycastle.asn1.ASN1Sequence
              extended by org.bouncycastle.asn1.DERSequence
                  extended by anon.crypto.CertificationRequest
All Implemented Interfaces:
org.bouncycastle.asn1.DEREncodable, org.bouncycastle.asn1.DERTags

final class CertificationRequest
extends org.bouncycastle.asn1.DERSequence

A class for creating and verifying PKCS10 Certification requests. They are used to request certification for an X509 certificate from a certificate authority. This class is for internal use only.

  CertificationRequest ::= SEQUENCE {
          certificationRequestInfo CertificationRequestInfo,
          signatureAlgorithm SignatureAlgorithmIdentifier,
          signature Signature }

  SignatureAlgorithmIdentifier ::= AlgorithmIdentifier
  Signature ::= BIT STRING
  }
 

Author:
Rolf Wendolsky
See Also:
http://www.faqs.org/rfcs/rfc2314.html

Field Summary
private  CertificationRequestInfo m_certificationRequestInfo
           
private  org.bouncycastle.asn1.DERBitString m_signature
           
 
Fields inherited from class org.bouncycastle.asn1.ASN1Encodable
BER, DER
 
Fields inherited from interface org.bouncycastle.asn1.DERTags
APPLICATION, BIT_STRING, BMP_STRING, BOOLEAN, CONSTRUCTED, ENUMERATED, EXTERNAL, GENERAL_STRING, GENERALIZED_TIME, GRAPHIC_STRING, IA5_STRING, INTEGER, NULL, NUMERIC_STRING, OBJECT_IDENTIFIER, OCTET_STRING, PRINTABLE_STRING, SEQUENCE, SEQUENCE_OF, SET, SET_OF, T61_STRING, TAGGED, UNIVERSAL_STRING, UTC_TIME, UTF8_STRING, VIDEOTEX_STRING, VISIBLE_STRING
 
Constructor Summary
CertificationRequest(org.bouncycastle.asn1.ASN1Sequence a_sequence)
           
CertificationRequest(CertificationRequestInfo a_certificationRequestInfo, AsymmetricCryptoKeyPair a_keyPair)
           
 
Method Summary
private static org.bouncycastle.asn1.ASN1EncodableVector createRequest(org.bouncycastle.asn1.DERSequence a_certificationRequestInfo, org.bouncycastle.asn1.x509.AlgorithmIdentifier a_algorithmIdentifier, org.bouncycastle.asn1.DERBitString a_signature)
           
private static byte[] DERtoBytes(java.lang.Object a_object)
           
 CertificationRequestInfo getCertificationRequestInfo()
          Returns the Certification Request Info of this request.
 IMyPublicKey getPublicKey()
          Returns the public key used in this request.
 boolean verify()
          Verifies the signature of this request with the public key included.
 
Methods inherited from class org.bouncycastle.asn1.ASN1Sequence
addObject, equals, getInstance, getInstance, getObjectAt, getObjects, hashCode, size, toString
 
Methods inherited from class org.bouncycastle.asn1.DERObject
toASN1Object
 
Methods inherited from class org.bouncycastle.asn1.ASN1Encodable
getDEREncoded, getDERObject, getEncoded, getEncoded
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_certificationRequestInfo

private CertificationRequestInfo m_certificationRequestInfo

m_signature

private org.bouncycastle.asn1.DERBitString m_signature
Constructor Detail

CertificationRequest

public CertificationRequest(CertificationRequestInfo a_certificationRequestInfo,
                            AsymmetricCryptoKeyPair a_keyPair)

CertificationRequest

CertificationRequest(org.bouncycastle.asn1.ASN1Sequence a_sequence)
Method Detail

getPublicKey

public IMyPublicKey getPublicKey()
Returns the public key used in this request.

Returns:
the public key used in this request

getCertificationRequestInfo

public CertificationRequestInfo getCertificationRequestInfo()
Returns the Certification Request Info of this request.

Returns:
the Certification Request Info of this request

verify

public boolean verify()
Verifies the signature of this request with the public key included.

Returns:
true if the signature of this request is valid; false otherwise

createRequest

private static org.bouncycastle.asn1.ASN1EncodableVector createRequest(org.bouncycastle.asn1.DERSequence a_certificationRequestInfo,
                                                                       org.bouncycastle.asn1.x509.AlgorithmIdentifier a_algorithmIdentifier,
                                                                       org.bouncycastle.asn1.DERBitString a_signature)

DERtoBytes

private static byte[] DERtoBytes(java.lang.Object a_object)