Anyone tried to sign a text with #JS #WebCryptoApi and verify with #PHP openssl_verify?

Tried with alpine based PHP 7.4, 8.1, 8.2 (with error message) and 8.3 (without error message). To use another base also tried centos / almalinux 8 with php 7.4 (with error message) without success...

"error:0909006C:PEM routines:get_name:no start line"

But pub key as pem is fine (exportKey method as spki).

Found many similar problems but no solution. Also an php issue that some versions have such a bug with openssl_verify.

Maybe someone tested it sucessfully and could tell me some details of the test setup like base os, php version, ... ?

Reply to this note

Please Login to reply.

Discussion

Mh... Looks like php openssl_*() not supporting ECDSA for sign / verify with sha-256 and no more with sha-1

The method "openssl_get_md_methods()" no more shows "ecdsa-with-SHA1"...

😞