Class SignedPublicKeyAndChallenge
java.lang.Object
org.bouncycastle.mozilla.SignedPublicKeyAndChallenge
- All Implemented Interfaces:
org.bouncycastle.util.Encodable
- Direct Known Subclasses:
JcaSignedPublicKeyAndChallenge
This is designed to parse the SignedPublicKeyAndChallenge created by the
KEYGEN tag included by Mozilla based browsers.
PublicKeyAndChallenge ::= SEQUENCE {
spki SubjectPublicKeyInfo,
challenge IA5STRING
}
SignedPublicKeyAndChallenge ::= SEQUENCE {
publicKeyAndChallenge PublicKeyAndChallenge,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.bouncycastle.asn1.mozilla.SignedPublicKeyAndChallenge -
Constructor Summary
ConstructorsModifierConstructorDescriptionSignedPublicKeyAndChallenge(byte[] bytes) protectedSignedPublicKeyAndChallenge(org.bouncycastle.asn1.mozilla.SignedPublicKeyAndChallenge struct) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getPublicKey(String provider) Deprecated.use JcaSignedPublicKeyAndChallenge.getPublicKey()org.bouncycastle.asn1.mozilla.PublicKeyAndChallengeorg.bouncycastle.asn1.x509.SubjectPublicKeyInfobooleanisSignatureValid(ContentVerifierProvider verifierProvider) org.bouncycastle.asn1.ASN1PrimitiveDeprecated.use toASN1Structureorg.bouncycastle.asn1.mozilla.SignedPublicKeyAndChallengeReturn the underlying ASN.1 structure for this challenge.booleanverify()Deprecated.use ContentVerifierProvider methodbooleanDeprecated.use ContentVerifierProvider method
-
Field Details
-
spkacSeq
protected final org.bouncycastle.asn1.mozilla.SignedPublicKeyAndChallenge spkacSeq
-
-
Constructor Details
-
SignedPublicKeyAndChallenge
public SignedPublicKeyAndChallenge(byte[] bytes) -
SignedPublicKeyAndChallenge
protected SignedPublicKeyAndChallenge(org.bouncycastle.asn1.mozilla.SignedPublicKeyAndChallenge struct)
-
-
Method Details
-
toASN1Structure
public org.bouncycastle.asn1.mozilla.SignedPublicKeyAndChallenge toASN1Structure()Return the underlying ASN.1 structure for this challenge.- Returns:
- a SignedPublicKeyAndChallenge object.
-
toASN1Primitive
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()Deprecated.use toASN1Structure -
getPublicKeyAndChallenge
public org.bouncycastle.asn1.mozilla.PublicKeyAndChallenge getPublicKeyAndChallenge() -
isSignatureValid
public boolean isSignatureValid(ContentVerifierProvider verifierProvider) throws OperatorCreationException, IOException - Throws:
OperatorCreationExceptionIOException
-
verify
public boolean verify() throws NoSuchAlgorithmException, SignatureException, NoSuchProviderException, InvalidKeyExceptionDeprecated.use ContentVerifierProvider method -
verify
public boolean verify(String provider) throws NoSuchAlgorithmException, SignatureException, NoSuchProviderException, InvalidKeyException Deprecated.use ContentVerifierProvider method -
getSubjectPublicKeyInfo
public org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getSubjectPublicKeyInfo() -
getChallenge
-
getPublicKey
public PublicKey getPublicKey(String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException Deprecated.use JcaSignedPublicKeyAndChallenge.getPublicKey() -
getEncoded
- Specified by:
getEncodedin interfaceorg.bouncycastle.util.Encodable- Throws:
IOException
-