anchor.diff:                              end];
           [{KeyType,Key,_}|_] -> [{key, {KeyType, Key}}]
       end.
  -
  --spec decode_cert_key({file, list()} | {bin, binary()}) -> list().
  -decode_cert_key({file, CertFile}) when is_list(CertFile) ->
  -    {ok, CertBin} = file:read_file(CertFile),
  -    decode_cert_key({bin,CertBin});
  -decode_cert_key({bin,CertBin}) when is_binary(CertBin) ->
  -    [public_key:pem_entry_decode(Cert)
  -     || Cert <- public_key:pem_decode(CertBin)].
  
positive.code:                            imemSslOpts,[],'$no_ssl_conf',
                             "SSL listen socket options") of
                         '$no_ssl_conf' ->
                             CertFile = filename:join(
                                         [Pwd, proplists:get_value(certfile, Opts)]),
                             KeyFile = filename:join(
                                         [Pwd, proplists:get_value(keyfile, Opts)]),
                             ImemSslDefault =
                             [{versions, ['tlsv1.2','tlsv1.1',tlsv1]} |
                              get_cert_key({file, CertFile}) ++
                              get_cert_key({file, KeyFile})],
                             ?Info("Installing SSL certificates ~p~nKeys ~p",
                                   [catch decode_cert_key({file, CertFile}),
                                    catch decode_cert_key({file, KeyFile})]),
                             ?PUT_CONFIG(
                                imemSslOpts, [], ImemSslDefault,
                                list_to_binary(
                                  io_lib:format("Installed at ~p on ~s",
                                                [node(), imem_datatype:timestamp_to_io(os:timestamp())]
                                               ))),
                             ImemSslDefault ++
                             proplists:delete(keyfile, proplists:delete(certfile, Opts));
                         ImemSslDefault ->
                             ImemSslDefault ++ 
                             proplists:delete(keyfile, proplists:delete(certfile, Opts))
                     end;
                 true -> Opts
  
negative.code: %% -- Certificate management interface --
  %%
  
  -spec get_cert_key(binary()) -> [{cert | cacerts | key, any()}].
  get_cert_key(Bin) when is_binary(Bin) ->
      case public_key:pem_decode(Bin) of
          [{'Certificate',Cert,not_encrypted} | Certs] ->
              CACerts = [C || {'Certificate',C,not_encrypted} <- Certs],
  