diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-09-01 18:41:54 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-09-01 18:41:54 +0400 |
commit | 843358c0d81dfce0432a39a3518119683238941e (patch) | |
tree | 69e45ed3704b6699b4054d538f0ebb324a39c412 /core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java | |
parent | 61079ceeeab6a248e6e641c526cbd0b95735e437 (diff) |
Make use of the SignatureAndHashAlgorithm when processing
CertificateVerify
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java b/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java index eefaf41c..a7edc5c7 100644 --- a/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java +++ b/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java @@ -425,14 +425,14 @@ public class TlsServerProtocol // Verify the CertificateVerify message contains a correct signature. try { - TlsSigner tlsSigner = TlsUtils.createTlsSigner(this.clientCertificateType); - tlsSigner.init(getContext()); - org.bouncycastle.asn1.x509.Certificate x509Cert = this.peerCertificate.getCertificateAt(0); SubjectPublicKeyInfo keyInfo = x509Cert.getSubjectPublicKeyInfo(); AsymmetricKeyParameter publicKey = PublicKeyFactory.createKey(keyInfo); - tlsSigner.verifyRawSignature(clientCertificateVerify.getSignature(), publicKey, this.certificateVerifyHash); + TlsSigner tlsSigner = TlsUtils.createTlsSigner(this.clientCertificateType); + tlsSigner.init(getContext()); + tlsSigner.verifyRawSignature(clientCertificateVerify.getAlgorithm(), + clientCertificateVerify.getSignature(), publicKey, this.certificateVerifyHash); } catch (Exception e) { |