I have PHP code that signs request using openssl_sign:
if (($pkeyid = openssl_pkey_get_private($keystr)) === false) { $this->setError('Cannot retrieve private key from: ' . $this->getParam('keyFile')); return false; } if (!openssl_sign($message, $sign, $pkeyid, OPENSSL_ALGO_SHA1)) { $this->setError('Cannot sign with private key'); return false; } It is working normally when code is run in CLI, but under Apache (php 5.2.17 as module) line with !openssl_sign($message, $sign, $pkeyid, OPENSSL_ALGO_SHA1) results in segfault (11).
$pkeyid = openssl_pkey_get_private($keystr) gives valid key.
Have someone encountered such error? What is solution if any? Alternatives compliant with openssl_sign? How it could be rapidly diagnosed?