def getCAPublicKey(): lines = [] ignore = False with open(settings.get_ssl_ca_filename()) as key: for line in key: if "PRIVATE" in line: ignore = not ignore elif not ignore: lines.append(line) return "".join(lines)
def start(): global server print >>sys.stderr, "Starting RPC server..." def wrapError(error, method, args, kwargs): error = handleError(error, method, args, kwargs) return sslrpc2.Failure(error.raw) for config in settings.get_own_interface_config(): server = sslrpc2.Server(('0.0.0.0', config['port']), beforeExecute=logCall, onError=wrapError, keyfile=settings.get_ssl_key_filename(), certfile=settings.get_ssl_cert_filename(), ca_certs=settings.get_ssl_ca_filename(), cert_reqs=ssl.CERT_REQUIRED) server.registerContainer(api) util.start_thread(server.serve_forever) print >>sys.stderr, "done."
def start(): global server print >> sys.stderr, "Starting RPC server..." def wrapError(error, method, args, kwargs): error = handleError(error, method, args, kwargs) return sslrpc2.Failure(error.raw) for config in settings.get_own_interface_config(): server = sslrpc2.Server(('0.0.0.0', config['port']), beforeExecute=logCall, onError=wrapError, keyfile=settings.get_ssl_key_filename(), certfile=settings.get_ssl_cert_filename(), ca_certs=settings.get_ssl_ca_filename(), cert_reqs=ssl.CERT_REQUIRED) server.registerContainer(api) util.start_thread(server.serve_forever) print >> sys.stderr, "done."