Nodejs - Windows密钥/证书存储 [英] Nodejs - Windows Key/Certificate store

查看:505
本文介绍了Nodejs - Windows密钥/证书存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都有任何指针,如何我可以使用nodeJs与密钥/证书存储交互?我特别想要添加/删除证书和可能的密钥。

Does anybody have any pointers as to how I could go about interacting with the Key/Certificate store using nodeJs? I specifically want to add/remove certificates and possibly keys.

更新。

因此,这里的方法是使用edge。非常好的工作!

So the way to go here is to use "edge". Very nice work!

https://github.com/ tjanczuk / edge

推荐答案

不知道太多的设置在这里是一个指针如何互动。

Without knowing too much about your setup here is a stab at a 'pointer' as to how to interact.

您可以尝试使用节点子进程,然后生成一个进程到命令行,并与键/证书存储以您将通过命令行的方式交互。 Microsoft可能证书管理器工具

You could try using Nodes Child Process and then spawning out a process to the commandline and interact with the key/certificate store the way you would via command line. Microsofts certificate manager tool perhaps?

粗糙示例:

var exec = require('child_process').exec,
child;

child = exec('certmgr /add /all /c myFile.ext newFile.ext', 

function (error, stdout, stderr) {
  console.log('stdout: ' + stdout);
  console.log('stderr: ' + stderr);
  if (error !== null) {
    console.log('exec error: ' + error);
  }
});

这篇关于Nodejs - Windows密钥/证书存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆