let p12buffer = fs.readFileSync('./wncsslp12/keyStore', 'binary');
const asn = forge.asn1.fromDer(p12buffer, false);
In above code input p12 file is valid p12 file. I can read it using pem package. the asn1.fromDer function not able to convert bytebuffer into DER format.
Error: Only 8, 16, 24, or 32 bits supported: 872
at _checkBitsParam (c:\Certificates\node_modules\node-forge\lib\util.js:152:11)
at ByteStringBuffer.util.ByteStringBuffer.getInt (c:\Certificates\node_modules\node-forge\lib\util.js:541:3)
at _getValueLength (c:\Certificates\node_modules\node-forge\lib\asn1.js:396:20)
at _fromDer (c:\Certificates\node_modules\node-forge\lib\asn1.js:481:16)
at Object.asn1.fromDer (c:\Certificates\node_modules\node-forge\lib\asn1.js:448:10)
at Object.<anonymous> (c:\Certificates\readp12.js:4:24)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
Process exited with code 1
In above code input p12 file is valid p12 file. I can read it using pem package. the asn1.fromDer function not able to convert bytebuffer into DER format.
keyStore.zip