Skip to content

MD5 fingerprint not available by default in libssh2 HEAD, test fails #100

Description

@rainerjung

libssh2 > 1.11.1 (current HEAD) introduces new build time defines that control, which crypto algorithms are enabled. Most of the optional ones will be disabled by default. See https://raw.githubusercontent.com/libssh2/libssh2/refs/heads/master/RELEASE-NOTES.

The ssh2 extension provides and uses the MD5 fingerprint functionality unconditionally. This will fail for the next libssh2 release, eg. in the unit test tests/ssh2_connect.phpt:

---- EXPECTED OUTPUT
**Connect
bool(true)
string(12) "SSH2 Session"
**Fingerprint MD5
bool(true)
int(32)
bool(true)
...
---- ACTUAL OUTPUT
**Connect
bool(true)
string(12) "SSH2 Session"
**Fingerprint MD5

Warning: ssh2_fingerprint(): Unable to retrieve fingerprint from specified session in /path/to/tests/ssh2_connect.php on line 9
bool(false)
int(0)

Deprecated: ctype_xdigit(): Argument of type bool will be interpreted as string in the future in /path/to/tests/ssh2_connect.php on line 12
bool(false)

I think there is currently no nice way to detect MD5 availability in libssh2. I opened libssh2/libssh2#2161 there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions