pkcs12 generation for EC key types using javascript


I’m generating p12 for EC keytypes using Forge library. https://github.com/digitalbazaar/forge/issues/777

This library already providing p12 for RSA key types, Now, I’m trying to enhance to ECC keytypes.

  1. Generating pem format Privatekey, certs into asn1 format private key. Here I’ve written ECPrivateValidator to validate and convert into asn1 format private key.
  class: asn1.Class.UNIVERSAL,   tag: asn1.Type.SEQUENCE,   capture: 'privateKeyInfo',   value: [{     name: 'PrivateKeyInfo.Version',     class: asn1.Class.UNIVERSAL,     tag: asn1.Type.INTEGER,     capture: 'privateKeyVersion'   }] }``` Can you guide me if you have any thoughts on it?