Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use new public_key functions to decode cert

  • Loading branch information...
commit b03c9efa4fafc5590c70029c41df56c69c679f86 1 parent 4acc379
Will Glozer authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  test_src/pgsql_tests.erl
3  test_src/pgsql_tests.erl
View
@@ -49,7 +49,8 @@ connect_with_client_cert_test() ->
Dir = filename:join(filename:dirname(code:which(pgsql_tests)), "../test_data"),
File = fun(Name) -> filename:join(Dir, Name) end,
- {ok, Cert} = ssl_pkix:decode_cert_file(File("epgsql.crt"), [pem, pkix]),
+ {ok, [{cert, Der, _}]} = public_key:pem_to_der(File("epgsql.crt")),
+ {ok, Cert} = public_key:pkix_decode_cert(Der, plain),
#'TBSCertificate'{serialNumber = Serial} = Cert#'Certificate'.tbsCertificate,
Serial2 = list_to_binary(integer_to_list(Serial)),
Please sign in to comment.
Something went wrong with that request. Please try again.