com.dstc.security.pki
Class NetscapeCertificationRequest

java.lang.Object
  |
  +--com.dstc.security.pki.NetscapeCertificationRequest

public class NetscapeCertificationRequest
extends Object
implements CertificationRequest

A class representing a NetscapeCertificationRequest sent from a Netscape browser upon generation of a public key pair

Implements the ASN.1 structure PublicKeyAndChallenge.

     PublicKeyAndChallenge ::= SEQUENCE {
         spki SubjectPublicKeyInfo,
         challenge IA5STRING
     }

     SignedPublicKeyAndChallenge ::= SEQUENCE {
         publicKeyAndChallenge PublicKeyAndChallenge,
         signatureAlgorithm AlgorithmIdentifier,
         signature BIT STRING
     }
 


Constructor Summary
NetscapeCertificationRequest(byte[] encoded)
          Constructs a NetscapeCertificationRequest from a DER encoding of a netscape certification request
NetscapeCertificationRequest(InputStream is)
          Constructs a NetscapeCertificationRequest from a DER encoding of a netscape certification request
 
Method Summary
 byte[] getEncoded()
          Return the default encoding of this object.
 byte[] getEncodedPublicKey()
          Returns the DER encoding of the SubjectPublicKeyInfo for this NetscapeCertificationRequest object.
 String getKeyAlgName()
          Returns the key algorithm name for this NetscapeCertificationRequest
 PublicKey getPublicKey()
          Returns the PublicKey for this NetscapeCertificationRequest
 String getSigAlgName()
          Returns the signature algorithm name for this NetscapeCertificationRequest
 byte[] getSignature()
          Returns the signature for this NetscapeCertificationRequest
 String getSubjectName()
          Returns the subject name for this NetscapeCertificationRequest ie.
 boolean verifySignature()
          Verifies the signature in this CertificationRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetscapeCertificationRequest

public NetscapeCertificationRequest(byte[] encoded)
                             throws PKIException
Constructs a NetscapeCertificationRequest from a DER encoding of a netscape certification request
Parameters:
encoded - the DER encoding of this NetscapeCertificationRequest object.

NetscapeCertificationRequest

public NetscapeCertificationRequest(InputStream is)
                             throws PKIException
Constructs a NetscapeCertificationRequest from a DER encoding of a netscape certification request
Parameters:
encoded - the DER encoding of this NetscapeCertificationRequest object.
Method Detail

getEncodedPublicKey

public byte[] getEncodedPublicKey()
Returns the DER encoding of the SubjectPublicKeyInfo for this NetscapeCertificationRequest object.
Specified by:
getEncodedPublicKey in interface CertificationRequest

getEncoded

public byte[] getEncoded()
Description copied from interface: CertificationRequest
Return the default encoding of this object.
Specified by:
getEncoded in interface CertificationRequest

getPublicKey

public PublicKey getPublicKey()
Returns the PublicKey for this NetscapeCertificationRequest
Specified by:
getPublicKey in interface CertificationRequest

getSignature

public byte[] getSignature()
Returns the signature for this NetscapeCertificationRequest
Specified by:
getSignature in interface CertificationRequest

getSigAlgName

public String getSigAlgName()
Returns the signature algorithm name for this NetscapeCertificationRequest
Specified by:
getSigAlgName in interface CertificationRequest

getSubjectName

public String getSubjectName()
Returns the subject name for this NetscapeCertificationRequest ie. null
Specified by:
getSubjectName in interface CertificationRequest

getKeyAlgName

public String getKeyAlgName()
Returns the key algorithm name for this NetscapeCertificationRequest
Specified by:
getKeyAlgName in interface CertificationRequest

verifySignature

public boolean verifySignature()
Verifies the signature in this CertificationRequest
Specified by:
verifySignature in interface CertificationRequest