Package org.bouncycastle.mozilla
Class SignedPublicKeyAndChallenge
- java.lang.Object
-
- org.bouncycastle.mozilla.SignedPublicKeyAndChallenge
-
- All Implemented Interfaces:
org.bouncycastle.util.Encodable
- Direct Known Subclasses:
JcaSignedPublicKeyAndChallenge
public class SignedPublicKeyAndChallenge extends java.lang.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 Summary
Fields Modifier and Type Field Description protected org.bouncycastle.asn1.mozilla.SignedPublicKeyAndChallenge
spkacSeq
-
Constructor Summary
Constructors Modifier Constructor Description SignedPublicKeyAndChallenge(byte[] bytes)
protected
SignedPublicKeyAndChallenge(org.bouncycastle.asn1.mozilla.SignedPublicKeyAndChallenge struct)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getChallenge()
byte[]
getEncoded()
java.security.PublicKey
getPublicKey(java.lang.String provider)
Deprecated.use JcaSignedPublicKeyAndChallenge.getPublicKey()org.bouncycastle.asn1.mozilla.PublicKeyAndChallenge
getPublicKeyAndChallenge()
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo
getSubjectPublicKeyInfo()
boolean
isSignatureValid(ContentVerifierProvider verifierProvider)
org.bouncycastle.asn1.ASN1Primitive
toASN1Primitive()
Deprecated.use toASN1Structureorg.bouncycastle.asn1.mozilla.SignedPublicKeyAndChallenge
toASN1Structure()
Return the underlying ASN.1 structure for this challenge.boolean
verify()
Deprecated.use ContentVerifierProvider methodboolean
verify(java.lang.String provider)
Deprecated.use ContentVerifierProvider method
-
-
-
Method Detail
-
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, java.io.IOException
- Throws:
OperatorCreationException
java.io.IOException
-
verify
public boolean verify() throws java.security.NoSuchAlgorithmException, java.security.SignatureException, java.security.NoSuchProviderException, java.security.InvalidKeyException
Deprecated.use ContentVerifierProvider method- Throws:
java.security.NoSuchAlgorithmException
java.security.SignatureException
java.security.NoSuchProviderException
java.security.InvalidKeyException
-
verify
public boolean verify(java.lang.String provider) throws java.security.NoSuchAlgorithmException, java.security.SignatureException, java.security.NoSuchProviderException, java.security.InvalidKeyException
Deprecated.use ContentVerifierProvider method- Throws:
java.security.NoSuchAlgorithmException
java.security.SignatureException
java.security.NoSuchProviderException
java.security.InvalidKeyException
-
getSubjectPublicKeyInfo
public org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getSubjectPublicKeyInfo()
-
getChallenge
public java.lang.String getChallenge()
-
getPublicKey
public java.security.PublicKey getPublicKey(java.lang.String provider) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.InvalidKeyException
Deprecated.use JcaSignedPublicKeyAndChallenge.getPublicKey()- Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
java.security.InvalidKeyException
-
getEncoded
public byte[] getEncoded() throws java.io.IOException
- Specified by:
getEncoded
in interfaceorg.bouncycastle.util.Encodable
- Throws:
java.io.IOException
-
-