0

ssl and Metadata are used in the client. but how to coding the server? I do not find the api which use ssl and Metadata without certificate. like this : How to add metadata to nodejs grpc call

  • const sslCreds = grpc.ServerCredentials.createSsl( null, [{ private_key: sslServerKey, cert_chain: sslServerCrt }], true, ); on the server, the function createSsl must need the second param for Certificate verify. How to coding without certificate validation? – dreamy.zhang Sep 26 '17 at 01:54
  • or use the othre scheme, both not use ssl. But need to add the Metadata to the channel. const metadataUpdater = (serviceUrl, callback) => { }; const metadataCreds = grpc.credentials.createFromMetadataGenerator(metadataUpdater); const sslCreds = grpc.credentials.createInsecure() const combinedCreds = grpc.credentials.combineChannelCredentials(sslCreds, metadataCreds); const client = new serviceProto(serviceServerUrl, combinedCreds, clientOptions); But that's not right! – dreamy.zhang Sep 27 '17 at 00:37

0 Answers0