bref icon indicating copy to clipboard operation
bref copied to clipboard

Openssl error

Open giagara opened this issue 1 year ago • 2 comments

Description:

I've deployed a simple function to create a key pair, using spatie/crypto. When i call the function openssl_pkey_new i get false instead of a OpenSSLAsymmetricKey

How to reproduce:

  • install bref
  • install spatie/crypto
  • call [$privateKey, $publicKey] = (new KeyPair())->generate();
  • get the error

I'm using docker with this command:

docker run --rm -it --entrypoint= -v $(PWD):/var/task:ro bref/php-82:2 vendor/bin/bref-local index.php

The complete error catched with openssl_error_string() is:

error:FFFFFFFF80000002:system library::No such file or directory
error:10000080:BIO routines::no such file
error:07000072:configuration file routines::no such file
error:FFFFFFFF80000002:system library::No such file or directory
error:10000080:BIO routines::no such file
error:07000072:configuration file routines::no such file

giagara avatar Feb 10 '24 10:02 giagara

FYI this might be related to https://github.com/brefphp/aws-lambda-layers/issues/154

mnapoli avatar Feb 10 '24 11:02 mnapoli

FYI this might be related to brefphp/aws-lambda-layers#154

yes: as a workaround i see that using phpseclib the keys are getting generated.

giagara avatar Feb 10 '24 16:02 giagara