abac0-leakabac0-meicompt_changesgec13mei-idmei-rt0-nmei_rt0mei_rt2mei_rt2_fix_1meiyap-rt1meiyap1rt2tvf-new-xml
Last change
on this file since f7040d8 was
5a71bac,
checked in by Mike Ryan <mikeryan@…>, 14 years ago
|
partial python preprover
appears M2Crypto's SSL is buggy
|
-
Property mode set to
100755
|
File size:
609 bytes
|
Rev | Line | |
---|
[5a71bac] | 1 | #!/usr/bin/python |
---|
| 2 | |
---|
| 3 | from server import server |
---|
| 4 | from util import fedd_ssl_context |
---|
| 5 | from select import select, error |
---|
| 6 | |
---|
| 7 | ctx = None |
---|
| 8 | while ctx == None: |
---|
| 9 | try: |
---|
| 10 | ctx = fedd_ssl_context('server.pem') |
---|
| 11 | except Exception, e: |
---|
| 12 | if str(e) != "bad decrypt": |
---|
| 13 | raise |
---|
| 14 | |
---|
| 15 | s = server(('127.0.0.1', 8000), ctx) |
---|
| 16 | |
---|
| 17 | while True: |
---|
| 18 | try: |
---|
| 19 | i, o, e = select((s,), (), (), 1.0) |
---|
| 20 | if s in i: s.handle_request() |
---|
| 21 | except error: |
---|
| 22 | # The select call seems to get interrupted by signals as well as |
---|
| 23 | # the main thread. This essentially ignores signals in this |
---|
| 24 | # thread. |
---|
| 25 | pass |
---|
Note: See
TracBrowser
for help on using the repository browser.