public class NetscapeCertRequest extends ASN1Encodable
SignedPublicKeyAndChallenge ::= SEQUENCE {
publicKeyAndChallenge PublicKeyAndChallenge,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}
PublicKey's encoded-format has to be X.509.BER, DER
Constructor and Description |
---|
NetscapeCertRequest(ASN1Sequence spkac) |
NetscapeCertRequest(byte[] req) |
NetscapeCertRequest(String challenge,
AlgorithmIdentifier signing_alg,
PublicKey pub_key) |
Modifier and Type | Method and Description |
---|---|
String |
getChallenge() |
AlgorithmIdentifier |
getKeyAlgorithm() |
PublicKey |
getPublicKey() |
AlgorithmIdentifier |
getSigningAlgorithm() |
void |
setChallenge(String value) |
void |
setKeyAlgorithm(AlgorithmIdentifier value) |
void |
setPublicKey(PublicKey value) |
void |
setSigningAlgorithm(AlgorithmIdentifier value) |
void |
sign(PrivateKey priv_key) |
void |
sign(PrivateKey priv_key,
SecureRandom rand) |
DERObject |
toASN1Object() |
boolean |
verify(String challenge) |
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
public NetscapeCertRequest(byte[] req) throws IOException
IOException
public NetscapeCertRequest(ASN1Sequence spkac)
public NetscapeCertRequest(String challenge, AlgorithmIdentifier signing_alg, PublicKey pub_key) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException
public String getChallenge()
public void setChallenge(String value)
public AlgorithmIdentifier getSigningAlgorithm()
public void setSigningAlgorithm(AlgorithmIdentifier value)
public AlgorithmIdentifier getKeyAlgorithm()
public void setKeyAlgorithm(AlgorithmIdentifier value)
public PublicKey getPublicKey()
public void setPublicKey(PublicKey value)
public boolean verify(String challenge) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, NoSuchProviderException
public void sign(PrivateKey priv_key) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, NoSuchProviderException, InvalidKeySpecException
public void sign(PrivateKey priv_key, SecureRandom rand) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, NoSuchProviderException, InvalidKeySpecException
public DERObject toASN1Object()
toASN1Object
in class ASN1Encodable
Copyright © 2015. All rights reserved.