Class JcaTlsDSSVerifier
- java.lang.Object
-
- org.bouncycastle.tls.crypto.impl.jcajce.JcaTlsDSSVerifier
-
- All Implemented Interfaces:
TlsVerifier
- Direct Known Subclasses:
JcaTlsDSAVerifier
,JcaTlsECDSAVerifier
public abstract class JcaTlsDSSVerifier extends java.lang.Object implements TlsVerifier
JCA base class for the verifiers implementing the two DSA style algorithms from FIPS PUB 186-4: DSA and ECDSA.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
algorithmName
protected short
algorithmType
protected JcaTlsCrypto
crypto
protected java.security.PublicKey
publicKey
-
Constructor Summary
Constructors Modifier Constructor Description protected
JcaTlsDSSVerifier(JcaTlsCrypto crypto, java.security.PublicKey publicKey, short algorithmType, java.lang.String algorithmName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TlsStreamVerifier
getStreamVerifier(DigitallySigned signature)
boolean
verifyRawSignature(DigitallySigned signedParams, byte[] hash)
Return true if the passed in signature and hash represent a real signature.
-
-
-
Field Detail
-
crypto
protected final JcaTlsCrypto crypto
-
publicKey
protected final java.security.PublicKey publicKey
-
algorithmType
protected final short algorithmType
-
algorithmName
protected final java.lang.String algorithmName
-
-
Constructor Detail
-
JcaTlsDSSVerifier
protected JcaTlsDSSVerifier(JcaTlsCrypto crypto, java.security.PublicKey publicKey, short algorithmType, java.lang.String algorithmName)
-
-
Method Detail
-
getStreamVerifier
public TlsStreamVerifier getStreamVerifier(DigitallySigned signature) throws java.io.IOException
- Specified by:
getStreamVerifier
in interfaceTlsVerifier
- Throws:
java.io.IOException
-
verifyRawSignature
public boolean verifyRawSignature(DigitallySigned signedParams, byte[] hash)
Description copied from interface:TlsVerifier
Return true if the passed in signature and hash represent a real signature.- Specified by:
verifyRawSignature
in interfaceTlsVerifier
- Parameters:
signedParams
- the signature object containing the signature to be verified.hash
- the hash calculated for the signature.- Returns:
- true if signature verifies, false otherwise.
-
-