digitalbazaar / forge

A native implementation of TLS in Javascript and tools to write crypto-based and network-heavy webapps
https://digitalbazaar.com/
Other
5.01k stars 767 forks source link

pkcs12FromAsn1 Timeout on lambda #1044

Closed victors1681 closed 11 months ago

victors1681 commented 11 months ago

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);
victors1681 commented 11 months ago

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