Skip to content

openssl_cipher_iv_length and openssl 3.0  #170

Closed
@crequill

Description

@crequill

On archlinux, php7 has been updated with openssl 3.0 and now it's impossible to open a connection in phpldapadmin: connection is anonymous and is rejected by ldap server.
For information, the problem is in lib/functions.php line 772:

if (! empty($data) && function_exists('openssl_encrypt') && in_array('bf-ecb', openssl_get_cipher_methods())) {
    $keylen = openssl_cipher_iv_length('bf-ecb') * 2; 
    $dataenc = openssl_encrypt($data, 'bf-ecb', substr($secret,0,$keylen)); 
    return openssl_encrypt($data, 'bf-ecb', substr($secret,0,$keylen));
  }

$keylen is always 0, so openssl_encrypt return nothing

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