org.bouncycastle.mozilla

Class SignedPublicKeyAndChallenge

Implemented Interfaces:
DEREncodable

public class SignedPublicKeyAndChallenge
extends ASN1Encodable

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
  }
  

Constructor Summary

SignedPublicKeyAndChallenge(byte[] bytes)

Method Summary

PublicKey
getPublicKey(String provider)
PublicKeyAndChallenge
getPublicKeyAndChallenge()
DERObject
toASN1Object()
boolean
verify(String provider)

Methods inherited from class org.bouncycastle.asn1.ASN1Encodable

equals, getDERObject, getEncoded, hashCode, toASN1Object

Constructor Details

SignedPublicKeyAndChallenge

public SignedPublicKeyAndChallenge(byte[] bytes)

Method Details

getPublicKey

public PublicKey getPublicKey(String provider)
            throws NoSuchAlgorithmException,
                   NoSuchProviderException,
                   InvalidKeyException


getPublicKeyAndChallenge

public PublicKeyAndChallenge getPublicKeyAndChallenge()


toASN1Object

public DERObject toASN1Object()
Overrides:
toASN1Object in interface ASN1Encodable


verify

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