类:X509Certificate
【Class: X509Certificate】
封装 X509 证书,并提供对其信息的只读访问。
【Encapsulates an X509 certificate and provides read-only access to its information.】
const { X509Certificate } = await import('node:crypto');
const x509 = new X509Certificate('{... pem encoded cert ...}');
console.log(x509.subject);const { X509Certificate } = require('node:crypto');
const x509 = new X509Certificate('{... pem encoded cert ...}');
console.log(x509.subject);