diff options
author | Péter Dimitrov <[email protected]> | 2018-02-13 14:39:56 +0100 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2018-03-08 10:12:07 +0100 |
commit | 02cca684ec0180f4f05faf3be5f8e7d71964fac0 (patch) | |
tree | efd5fe8142fb54359a5b4cb08a40b9b9c60a7e0e /lib/ssl/src/ssl_crl_cache.erl | |
parent | 6e8744ef12f44640f9422170fb14acd1a3666158 (diff) | |
download | otp-02cca684ec0180f4f05faf3be5f8e7d71964fac0.tar.gz otp-02cca684ec0180f4f05faf3be5f8e7d71964fac0.tar.bz2 otp-02cca684ec0180f4f05faf3be5f8e7d71964fac0.zip |
ssl: Use uri_string
Change-Id: I1249b93b1e4a971cf1af2cb96a65563e23117e2b
Diffstat (limited to 'lib/ssl/src/ssl_crl_cache.erl')
-rw-r--r-- | lib/ssl/src/ssl_crl_cache.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ssl/src/ssl_crl_cache.erl b/lib/ssl/src/ssl_crl_cache.erl index 8817b0c884..66f46da75f 100644 --- a/lib/ssl/src/ssl_crl_cache.erl +++ b/lib/ssl/src/ssl_crl_cache.erl @@ -92,8 +92,8 @@ delete({der, CRLs}) -> ssl_manager:delete_crls({?NO_DIST_POINT, CRLs}); delete(URI) -> - case http_uri:parse(URI) of - {ok, {http, _, _ , _, Path,_}} -> + case uri_string:normalize(URI, [return_map]) of + #{scheme := "http", path := Path} -> ssl_manager:delete_crls(string:trim(Path, leading, "/")); _ -> {error, {only_http_distribution_points_supported, URI}} @@ -103,8 +103,8 @@ delete(URI) -> %%% Internal functions %%-------------------------------------------------------------------- do_insert(URI, CRLs) -> - case http_uri:parse(URI) of - {ok, {http, _, _ , _, Path,_}} -> + case uri_string:normalize(URI, [return_map]) of + #{scheme := "http", path := Path} -> ssl_manager:insert_crls(string:trim(Path, leading, "/"), CRLs); _ -> {error, {only_http_distribution_points_supported, URI}} @@ -161,7 +161,7 @@ http_get(URL, Rest, CRLDbInfo, Timeout) -> cache_lookup(_, undefined) -> []; cache_lookup(URL, {{Cache, _}, _}) -> - {ok, {_, _, _ , _, Path,_}} = http_uri:parse(URL), + #{path := Path} = uri_string:normalize(URL, [return_map]), case ssl_pkix_db:lookup(string:trim(Path, leading, "/"), Cache) of undefined -> []; |