Be more defensive when openssl (#895)

This commit is contained in:
Alex Kirk 2024-09-18 14:46:00 +02:00 committed by GitHub
parent 63fc9ebef6
commit 9d1decf582
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -94,10 +94,12 @@ class Signature {
$key = \openssl_pkey_new( $config );
$priv_key = null;
$detail = array();
if ( $key ) {
\openssl_pkey_export( $key, $priv_key );
\openssl_pkey_export( $key, $priv_key );
$detail = \openssl_pkey_get_details( $key );
$detail = \openssl_pkey_get_details( $key );
}
// check if keys are valid
if (