ts-spiffe
Version:
typescript client for spiffe
25 lines • 1.07 kB
TypeScript
import { X509Certificate } from "@peculiar/x509";
import { SpiffeId } from "../spiffeid";
import { X509SVID, X509SVIDResponse } from "../proto/public/workload";
export declare class X509Svid {
readonly certificate: Uint8Array;
readonly privateKey: Uint8Array;
readonly hint: string;
readonly bundle: Uint8Array;
private logger;
constructor(certificate: Uint8Array, privateKey: Uint8Array, hint: string, bundle: Uint8Array);
getSpiffeId(): Promise<SpiffeId>;
getLeaf(): Promise<X509Certificate>;
getLeafAsPEM(): Promise<string | undefined>;
getIntermediateAsPEM(): Promise<string | undefined>;
getBundle(): Promise<X509Certificate | undefined>;
getBundleAsPEM(): Promise<string | undefined>;
getKeyAsPEM(): Promise<string | undefined>;
private arrayBufferToString;
private derToPem;
private getCertificate;
private getPEM;
static getX509Svid(x509svid: X509SVID): Promise<X509Svid>;
static getX509SvidFromStream(response: X509SVIDResponse): Promise<X509Svid>;
}
//# sourceMappingURL=X509Svid.d.ts.map