當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。