/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/https_server.py

  • Committer: Vincent Ladeuil
  • Date: 2012-01-19 17:14:27 UTC
  • mto: (6437.3.18 2.5)
  • mto: This revision was merged to the branch mainline in revision 6444.
  • Revision ID: v.ladeuil+lp@free.fr-20120119171427-xhxthhw3mtz35hpf
The https test server will now refuse connections if an ssl error occurs during the handshake. Ssl errors and certificate errors aborts requests without re-trying them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        serving = test_server.TestingTCPServerMixin.verify_request(
50
50
            self, request, client_address)
51
51
        if serving:
52
 
            request.do_handshake()
 
52
            try:
 
53
                request.do_handshake()
 
54
            except ssl.SSLError, e:
 
55
                # FIXME: We proabaly want more tests to capture which ssl
 
56
                # errors are worth reporting but mostly our tests want an https
 
57
                # server that works -- vila 2012-01-19
 
58
                return False
53
59
        return serving
54
60
 
55
61
    def ignored_exceptions_during_shutdown(self, e):