-
Notifications
You must be signed in to change notification settings - Fork 711
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
Minidriver function CardRSADecrypt returns SCARD_F_INTERNAL_ERROR despite sc_pkcs15_decipher was successful #3085
Comments
Can you check the #3077 solves your issue? |
Before changes fixing Marvin, the OpenSC/src/minidriver/minidriver.c Lines 4714 to 4720 in a229082
So for Marvin, using |
I have tested #3077 with various cards, it fixes this issue. |
Problem Description
Minidriver function CardRSADecrypt returns SCARD_F_INTERNAL_ERROR despite sc_pkcs15_decipher was successful. The function compares the return value of sc_pkcs15_decipher (or sc_pkcs1_strip_02_padding_constant_time) agains 0, but these functions return the length of decrypted data on success, not 0.
Proposed Resolution
minidriver.c:4713
Steps to reproduce
Create a windows application, which calls API CryptDecrypt().
Logs
The return value is not logged, as
"/* do not log return value to not leak it */"
but it will be received by the calling Windows API.
The text was updated successfully, but these errors were encountered: