anchor.diff:        [{ssl, true}]).
   
   connect_with_client_cert_test() ->
  -    lists:foreach(fun application:start/1, [crypto, ssl]),
  +    lists:foreach(fun application:start/1, [crypto, public_key, ssl]),
   
       Dir = filename:join(filename:dirname(code:which(pgsql_tests)), "../test_data"),
       File = fun(Name) -> filename:join(Dir, Name) end,
  -    {ok, [{cert, Der, _}]} = public_key:pem_to_der(File("epgsql.crt")),
  -    {ok, Cert} = public_key:pkix_decode_cert(Der, plain),
  +    {ok, CertBin} = file:read_file(File("epgsql.crt")),
  +    [{'Certificate', Der, _}] = public_key:pem_decode(CertBin),
  +    Cert = public_key:pkix_decode_cert(Der, plain),
       #'TBSCertificate'{serialNumber = Serial} = Cert#'Certificate'.tbsCertificate,
       Serial2 = list_to_binary(integer_to_list(Serial)),
   
  
positive.code: -export([run_tests/0]).
  
  -include_lib("eunit/include/eunit.hrl").
  -include_lib("ssl/include/OTP-PKIX.hrl").
  -include("pgsql.hrl").
  
  -define(host, "localhost").
  
negative.code: 
  
  connect_with_ssl_test() ->
      lists:foreach(fun application:start/1, [crypto, public_key, ssl]),
      with_connection(
        fun(C) ->
                {ok, _Cols, [{true}]} = pgsql:equery(C, "select ssl_is_used()")
  