当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Node.js X509Certificate用法及代码示例


类:X509Certificate

添加于:v15.6.0

封装 X509 证书并提供对其信息的只读访问。

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);

相关用法


注:本文由纯净天空筛选整理自nodejs.org大神的英文原创作品 X509Certificate。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。