Top Description Fields Constructors Methods
org.bouncycastle.mozilla

public Class SignedPublicKeyAndChallenge

extends Object
implements Encodable
Class Inheritance
All Implemented Interfaces
org.bouncycastle.util.Encodable
Known Direct Subclasses
org.bouncycastle.mozilla.jcajce.JcaSignedPublicKeyAndChallenge
Imports
java.io.IOException, .OutputStream, java.security.InvalidKeyException, .KeyFactory, .NoSuchAlgorithmException, .NoSuchProviderException, .PublicKey, .Signature, .SignatureException, java.security.spec.X509EncodedKeySpec, org.bouncycastle.asn1.ASN1BitString, .ASN1Encoding, .ASN1Primitive, .DERBitString, org.bouncycastle.asn1.mozilla.PublicKeyAndChallenge, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .SubjectPublicKeyInfo, org.bouncycastle.operator.ContentVerifier, .ContentVerifierProvider, .OperatorCreationException, org.bouncycastle.util.Encodable

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

Modifier and TypeField and Description
protected final SignedPublicKeyAndChallenge

Constructor Summary

AccessConstructor and Description
public
protected

Method Summary

Modifier and TypeMethod and Description
public String
public byte[]
getEncoded()

Implements org.bouncycastle.util.Encodable.getEncoded.

Return a byte array representing the implementing object.
public PublicKey
getPublicKey(String provider)

Deprecated use JcaSignedPublicKeyAndChallenge.getPublicKey()
public PublicKeyAndChallenge
public SubjectPublicKeyInfo
public boolean
public ASN1Primitive
toASN1Primitive()

Deprecated use toASN1Structure
public SignedPublicKeyAndChallenge

Returns:

a SignedPublicKeyAndChallenge object.
toASN1Structure
()

Return the underlying ASN.1 structure for this challenge.

public boolean
verify()

Deprecated use ContentVerifierProvider method
public boolean
verify(String provider)

Deprecated use ContentVerifierProvider method
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

spkacSeqback to summary
protected final SignedPublicKeyAndChallenge spkacSeq

Constructor Detail

SignedPublicKeyAndChallengeback to summary
public SignedPublicKeyAndChallenge(byte[] bytes)
SignedPublicKeyAndChallengeback to summary
protected SignedPublicKeyAndChallenge(SignedPublicKeyAndChallenge struct)

Method Detail

getChallengeback to summary
public String getChallenge()
getEncodedback to summary
public byte[] getEncoded() throws IOException

Implements org.bouncycastle.util.Encodable.getEncoded.

Doc from org.bouncycastle.util.Encodable.getEncoded.

Return a byte array representing the implementing object.

Returns:byte[]

a byte array representing the encoding.

Exceptions
IOException:
if an issue arises generation the encoding.
getPublicKeyback to summary
public PublicKey getPublicKey(String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException

Deprecated

use JcaSignedPublicKeyAndChallenge.getPublicKey()

getPublicKeyAndChallengeback to summary
public PublicKeyAndChallenge getPublicKeyAndChallenge()
getSubjectPublicKeyInfoback to summary
public SubjectPublicKeyInfo getSubjectPublicKeyInfo()
isSignatureValidback to summary
public boolean isSignatureValid(ContentVerifierProvider verifierProvider) throws OperatorCreationException, IOException
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Deprecated

use toASN1Structure

toASN1Structureback to summary
public SignedPublicKeyAndChallenge toASN1Structure()

Return the underlying ASN.1 structure for this challenge.

Returns:SignedPublicKeyAndChallenge

a SignedPublicKeyAndChallenge object.

verifyback to summary
public boolean verify() throws NoSuchAlgorithmException, SignatureException, NoSuchProviderException, InvalidKeyException

Deprecated

use ContentVerifierProvider method

verifyback to summary
public boolean verify(String provider) throws NoSuchAlgorithmException, SignatureException, NoSuchProviderException, InvalidKeyException

Deprecated

use ContentVerifierProvider method