anchor.diff:  %%%===================================================================
   %%% Internal functions
   %%%===================================================================
  -
  -%%--------------------------------------------------------------------
  -%% @private @doc Caches OZ CA certificates.
  -%% @end
  -%%--------------------------------------------------------------------
  --spec cache_oz_cacerts(CaCerts :: [binary()]) -> ok.
  -cache_oz_cacerts(CaCerts) ->
  -    try
  -        ets:new(?OZ_ENDPOINT_CACHE, [set, public, named_table]),
  -        ets:insert(?OZ_ENDPOINT_CACHE, {cacerts, CaCerts})
  -    catch
  -        _:Reason ->
  -            ?warning("Cannot cache OZ CA certificates due to: ~p", [Reason])
  -    end,
  -    ok.
   
   %%--------------------------------------------------------------------
   %% @private @doc Returns properly formatted auth headers 
  
positive.code: 
  -export_type([auth/0, client/0, params/0, urn/0]).
  
  -define(OZ_ENDPOINT_CACHE, oz_endpoint_cache).
  
  %%%===================================================================
  %%% API
  %%%===================================================================
  
negative.code:     ]).
  
  %%--------------------------------------------------------------------
  %% @doc Returns cached OZ CA certificates or loads them from a directory given
  %% by a oz_plugin:get_cacerts_dir/0 callback and stores them in the cache.
  %% @end
  %%--------------------------------------------------------------------
  -spec get_oz_cacerts() -> CaCerts :: [binary()].
  get_oz_cacerts() ->
      case application:get_env(ctool, oz_cacerts) of
          {ok, CaCerts} -> CaCerts;
          undefined ->
              CaCertDir = oz_plugin:get_cacerts_dir(),
              case file_utils:read_files({dir, CaCertDir}) of
                  {ok, CaCerts} ->
                      application:set_env(ctool, oz_cacerts, CaCerts),
                      CaCerts;
                  {error, Reason} ->
                      ?error("Cannot load OZ CA certificates due to: ~p", [Reason]),
                      []
              end
      end.
  
  %%--------------------------------------------------------------------
  