Azure / iot-identity-service

Source of the Azure IoT Identity Service and related services.
MIT License
37 stars 46 forks source link

Use plaintext buffer equal in length to the ciphertext buffer for PKCS#11 decrypt. #487

Closed arsing closed 1 year ago

arsing commented 1 year ago

The previous code used a plaintext buffer that was 16 bytes smaller than the ciphertext buffer, because the ciphertext was known to include a 16-byte tag. However at least SoftHSM requires the plaintext buffer to be at least as big as the ciphertext buffer. So this commit makes it so.

Fixes #486