org.bouncycastle.jce.netscape
Class NetscapeCertRequest
java.lang.Object
org.bouncycastle.asn1.ASN1Encodable
org.bouncycastle.jce.netscape.NetscapeCertRequest
- All Implemented Interfaces:
- DEREncodable
public class NetscapeCertRequest
- extends ASN1Encodable
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
- 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
- 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
- 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
- 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
- Throws:
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
java.security.NoSuchProviderException
java.security.spec.InvalidKeySpecException
toASN1Object
public DERObject toASN1Object()
- Specified by:
toASN1Object
in class ASN1Encodable