|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.x509.NetscapeCertRequest
This class represents a certificate request coming from Netscape Navigator 3.0 and 4.x.
This class only can be used for parsing an already existing NetscapeCertRequest, supplied in DER or PEM encoded format. Therefore this class provides two constructors for creating a NetscapeCertRequest from an InputStream, or from byte array supplying the PEM or DER encoded request. The given data is decoded and "translated" into a "SignedPublicKeyAndChallange" ASN.1 data structure as defined by the Netscape Certificate Specifications:
SignedPublicKeyAndChallenge ::= SEQUENCE { publicKeyAndChallenge PublicKeyAndChallenge, signatureAlgorithm AlgorithmIdentifier, signature BIT STRING }
where:
PublicKeyAndChallenge ::= SEQUENCE { spki SubjectPublicKeyInfo, challenge IA5STRING }
For obtaining the public key from this "SignedPublicKeyAndChallange" structure, use
the getPublicKey
method. The self-signed
"SignedPublicKeyAndChallange" structure can be verified using the
verify
method.
Constructor Summary | |
NetscapeCertRequest(byte[] arr)
Creates a NetscapeCertRequest from a byte array supplying the PEM or DER
encoded request.
|
|
NetscapeCertRequest(InputStream is)
Creates a NetscapeCertRequest from an InputStream supplying
the PEM or DER encoded request.
|
Method Summary | |
PublicKey |
getPublicKey()
Returns the public key from this "SignedPublicKeyAndChallange" structure. |
boolean |
verify()
Verifies the self signed certificate request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NetscapeCertRequest(InputStream is) throws IOException, CodingException
NetscapeCertRequest
from an InputStream supplying
the PEM or DER encoded request.
From the request derived from the given input stream the "SignedPublicKeyAndChallange" ASN.1 data structure is created.
is
- the input stream from where to read the PEM/DER encoded cert requestIOException
- if an I/O error occurs.CodingException
- if the CertRequest could not be parsedpublic NetscapeCertRequest(byte[] arr) throws CodingException
NetscapeCertRequest
from a byte array supplying the PEM or DER
encoded request.
From the request derived from the given byte array the "SignedPublicKeyAndChallange" ASN.1 data structure is created.
arr
- the array containing the DER/PEM encoded CertRequestCodingException
- if the CertRequest could not be parsedMethod Detail |
public boolean verify() throws SignatureException
verify
in interface CertRequest
true
if the cert request is OK, false
if notSignatureException
- if the cert request could not be verifiedpublic PublicKey getPublicKey() throws InvalidKeyException
getPublicKey
in interface CertRequest
InvalidKeyException
- if the public key from this "SignedPublicKeyAndChallange"
structure cannot not be created
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |