digitalbazaar / forge

A native implementation of TLS in Javascript and tools to write crypto-based and network-heavy webapps

Home Page:https://digitalbazaar.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pkcs12FromAsn1 Timeout on lambda

victors1681 opened this issue · comments

I'm trying to run my script on lambda but the process never completes and get stuck pkcs12FromAsn1 Task timed out after 3.05 seconds I'm using node 16.x locally and works fine and the same version in the lambda function

      const p12Der = forge.util.decode64(p12file);  
      const p12Asn1 = forge.asn1.fromDer(p12Der); 
      const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, this.passphrase); //HERE TIMEOUT
      const key = this.getKeyFromP12(p12);
      const cert = this.getCertificateFromP12(p12);

well, I had to increase the Lambda Timeout to 6s. and started to work