mirror of https://github.com/grpc/grpc-node.git
Update typescript to properly reflect the format of the certificate received by the checkServerIdentity callback.
This commit is contained in:
parent
34930310d2
commit
045d938bc8
|
@ -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…
Reference in New Issue