zmstone 1 год назад
Родитель
Сommit
50736f85a4

+ 18 - 5
apps/emqx/src/emqx_ssl_crl_cache.erl

@@ -40,11 +40,24 @@
 %%----------------------------------------------------------------------
 %% Purpose: Simple default CRL cache
 %%
-%% The cache is an opaque term created by ssl_pkix_db:create/1.
-%% It is essentially an ETS table, created as ssl_otp_crl_cache
-%% not not named.
-%% The cache key is named `Path` in ssl_manager module, but we override
-%% it to the full URL binary format.
+%% The cache is a part of an opaque term named DB created by `ssl_manager'
+%% from calling `ssl_pkix_db:create/1'.
+%%
+%% Insert and delete operations are abstracted by `ssl_manager'.
+%% Read operation is done by passing-through the DB term to
+%% `ssl_pkix_db:lookup/2'.
+%%
+%% The CRL cache in the DB term is essentially an ETS table.
+%% The table is created as `ssl_otp_crl_cache', but not
+%% a named table. You can find the table reference from `ets:i()'.
+%%
+%% The cache key in the original OTP implementation was the path part of the
+%% CRL distribution point URL. e.g. if the URL is `http://foo.bar.com/crl.pem'
+%% the cache key would be `"crl.pem"'.
+%% There is however no type spec for the APIs, nor there is any check
+%% on the format, making it possible to use the full URL binary
+%% string as key instead --- which can avoid cache key clash when
+%% different DPs share the same path.
 %%----------------------------------------------------------------------
 
 -module(emqx_ssl_crl_cache).

+ 1 - 1
apps/emqx_management/test/emqx_mgmt_api_clients_SUITE.erl

@@ -515,7 +515,7 @@ t_persistent_sessions5(Config) ->
             lists:foreach(fun stop_and_commit/1, [C1, C2]),
 
             %% the order of the durable session list is not stable
-            %% se we make sure one request is to list all in-mem,
+            %% so we make sure one request is to list all in-mem,
             %% and then the next is to list all durable.
             P3 =
                 ?retry(200, 10, begin