Skip to content
This repository
Browse code

use new public_key functions to decode cert

  • Loading branch information...
commit b03c9efa4fafc5590c70029c41df56c69c679f86 1 parent 4acc379
Will Glozer authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  test_src/pgsql_tests.erl
3  test_src/pgsql_tests.erl
@@ -49,7 +49,8 @@ connect_with_client_cert_test() ->
49 49
50 50 Dir = filename:join(filename:dirname(code:which(pgsql_tests)), "../test_data"),
51 51 File = fun(Name) -> filename:join(Dir, Name) end,
52   - {ok, Cert} = ssl_pkix:decode_cert_file(File("epgsql.crt"), [pem, pkix]),
  52 + {ok, [{cert, Der, _}]} = public_key:pem_to_der(File("epgsql.crt")),
  53 + {ok, Cert} = public_key:pkix_decode_cert(Der, plain),
53 54 #'TBSCertificate'{serialNumber = Serial} = Cert#'Certificate'.tbsCertificate,
54 55 Serial2 = list_to_binary(integer_to_list(Serial)),
55 56

0 comments on commit b03c9ef

Please sign in to comment.
Something went wrong with that request. Please try again.