mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Update typescript to properly reflect the format of the certificate received by the checkServerIdentity callback.
This commit is contained in:
parent
34930310d2
commit
045d938bc8
6
packages/grpc-native-core/index.d.ts
vendored
6
packages/grpc-native-core/index.d.ts
vendored
@ -794,13 +794,17 @@ declare module "grpc" {
|
||||
ERROR,
|
||||
}
|
||||
|
||||
export interface Certificate {
|
||||
raw: Buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* A callback that will receive the expected hostname and presented peer
|
||||
* certificate as parameters. The callback should return an error to
|
||||
* indicate that the presented certificate is considered invalid and
|
||||
* otherwise returned undefined.
|
||||
*/
|
||||
export type CheckServerIdentityCallback = (hostname: string, cert: string) => Error | undefined;
|
||||
export type CheckServerIdentityCallback = (hostname: string, cert: Certificate) => Error | undefined;
|
||||
|
||||
/**
|
||||
* Additional peer verification options that can be set when creating
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user