DCIT / perl-Crypt-JWT

Other
54 stars 18 forks source link

encode_jwt fails when used in pre-compiled into apache #23

Closed PreDeToR closed 4 years ago

PreDeToR commented 4 years ago

Hi Guys

I run some API's in perl. When I use the module in a cgi script it runs fine, yet when I take that cgi script and run it as a compiled apache module it fails everytime.

I have the key in a pem file that gets read, and base on my logs it looks exactly correct.

FATAL: ecc_import_pkcs8 failed: Invalid input packet. at /usr/local/share/perl/5.26.1/Crypt/JWT.pm line 63.

$pem_key_string = /bin/cat /tmp/New.PEM; my $digest1 = encode_jwt(payload=>$json, alg=>'ES256',extra_headers=>{kid=>$key,alg=>"ES256"}, key=>\$pem_key_string);

Any ideas on how to fix this ?

karel-m commented 4 years ago

I have no idea.