* @deprecated Use getKey instead. * @param path The path to the key. * @param subject The subject of the key. * @param altNames The alternative names of the key. * @returns The key.
(path?: string, subject?: string, alt_names?: string[])
| 464 | * @returns The key. |
| 465 | */ |
| 466 | async deriveKey(path?: string, subject?: string, alt_names?: string[]): Promise<GetTlsKeyResponse> { |
| 467 | console.warn('deriveKey is deprecated, please use getKey instead'); |
| 468 | let raw: Record<string, any> = { path: path || '', subject: subject || path || '' } |
| 469 | if (alt_names && alt_names.length) { |
| 470 | raw['alt_names'] = alt_names |
| 471 | } |
| 472 | const payload = JSON.stringify(raw) |
| 473 | const result = await send_rpc_request<GetTlsKeyResponse>(this.endpoint, '/prpc/Tappd.DeriveKey', payload) |
| 474 | const asUint8Array = (length?: number) => x509key_to_uint8array(result.key, length) |
| 475 | return Object.freeze({ |
| 476 | ...result, |
| 477 | asUint8Array, |
| 478 | __name__: 'GetTlsKeyResponse', |
| 479 | }) |
| 480 | } |
| 481 | |
| 482 | /** |
| 483 | * @deprecated Use getQuote instead. |
no outgoing calls
no test coverage detected