FAQs


FAQsCode Signing
Fixing VBA Macro Digital Signature error
Updated on July 17, 2024
You may encounter an error while signing a VBA Macro using a code signing certificate installed in a SafeNet Token. This article will help you understand why the error occurs and the workaround to enable you sign the VBA Macro.
Error: "There was a problem with the digital certificate. The VBA project could not be signed. The signature will be discarded."

Root Cause: Microsoft Excel VBA uses a MD5 hash padding for one of the triple signing procedures in case to support cross-version compatibility. The usage of MD5 might not be obvious, as the certificate and key material on the smartcard / eToken are based on more modern and secure algorithms. This is the reason why you get an error while signing a Excel Macro using your the code signing certificate stored on a SafeNet token.
Solution: For signing Microsoft Excel macros, the deprecated algorithms need to be activated by adding a registry key under "HKEY_LOCAL_MACHINE\SOFTWARESafeNet\Authentication\SAC\"
Steps to Modify the Registry to enable the Deprecated Cryptographic Algorithms.
Reference: SafeNet Article Details KB0024651
Error: "There was a problem with the digital certificate. The VBA project could not be signed. The signature will be discarded."
Root Cause: Microsoft Excel VBA uses a MD5 hash padding for one of the triple signing procedures in case to support cross-version compatibility. The usage of MD5 might not be obvious, as the certificate and key material on the smartcard / eToken are based on more modern and secure algorithms. This is the reason why you get an error while signing a Excel Macro using your the code signing certificate stored on a SafeNet token.
Solution: For signing Microsoft Excel macros, the deprecated algorithms need to be activated by adding a registry key under "HKEY_LOCAL_MACHINE\SOFTWARESafeNet\Authentication\SAC\"
Steps to Modify the Registry to enable the Deprecated Cryptographic Algorithms.
- Open the Windows Registry Editor.
- Run > Regedit
- Expand to HKEY_LOCAL_MACHINE\SOFTWARE\SafeNet\Authentication\SAC\
- Right Click on “SAC” Key to create a new Key, and name it as “Crypto”
- Right Click on “Crypto” key and add new String value.
- Value Name : Disable-Crypto
- Value Data : None
- After updating the registry, you should restart the computer to apply the changes.
Reference: SafeNet Article Details KB0024651
Need help?
Need help making a purchase? Contact us today to get your certificate issued right away.
Live chat
Click the button below or click "Chat with an Expert" to start chatting with us now!