Use string rather than bytes for server credentials.
This commit is contained in:
@@ -66,8 +66,8 @@ class MotorServicer(motorService_pb2_grpc.CarControlServicer):
|
||||
pvtKeyPath = '/home/pi/tls/device.key'
|
||||
pvtCertPath = '/home/pi/tls/device.crt'
|
||||
|
||||
pvtKeyBytes = open(pvtKeyPath, 'rb').read()
|
||||
pvtCertBytes = open(pvtCertPath, 'rb').read()
|
||||
pvtKeyBytes = open(pvtKeyPath).read()
|
||||
pvtCertBytes = open(pvtCertPath).read()
|
||||
|
||||
return grpc.ssl_server_credentials([pvtKeyBytes, pvtCertBytes])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user