equal
deleted
inserted
replaced
1 # Server code |
|
2 import AuthentificateXMLRPCServer |
|
3 import SecureXMLRPCServer |
|
4 |
|
5 class SecureAuthentificateXMLRPCRequestHandler(SecureXMLRPCServer.SecureXMLRPCRequestHandler,AuthentificateXMLRPCServer.AuthentificateXMLRPCRequestHandler): |
|
6 def do_POST(self): |
|
7 AuthentificateXMLRPCServer.AuthentificateXMLRPCRequestHandler.do_POST(self) |
|
8 |
|
9 |
|
10 def test(): |
|
11 server = SecureXMLRPCServer.SecureXMLRPCServer(("localhost", 8000),requestHandler=SecureAuthentificateXMLRPCRequestHandler,certificate="./certs/test.cert.pem",privatekey="./certs/test.key.pem") |
|
12 server.relam="xmlrpc" |
|
13 server.register_introspection_functions() |
|
14 server.register_function(lambda x: x*x, 'square') |
|
15 server.serve_forever() |
|
16 |
|
17 if __name__ == '__main__': |
|
18 test() |
|
19 |
|
20 |
|