Skip to content

[fix] crash if SignerSignEx failed #344

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

Closed
wants to merge 1 commit into from
Closed

Conversation

heliosgg
Copy link

zadig crashed due to bad incorrect VA_ARGS

@pbatard
Copy link
Owner

pbatard commented Mar 4, 2025

Thanks for spotting that one! I'll apply your patch when I get a chance.

@heliosgg
Copy link
Author

heliosgg commented Mar 4, 2025

When you apply this fix I will probably create an issue.
For some reason SignerSignEx fails with the error "invalid algorithm"
If I replace CALG_SHA_256 with CALG_SHA1 it works.
I can't know the reason for this problem

@pbatard
Copy link
Owner

pbatard commented Mar 4, 2025

"invalid algorithm" has to be an issue with your specific environment. Depending on your Windows version and configuration, some crypto algorithms may not be available.

For instance, if you look at https://learn.microsoft.com/en-us/windows/win32/seccrypto/alg-id, you will see that CALG_SHA_256 is supported by Microsoft Enhanced RSA and AES Cryptographic Provider rather than the Microsoft Base Cryptographic Provider.

On a standard installation of a modern version of Windows (Windows 10 or later), both the Microsoft Base Cryptographic Provider and the Microsoft Enhanced RSA and AES Cryptographic Provider come as default.

But you (or your corporate environment if you use one) may be able to modify the providers installed to disable the Microsoft Enhanced one.

Obviously, this is not a configuration I can to support, so if you find that the Microsoft Enhanced RSA and AES Cryptographic Provider is not available in your environment, this is something you will have to fix on your end.

@heliosgg
Copy link
Author

heliosgg commented Mar 4, 2025

OK, I will try to enable "Microsoft Enhanced RSA and AES Cryptographic Provider".
I think that my environment is casual (windows 11 23h2), but for some reason this provider probably is not enabled
thank you

@pbatard
Copy link
Owner

pbatard commented Mar 9, 2025

Applied. Thanks again for finding out the bug and proposing a fix!

@pbatard pbatard closed this in 66d282e Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants