Example #1
0
def main(unused_argv):
    aead.register()
    daead.register()
    hybrid.register()
    mac.register()
    prf.register()
    signature.register()
    streaming_aead.register()
    jwt.register_jwt_mac()
    fake_kms.register_client()
    server = grpc.server(futures.ThreadPoolExecutor(max_workers=2))
    testing_api_pb2_grpc.add_MetadataServicer_to_server(
        services.MetadataServicer(), server)
    testing_api_pb2_grpc.add_KeysetServicer_to_server(
        services.KeysetServicer(), server)
    testing_api_pb2_grpc.add_AeadServicer_to_server(services.AeadServicer(),
                                                    server)
    testing_api_pb2_grpc.add_DeterministicAeadServicer_to_server(
        services.DeterministicAeadServicer(), server)
    testing_api_pb2_grpc.add_MacServicer_to_server(services.MacServicer(),
                                                   server)
    testing_api_pb2_grpc.add_PrfSetServicer_to_server(
        services.PrfSetServicer(), server)
    testing_api_pb2_grpc.add_HybridServicer_to_server(
        services.HybridServicer(), server)
    testing_api_pb2_grpc.add_SignatureServicer_to_server(
        services.SignatureServicer(), server)
    testing_api_pb2_grpc.add_StreamingAeadServicer_to_server(
        services.StreamingAeadServicer(), server)
    testing_api_pb2_grpc.add_JwtServicer_to_server(jwt_service.JwtServicer(),
                                                   server)
    server.add_secure_port('[::]:%d' % FLAGS.port,
                           grpc.local_server_credentials())
    server.start()
    server.wait_for_termination()
Example #2
0
def main(unused_argv):
  aead.register()
  server = grpc.server(futures.ThreadPoolExecutor(max_workers=2))
  testing_api_pb2_grpc.add_KeysetServicer_to_server(KeysetServicer(), server)
  testing_api_pb2_grpc.add_AeadServicer_to_server(AeadServicer(), server)
  server.add_secure_port('[::]:%d' % FLAGS.port,
                         grpc.local_server_credentials())
  server.start()
  server.wait_for_termination()