Skip to content

getSubjectPublicKey

Import the subject public key of a parsed certificate or CSR as a WebCrypto CryptoKey.

ts
function getSubjectPublicKey<TMap extends ExtensionDecoderMap>(
	parsed: ParsedCertificate<TMap> | ParsedCertificateSigningRequest<TMap>,
	algorithm?: PublicKeyImportInput,
): Promise<ImportKeyResult<CryptoKey>>

Parameters

See also

  • getSubjectPublicKeyOrThrow for the throwing variant

Released under the MIT License.