diff options
author | Ingela Anderton Andin <[email protected]> | 2010-10-01 11:39:30 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2010-10-01 11:39:30 +0200 |
commit | 132e46f29297ab3de25b33bd52ddbad078900276 (patch) | |
tree | f9241b069e803936f80f5d90ec06a9a5ac946e55 /lib/public_key/src/public_key.erl | |
parent | 800a07c5a386a79465ad33e5015ba20bad2ccc62 (diff) | |
parent | 9c6842dbbe45bdf1568f165cc135257c4addbe0e (diff) | |
download | otp-132e46f29297ab3de25b33bd52ddbad078900276.tar.gz otp-132e46f29297ab3de25b33bd52ddbad078900276.tar.bz2 otp-132e46f29297ab3de25b33bd52ddbad078900276.zip |
Merge branch 'maint-r14' into dev
Conflicts:
lib/public_key/src/pubkey_cert.erl
Diffstat (limited to 'lib/public_key/src/public_key.erl')
-rw-r--r-- | lib/public_key/src/public_key.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/public_key/src/public_key.erl b/lib/public_key/src/public_key.erl index aa3018bd2d..095a6ff0e0 100644 --- a/lib/public_key/src/public_key.erl +++ b/lib/public_key/src/public_key.erl @@ -556,9 +556,16 @@ validate(DerCert, #path_validation_state{working_issuer_name = Issuer, %% We want the key_usage extension to be checked before we validate %% the signature. - UserState0 = pubkey_cert:validate_signature(OtpCert, DerCert, + UserState6 = pubkey_cert:validate_signature(OtpCert, DerCert, Key, KeyParams, UserState5, VerifyFun), - UserState = pubkey_cert:verify_fun(OtpCert, valid, UserState0, VerifyFun), + UserState = case Last of + false -> + pubkey_cert:verify_fun(OtpCert, valid, UserState6, VerifyFun); + true -> + pubkey_cert:verify_fun(OtpCert, valid_peer, + UserState6, VerifyFun) + end, + ValidationState = ValidationState1#path_validation_state{user_state = UserState}, |