verifySpkac

import { Buffer } from 'node:buffer';
const { Certificate } = await import('node:crypto');

const spkac = getSpkacSomehow();
console.log(Certificate.verifySpkac(Buffer.from(spkac)));
// Prints: true or false

Since

v9.0.0

Return

true if the given spkac data structure is valid, false otherwise.

Parameters

encoding

The encoding of the spkac string.