aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_handshake.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2010-07-07 14:45:02 +0200
committerIngela Anderton Andin <[email protected]>2010-07-07 14:45:02 +0200
commit299e223038502d4b1a7faaea096ca6efc88b5d9e (patch)
tree4b3f5c91644e755a9a1ba4e8c581c0b1d9254efe /lib/ssl/src/ssl_handshake.erl
parentc752a4ea65c744ac283cc277717f8defa15ae610 (diff)
parentdc67a89b7eccc8df60063c7c56aa26f8b1ef30ad (diff)
downloadotp-299e223038502d4b1a7faaea096ca6efc88b5d9e.tar.gz
otp-299e223038502d4b1a7faaea096ca6efc88b5d9e.tar.bz2
otp-299e223038502d4b1a7faaea096ca6efc88b5d9e.zip
Merge branch 'ia/ssl/dsa_client_cert/OTP-8721' into dev
Diffstat (limited to 'lib/ssl/src/ssl_handshake.erl')
-rw-r--r--lib/ssl/src/ssl_handshake.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl
index 3811906d77..fcc30f6137 100644
--- a/lib/ssl/src/ssl_handshake.erl
+++ b/lib/ssl/src/ssl_handshake.erl
@@ -304,9 +304,15 @@ certificate_verify(Signature, {_, PublicKey, _}, Version,
end;
certificate_verify(Signature, {_, PublicKey, PublicKeyParams}, Version,
MasterSecret, dhe_dss = Algorithm, {_, Hashes0}) ->
- Hashes = calc_certificate_verify(Version, MasterSecret,
- Algorithm, Hashes0),
- public_key:verify_signature(Hashes, sha, Signature, PublicKey, PublicKeyParams).
+ Hashes = calc_certificate_verify(Version, MasterSecret,
+ Algorithm, Hashes0),
+ case public_key:verify_signature(Hashes, none, Signature, PublicKey, PublicKeyParams) of
+ true ->
+ valid;
+ false ->
+ ?ALERT_REC(?FATAL, ?BAD_CERTIFICATE)
+ end.
+
%%--------------------------------------------------------------------
-spec certificate_request(#connection_states{}, certdb_ref()) ->