anchor.diff:  read_certificate({ok, Path}) ->
       case read_pem_entries(Path) of
           [Certificate] ->
  -            ?SETCONFIG(cert, Certificate),
  +            ?SETCONFIG(cert, public_key:pem_entry_decode(Certificate)),
               true;
           _ ->
               lager:error("Init: certificate ~p invalid", [Path]),
  
positive.code:             true;
          _ ->
              lager:error("Init: dh-file ~p is invalid", [Path]),
              false
      end;
  read_dhparam(_) ->
      lager:warning("Init: no dh-file configured [dh_file]!"),
      ?SETCONFIG(dhparam, none),
      true.
  
  read_pem_entries(Path) ->
  
negative.code:     case read_pem_entries(Path) of
          [] ->
              lager:error("Init: ca chain ~p is empty", [Path]),
              ?UNSETCONFIG(cachain),
              false;
          PemCerts ->
              Decode = fun(Pem, List) ->
                               [ public_key:pem_entry_decode(Pem) | List ]
                       end,
              Certs = lists:foldl(Decode, [], PemCerts),
              ?SETCONFIG(cachain, Certs),
              true
      end;
  read_cachain(_) ->
      lager:warning("Init: no ca-chain-file configured [cachain_file]!"),
      ?UNSETCONFIG(cachain),
      true.
  
  read_dhparam({ok, none}) ->
      lager:warning("Init: no dh-file configured [dh_file]!"),
      ?UNSETCONFIG(dhparam),
      true;
  read_dhparam({ok, Path}) ->
      case read_pem_entries(Path) of
  