aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2014-03-27 18:07:42 +0100
committerHans Nilsson <[email protected]>2014-03-28 10:27:14 +0100
commit0f77d574b9a92170513523ba71527ae29c9ab100 (patch)
tree02778122edb19dc225c952c2357ecd517d432898 /lib/ssl/test
parentf558e4a3744333507a92fb8fbbf8dc58a254f05f (diff)
downloadotp-0f77d574b9a92170513523ba71527ae29c9ab100.tar.gz
otp-0f77d574b9a92170513523ba71527ae29c9ab100.tar.bz2
otp-0f77d574b9a92170513523ba71527ae29c9ab100.zip
ssl: fix crl test suite error with unexpected web server response
Diffstat (limited to 'lib/ssl/test')
-rw-r--r--lib/ssl/test/ssl_crl_SUITE.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/ssl/test/ssl_crl_SUITE.erl b/lib/ssl/test/ssl_crl_SUITE.erl
index da0349904c..4eacf3adfc 100644
--- a/lib/ssl/test/ssl_crl_SUITE.erl
+++ b/lib/ssl/test/ssl_crl_SUITE.erl
@@ -494,9 +494,15 @@ fetch([{uniformResourceIdentifier, "http"++_=URL}|Rest]) ->
_ ->
ct:log("~p:~p~npublic_key:pem_entry_decode,~nBody=~p~n)",[?MODULE,?LINE,{'CertificateList', Body, not_encrypted}]),
%% assume DER encoded
- CertList = public_key:pem_entry_decode(
- {'CertificateList', Body, not_encrypted}),
- {Body, CertList}
+ try
+ public_key:pem_entry_decode({'CertificateList', Body, not_encrypted})
+ of
+ CertList -> {Body, CertList}
+ catch
+ _C:_E ->
+ ct:log("~p:~p~nfailed DER assumption~nRest=~p", [?MODULE,?LINE,Rest]),
+ fetch(Rest)
+ end
end;
{error, _Reason} ->
ct:log("~p:~p~nfailed to get CRL ~p~n", [?MODULE,?LINE, _Reason]),