|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.security12.sun.security.pkcs.PKCS10
A PKCS #10 certificate request is created and sent to a Certificate Authority, which then creates an X.509 certificate and returns it to the entity that requested it. A certificate request basically consists of the subject's X.500 name, public key, and optionally some attributes, signed using the corresponding private key. The ASN.1 syntax for a Certification Request is:
CertificationRequest ::= SEQUENCE { certificationRequestInfo CertificationRequestInfo, signatureAlgorithm SignatureAlgorithmIdentifier, signature Signature } SignatureAlgorithmIdentifier ::= AlgorithmIdentifier Signature ::= BIT STRING CertificationRequestInfo ::= SEQUENCE { version Version, subject Name, subjectPublicKeyInfo SubjectPublicKeyInfo, attributes [0] IMPLICIT Attributes } Attributes ::= SET OF Attribute
Constructor Summary | |
PKCS10(byte[] data)
Parses an encoded, signed PKCS #10 certificate request, verifying the request's signature as it does so. |
|
PKCS10(PublicKey publicKey)
Constructs an unsigned PKCS #10 certificate request. |
|
PKCS10(PublicKey publicKey,
PKCS10Attributes attributes)
Constructs an unsigned PKCS #10 certificate request. |
Method Summary | |
void |
encodeAndSign(X500Signer requester)
Create the signed certificate request. |
boolean |
equals(Object other)
Compares this object for equality with the specified object. |
PKCS10Attributes |
getAttributes()
Returns the additional attributes requested. |
byte[] |
getEncoded()
Returns the encoded and signed certificate request as a DER-encoded byte array. |
X500Name |
getSubjectName()
Returns the subject's name. |
PublicKey |
getSubjectPublicKeyInfo()
Returns the subject's public key. |
int |
hashCode()
Returns a hashcode value for this certificate request from its encoded form. |
void |
print(PrintStream out)
Prints an E-Mailable version of the certificate request on the print stream passed. |
String |
toString()
Provides a short description of this request. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public PKCS10(PublicKey publicKey)
publicKey
- the public key that should be placed
into the certificate generated by the CA.public PKCS10(PublicKey publicKey, PKCS10Attributes attributes)
publicKey
- the public key that should be placed
into the certificate generated by the CA.attributes
- additonal set of PKCS10 attributes requested
for in the certificate.public PKCS10(byte[] data) throws IOException, SignatureException, NoSuchAlgorithmException
data
- the DER-encoded PKCS #10 request.Method Detail |
public void encodeAndSign(X500Signer requester) throws CertificateException, IOException, SignatureException
requester
- identifies the signer (by X.500 name)
and provides the private key used to sign.public X500Name getSubjectName()
public PublicKey getSubjectPublicKeyInfo()
public PKCS10Attributes getAttributes()
public byte[] getEncoded()
public void print(PrintStream out) throws IOException, SignatureException
out
- the print stream where the certificate request
will be printed.public String toString()
public boolean equals(Object other)
other
object is an
instanceof
PKCS10
, then
its encoded form is retrieved and compared with the
encoded form of this certificate request.other
- the object to test for equality with this object.public int hashCode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |