diff options
author | Ingela Anderton Andin <[email protected]> | 2012-02-09 10:50:03 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2012-02-09 10:50:03 +0100 |
commit | dc2073a096f15bfc170454518b5d4b2afc129401 (patch) | |
tree | a2d5811d4f4a491dcd94671b70417ccafdec5349 /lib/ssl/src/ssl_handshake.erl | |
parent | 354c3e6a9b7979292fbf2c154b59da3dc1e8c1dc (diff) | |
parent | 25b2354cc9bcf09c87dc65526936e976fe95d3fd (diff) | |
download | otp-dc2073a096f15bfc170454518b5d4b2afc129401.tar.gz otp-dc2073a096f15bfc170454518b5d4b2afc129401.tar.bz2 otp-dc2073a096f15bfc170454518b5d4b2afc129401.zip |
Merge branch 'ia/ssl/verify_fun' into maint
* ia/ssl/verify_fun:
User defined verify_fun is now called correctly
Diffstat (limited to 'lib/ssl/src/ssl_handshake.erl')
-rw-r--r-- | lib/ssl/src/ssl_handshake.erl | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl index 371f475c85..542033e6ce 100644 --- a/lib/ssl/src/ssl_handshake.erl +++ b/lib/ssl/src/ssl_handshake.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2007-2011. All Rights Reserved. +%% Copyright Ericsson AB 2007-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -188,14 +188,14 @@ certify(#certificate{asn1_certificates = ASN1Certs}, CertDbHandle, CertDbRef, ValidationFunAndState = case VerifyFunAndState of undefined -> - {fun(OtpCert, ExtensionOrError, SslState) -> + {fun(OtpCert, ExtensionOrVerifyResult, SslState) -> ssl_certificate:validate_extension(OtpCert, - ExtensionOrError, SslState) + ExtensionOrVerifyResult, SslState) end, Role}; {Fun, UserState0} -> - {fun(OtpCert, ExtensionOrError, {SslState, UserState}) -> + {fun(OtpCert, {extension, _} = Extension, {SslState, UserState}) -> case ssl_certificate:validate_extension(OtpCert, - ExtensionOrError, + Extension, SslState) of {valid, NewSslState} -> {valid, {NewSslState, UserState}}; @@ -204,8 +204,11 @@ certify(#certificate{asn1_certificates = ASN1Certs}, CertDbHandle, CertDbRef, SslState); {unknown, _} -> apply_user_fun(Fun, OtpCert, - ExtensionOrError, UserState, SslState) - end + Extension, UserState, SslState) + end; + (OtpCert, VerifyResult, {SslState, UserState}) -> + apply_user_fun(Fun, OtpCert, VerifyResult, UserState, + SslState) end, {Role, UserState0}} end, |