Skip to content

openssl_free_key() is deprecated in PHP8 #178

@stronk7

Description

@stronk7

From the php80 release notes:

. The openssl_x509_free() function is deprecated and no longer has an effect,
instead the OpenSSLCertificate instance is automatically destroyed if it is no
longer referenced.
. The openssl_pkey_free() (and its alias openssl_free_key)
function is deprecated and no longer has an effect,
instead the OpenSSLAsymmetricKey instance is automatically destroyed if it is no
longer referenced.

And there is a case of openssl_free_key() @ S3.php

Maybe it should be replaced to something like:

if (PHP_MAJOR_VERSION < 8) {
    openssl_free_key(self::$__signingKeyResource);
}
self::$__signingKeyResource = null;

Ciao :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions