org.bouncycastle.jce.netscape
Class NetscapeCertRequest
java.lang.Object
|
+--org.bouncycastle.asn1.ASN1Object
|
+--org.bouncycastle.jce.netscape.NetscapeCertRequest
- All Implemented Interfaces:
- ASN1Encodable, Encodable
- public class NetscapeCertRequest
- extends ASN1Object
Handles NetScape certificate request (KEYGEN), these are constructed as:
SignedPublicKeyAndChallenge ::= SEQUENCE {
publicKeyAndChallenge PublicKeyAndChallenge,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}
PublicKey's encoded-format has to be X.509.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
NetscapeCertRequest
public NetscapeCertRequest(byte[] req)
throws java.io.IOException
NetscapeCertRequest
public NetscapeCertRequest(ASN1Sequence spkac)
NetscapeCertRequest
public NetscapeCertRequest(java.lang.String challenge,
AlgorithmIdentifier signing_alg,
java.security.PublicKey pub_key)
throws java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException,
java.security.NoSuchProviderException
getChallenge
public java.lang.String getChallenge()
setChallenge
public void setChallenge(java.lang.String value)
getSigningAlgorithm
public AlgorithmIdentifier getSigningAlgorithm()
setSigningAlgorithm
public void setSigningAlgorithm(AlgorithmIdentifier value)
getKeyAlgorithm
public AlgorithmIdentifier getKeyAlgorithm()
setKeyAlgorithm
public void setKeyAlgorithm(AlgorithmIdentifier value)
getPublicKey
public java.security.PublicKey getPublicKey()
setPublicKey
public void setPublicKey(java.security.PublicKey value)
verify
public boolean verify(java.lang.String challenge)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.SignatureException,
java.security.NoSuchProviderException
sign
public void sign(java.security.PrivateKey priv_key)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.SignatureException,
java.security.NoSuchProviderException,
java.security.spec.InvalidKeySpecException
sign
public void sign(java.security.PrivateKey priv_key,
java.security.SecureRandom rand)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.SignatureException,
java.security.NoSuchProviderException,
java.security.spec.InvalidKeySpecException
toASN1Primitive
public ASN1Primitive toASN1Primitive()
- Description copied from class:
ASN1Object
- Method providing a primitive representation of this object suitable for encoding.
- Overrides:
toASN1Primitive
in class ASN1Object
- Following copied from class:
org.bouncycastle.asn1.ASN1Object
- Returns:
- a primitive representation of this object.