public class NetscapeCertRequest extends ASN1Object
SignedPublicKeyAndChallenge ::= SEQUENCE {
publicKeyAndChallenge PublicKeyAndChallenge,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}
PublicKey's encoded-format has to be X.509.Constructor and Description |
---|
NetscapeCertRequest(ASN1Sequence spkac) |
NetscapeCertRequest(byte[] req) |
NetscapeCertRequest(java.lang.String challenge,
AlgorithmIdentifier signing_alg,
java.security.PublicKey pub_key) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getChallenge() |
AlgorithmIdentifier |
getKeyAlgorithm() |
java.security.PublicKey |
getPublicKey() |
AlgorithmIdentifier |
getSigningAlgorithm() |
void |
setChallenge(java.lang.String value) |
void |
setKeyAlgorithm(AlgorithmIdentifier value) |
void |
setPublicKey(java.security.PublicKey value) |
void |
setSigningAlgorithm(AlgorithmIdentifier value) |
void |
sign(java.security.PrivateKey priv_key) |
void |
sign(java.security.PrivateKey priv_key,
java.security.SecureRandom rand) |
ASN1Primitive |
toASN1Primitive()
Method providing a primitive representation of this object suitable for encoding.
|
boolean |
verify(java.lang.String challenge) |
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
public NetscapeCertRequest(byte[] req) throws java.io.IOException
java.io.IOException
public NetscapeCertRequest(ASN1Sequence spkac)
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
java.security.NoSuchAlgorithmException
java.security.spec.InvalidKeySpecException
java.security.NoSuchProviderException
public java.lang.String getChallenge()
public void setChallenge(java.lang.String value)
public AlgorithmIdentifier getSigningAlgorithm()
public void setSigningAlgorithm(AlgorithmIdentifier value)
public AlgorithmIdentifier getKeyAlgorithm()
public void setKeyAlgorithm(AlgorithmIdentifier value)
public java.security.PublicKey getPublicKey()
public void setPublicKey(java.security.PublicKey value)
public boolean verify(java.lang.String challenge) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.SignatureException, java.security.NoSuchProviderException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
java.security.NoSuchProviderException
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
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
java.security.NoSuchProviderException
java.security.spec.InvalidKeySpecException
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
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
java.security.NoSuchProviderException
java.security.spec.InvalidKeySpecException
public ASN1Primitive toASN1Primitive()
ASN1Object
toASN1Primitive
in interface ASN1Encodable
toASN1Primitive
in class ASN1Object