Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Privacy mechanism 'des' causing exception with PHP 8.3 #23

Open
dkatrig opened this issue Dec 5, 2024 · 1 comment
Open

Privacy mechanism 'des' causing exception with PHP 8.3 #23

dkatrig opened this issue Dec 5, 2024 · 1 comment

Comments

@dkatrig
Copy link

dkatrig commented Dec 5, 2024

Using this package with PHP 8.3 I was trapped in an exception caused by a call of openssl_encrypt in the PrivacyTrait.php module. The message was 'Unable to encrypt the scopedPdu using des'.

It took a while to figure out that the cipher algorithm alias that was passed is actually 'des-cbc', defined in DESPrivacyModule.php. The opensll extension of PHP 8.3 doesn't know this anymore. I checked this by calling openssl_get_cipher_methods. All available algorithms with 'des' are shown in this pic:

des

Replacing the alias with each of these available ciphers led to a success using 'des-ede3-cbc' instead of 'des-cbc'. This was successfully tested with several printers using SNMP v3 and DES as privacy protocol.

I suppose to change that.
Kind regards, Georg

@ChadSikorra
Copy link
Contributor

Thank you for reporting this! I'll look into updating this for newer versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants