Troubleshooting Tip: SCEP decryption failure with aes-256-cbc encryption
Description
This article describes the cause of SCEP decryption failures on FortiAuthenticator when receiving enrollment requests encrypted with aes-256-cbc from certain third-party devices.
Scope
FortiAuthenticator, FortiManager, FortiGate.
Solution
When a third-party device uses aes-256-cbc encryption for SCEP enrollment requests, FortiAuthenticator may fail to decrypt the PKCS#7 enveloped data. This results in a decryption failure during the SCEP process.
Root cause:
The issue is caused by a compatibility problem in how FortiAuthenticator handles SCEP requests encrypted with aes-256-cbc.
While other encryption methods like des-ede3-cbc work correctly, requests using aes-256-cbc trigger a decryption error in the SCEP daemon.
Symptoms:
The following error messages appear in the FortiAuthenticator debug logs:
PKCS7 message encrypted with aes-256-cbc (427)
utils.cpp:386: decryption failed
mo_pkcs7unwrap.cpp:526: cannot decrypt PKCS#7 enveloped data
error:1C800064:Provider routines:ossl_cipher_unpadblock:bad decrypt
Resolution:
This is a known issue tracked under engineering ticket 1198353 and is expected to be resolved in an upcoming FortiAuthenticator 8.0.4 GA release.
