CakeFest 2024: The Official CakePHP Conference

署名アルゴリズム

OPENSSL_ALGO_DSS1 (int)
OPENSSL_ALGO_SHA1 (int)
openssl_sign() および openssl_verify() のデフォルトアルゴリズムとして用いられます。
OPENSSL_ALGO_SHA224 (int)
OPENSSL_ALGO_SHA256 (int)
OPENSSL_ALGO_SHA384 (int)
OPENSSL_ALGO_SHA512 (int)
OPENSSL_ALGO_RMD160 (int)
OPENSSL_ALGO_MD5 (int)
OPENSSL_ALGO_MD4 (int)
OPENSSL_ALGO_MD2 (int)
この定数が使えるのは PHP のコンパイル時に MD2 サポートを有効にした場合だけになりました。 MD2 サポートを有効にするには、PHP のコンパイル時に -DHAVE_OPENSSL_MD2_H CFLAG を渡し、かつ OpenSSL 1.0.0 以降のコンパイル時に enable-md2 を指定する必要があります。
add a note

User Contributed Notes 1 note

up
1
tim at remitone dot com
8 months ago
It should be noted that the default signature algorithm used by openssl_sign() and openssl_verify (OPENSSL_ALGO_SHA1) is no longer supported by default in OpenSSL Version 3 series.

With an up to date OpenSSL library, one has to run
"update-crypto-policies --set LEGACY"
on the server where the library resides in order to allow these functions to work without the optional alternative algorithm argument.
To Top