Skip to content

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

@dkatrig

Description

@dkatrig

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions