Class SignedPublicKeyAndChallenge

java.lang.Object
org.bouncycastle.mozilla.SignedPublicKeyAndChallenge
All Implemented Interfaces:
org.bouncycastle.util.Encodable
Direct Known Subclasses:
JcaSignedPublicKeyAndChallenge

public class SignedPublicKeyAndChallenge extends Object implements 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 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.
    • getPublicKeyAndChallenge

      public org.bouncycastle.asn1.mozilla.PublicKeyAndChallenge getPublicKeyAndChallenge()
    • isSignatureValid

      public boolean isSignatureValid(ContentVerifierProvider verifierProvider) throws OperatorCreationException, IOException
      Throws:
      OperatorCreationException
      IOException
    • getSubjectPublicKeyInfo

      public org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getSubjectPublicKeyInfo()
    • getChallenge

      public String getChallenge()
    • getEncoded

      public byte[] getEncoded() throws IOException
      Specified by:
      getEncoded in interface org.bouncycastle.util.Encodable
      Throws:
      IOException