PeculiarVentures / PKI.js

PKI.js is a pure JavaScript library implementing the formats that are used in PKI applications (signing, encryption, certificate requests, OCSP and TSP requests/responses). It is built on WebCrypto (Web Cryptography API) and requires no plug-ins.
http://pkijs.org
Other
1.25k stars 204 forks source link

Read privateKey, publickey and x509 cert from .p12 file #274

Closed almacenero closed 3 years ago

almacenero commented 4 years ago

Please add any example for read all parameters necesary for extract privateKey, publickey and x509 cert to pass to xades-bes library. All these from a .p12 token with password security

YuryStrozhevsky commented 4 years ago
  1. Example 1
  2. Example 2
  3. Example 3

Be aware that due to lack of 3-DES algorithm in WebCrypto API it is not possible to use common .p12 files in browser, full .p12 support only on Node.js evironment.

rmhrisk commented 4 years ago
  1. Example 1
  2. Example 2
  3. Example 3

Be aware that due to lack of 3-DES algorithm in WebCrypto API it is not possible to use common .p12 files in browser, full .p12 support only on Node.js evironment.

You can use webcrypto-liner In browser which has 3DES. You will have to add a custom engine.