Dexus/pem

Feature Request - Support for pkcs8

Open

#174 建立於 2017年10月21日

在 GitHub 查看
 (3 留言) (1 反應) (0 負責人)JavaScript (126 fork)github user discovery
enhancementgood first issuehelp wanted

倉庫指標

Star
 (574 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Simple read function for pkcs8 files - I've built something for this (in the process of.. simple as), will push for review if successful. Additional function in pem.js

Use case: Verify/Read any pkcs8 file

Openssl steps

1.) Create a private key pair openssl req -x509 -newkey rsa:4096 -keyout test.pem -out test.crt -days 365 -subj "/C=Test/ST=Test/L=London/O=Pemjs/OU=Pemjs/CN=Pemjs.com" -passout pass:Password

2.) Convert to PKCS8 format openssl pkcs8 -inform pem -in test.pem -topk8 -outform der -out test.p8 -v1 PBE-SHA1-3DES -passin pass:Password -passout pass:Password

3.) Extract private key from pkcs8 file. openssl pkcs8 -in test.p8 -inform DER -v1 PBE-SHA1-3DES -passin pass:Password

4.) Do something with it....

Considerations 1.) Inform could be an unknown, check DER, check PEM 2.) Encryption alg could be an unknown, explicit support for strong algs only?

貢獻者指南