Skip to content

Commit

Permalink
Fix OpenSSL config.
Browse files Browse the repository at this point in the history
  • Loading branch information
tschoffelen committed Apr 21, 2023
1 parent 20e5803 commit 1247dce
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/PKPass.php
Expand Up @@ -435,11 +435,16 @@ protected function createSignature($manifest)

$certs = [];
if (!openssl_pkcs12_read($pkcs12, $certs, $this->certPass)) {
if (strstr(openssl_error_string(), 'digital envelope routines::unsupported')) {
$error = '';
while ($text = openssl_error_string()) {
$error .= $text;
}
if (strstr($error, 'digital envelope routines::unsupported')) {
throw new PKPassException(
'Could not read certificate file. This might be related ' .
'to using an OpenSSL version that has deprecated some older ' .
'hashes. More info here: https://schof.link/2Et6z3m'
'hashes. More info here: https://schof.link/2Et6z3m\n\n' .
'OpenSSL error: ' . $error
);
}
throw new PKPassException(
Expand Down

0 comments on commit 1247dce

Please sign in to comment.