• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Forwarded to devs Phar Binary broken signature (PHP 7.1 - 8.2)

hschramm

Basic Pleskian
Username: hschramm

TITLE


Phar Binary broken signature (PHP 7.1 - 8.2)

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

PLESK Obsidian, 18.0.49.1, Debian Buster (10), 64 Bit

PROBLEM DESCRIPTION

Running the phar Cli results in a stack trace error

Bash:
PHP Fatal error:  Uncaught PharException: phar "/opt/plesk/php/8.0/bin/phar.phar" SHA1 signature could not be verified: broken signature in /opt/plesk/php/8.0/bin/phar.phar:57
Stack trace:
#0 /opt/plesk/php/8.0/bin/phar.phar(57): Phar::mapPhar()
#1 {main}
  thrown in /opt/plesk/php/8.0/bin/phar.phar on line 57

This happens accross all versions beginning from 7.1 to 8.2

STEPS TO REPRODUCE

Run the phar cli binary like
Bash:
/opt/plesk/php/8.0/bin/phar

More tests:
To assure that it is not a local installation problem, I downloaded the plesk-php-cli package via wget, extracted it, and run the extracted phar binary. It results in the same error

ACTUAL RESULT

Not working, signature is broken

EXPECTED RESULT

working

ANY ADDITIONAL INFORMATION

(DID NOT ANSWER QUESTION)

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
this may be related to the openssl version in use, resp. the ciphers accepted.

on newer os (like almalinux 9 resp. centos) this error is caused by the default crypto policies applied.
in this case openssl does neither create nor verify sha1 signatures.

a quick workaround is to switch to weak, but compatible crypto policies with:

Code:
# update-crypto-policies --show
DEFAULT  
(note this to restore later)

# update-crypto-policies --set LEGACY

final fix is to recreate the signed phar with a supported and stronger signature cipher.


 
Back
Top