Created
August 29, 2022 17:36
-
-
Save notmedia/9af957f2109887723cb5ee4330f2c64d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getChannelCredentials(): ChannelCredentials { | |
const rootCert = fs.readFileSync(path.resolve(__dirname, '../certs/ca-cert.pem')); | |
const clientCert = fs.readFileSync(path.resolve(__dirname, '../certs/client-cert.pem')); | |
const clientKey = fs.readFileSync(path.resolve(__dirname, '../certs/client-key.pem')); | |
const channelCredentials = ChannelCredentials.createSsl(rootCert, clientKey, clientCert); | |
return channelCredentials; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment