aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_key/src/pubkey_cert.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2014-03-26 10:15:18 +0100
committerHans Nilsson <[email protected]>2014-03-26 10:15:18 +0100
commitf253f7f3a17ca2bfcfb66f0c2ba1f832cb37ea80 (patch)
treeed941367d4981d88038dfd59f13bc89cc731d6c2 /lib/public_key/src/pubkey_cert.erl
parent3dd90c7ee48fc615bb74805fc13e5f9498fc933c (diff)
parent8c8999af805265704ce0a3029c85a33f4d42c145 (diff)
downloadotp-f253f7f3a17ca2bfcfb66f0c2ba1f832cb37ea80.tar.gz
otp-f253f7f3a17ca2bfcfb66f0c2ba1f832cb37ea80.tar.bz2
otp-f253f7f3a17ca2bfcfb66f0c2ba1f832cb37ea80.zip
Merge branch 'hans/ssl/add_pull_req_crl_fixes/OTP-11761'
* hans/ssl/add_pull_req_crl_fixes/OTP-11761: ssl, pubkey: Code and test adjustments Rework IDP validation according to the RFC, fix public_key tests Various improvements to CRL handling
Diffstat (limited to 'lib/public_key/src/pubkey_cert.erl')
-rw-r--r--lib/public_key/src/pubkey_cert.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/public_key/src/pubkey_cert.erl b/lib/public_key/src/pubkey_cert.erl
index d9288e99bb..ae517ca642 100644
--- a/lib/public_key/src/pubkey_cert.erl
+++ b/lib/public_key/src/pubkey_cert.erl
@@ -319,6 +319,8 @@ verify_fun(Otpcert, Result, UserState0, VerifyFun) ->
%%
%% Description: Extracts a specific extension from a list of extensions.
%%--------------------------------------------------------------------
+select_extension(_, asn1_NOVALUE) ->
+ undefined;
select_extension(_, []) ->
undefined;
select_extension(Id, [#'Extension'{extnID = Id} = Extension | _]) ->
@@ -342,8 +344,11 @@ match_name(uniformResourceIdentifier, URI, [PermittedName | Rest]) ->
incomplete ->
false;
{_, _, Host, _, _} ->
- match_name(fun is_valid_host_or_domain/2, Host,
- PermittedName, Rest)
+ PN = case split_uri(PermittedName) of
+ {_, _, PNhost, _, _} -> PNhost;
+ _X -> PermittedName
+ end,
+ match_name(fun is_valid_host_or_domain/2, Host, PN, Rest)
end;
match_name(emailAddress, Name, [PermittedName | Rest]) ->