Use server credentials for server

This commit is contained in:
Piv
2019-11-17 17:23:30 +10:30
parent 6d3c5fd5ae
commit 4a6bd8bd64

View File

@@ -69,7 +69,7 @@ class MotorServicer(motorService_pb2_grpc.CarControlServicer):
pvtKeyBytes = open(pvtKeyPath, 'rb').read() pvtKeyBytes = open(pvtKeyPath, 'rb').read()
pvtCertBytes = open(pvtCertPath, 'rb').read() pvtCertBytes = open(pvtCertPath, 'rb').read()
return grpc.ssl_channel_credentials(pvtCertBytes, pvtKeyBytes) return grpc.ssl_server_credentials([pvtKeyBytes, pvtCertBytes])
motor = Motor() motor = Motor()
servo = Servo(servo_pin) servo = Servo(servo_pin)