The manual is not constistent at this point. On one hand, it describes the return as digest/fingerprint of a cert, on the other hand it says:
bool openssl_x509_fingerprint( … )
On PHP 5.6.5, I only get the bool return (1 or 0).
(PHP 5 >= 5.6.0, PHP 7, PHP 8)
openssl_x509_fingerprint — Calcule l'empreinte, ou le digest d'un certificat X.509 donné
$x509
, string $hash_algorithm
= "sha1"
, bool $raw_output
= false
) : bool
La fonction openssl_x509_fingerprint() retourne le digest
d'un certificat x509
sous la forme d'une chaîne de caractères.
x509
Voir les paramètres clés/Certificats pour une liste de valeurs valides.
hash_algorithm
La méthode de digest ou l'algorithme de hachage à utiliser, par exemple "sha256", l'un de openssl_get_md_methods().
raw_output
Lorsque définit à true
, affiche les données brutes binaires.
false
affiche en hexits minuscules.
Retourne une chaîne de caractères contenant l'empreinte calculé du certificat sous la forme
d'hexits minuscule sauf si raw_output
est définit à true
dans ce cas la représentation brûte binaire du message digest est retournée.
Retourne false
en cas d'échec.
The manual is not constistent at this point. On one hand, it describes the return as digest/fingerprint of a cert, on the other hand it says:
bool openssl_x509_fingerprint( … )
On PHP 5.6.5, I only get the bool return (1 or 0).