From 0f77d574b9a92170513523ba71527ae29c9ab100 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 27 Mar 2014 18:07:42 +0100 Subject: ssl: fix crl test suite error with unexpected web server response --- lib/ssl/test/ssl_crl_SUITE.erl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/ssl') 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]), -- cgit v1.2.3