Skip to content

Commit

Permalink
Print log when using ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Apr 22, 2024
1 parent 076de49 commit 0bcef7e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/RPCServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,15 +609,19 @@ export default class RPCServer {
const reflection = new ReflectionService(pkg);
reflection.addToServer(server);
}
const useSecure = this.caCrt || this.serverCrt || this.serverKey;
if(useSecure){
console.log("Using secure connection");
}
server.bindAsync(
`${this.addr}:${this.port}`,
this.caCrt || this.serverCrt || this.serverKey
useSecure
? GRPC.ServerCredentials.createSsl(
this.caCrt||null,
this.caCrt || null,
[
{
private_key: this.serverKey||null,
cert_chain: this.serverCrt||null,
private_key: this.serverKey || null,
cert_chain: this.serverCrt || null,
},
],
false
Expand Down

0 comments on commit 0bcef7e

Please sign in to comment.