Skip to content
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

CertOpenStore's hCryptProv parameter should get a [Reserved] attribute #1658

Closed
AArnott opened this issue Jul 27, 2023 · 4 comments
Closed
Assignees

Comments

@AArnott
Copy link
Member

AArnott commented Jul 27, 2023

As @drauch points at in microsoft/CsWin32#1002, and backed by our documentation, hCryptProv is meant to be NULL for all users. Can we add the [Reserved] attribute to that parameter?

This will allow CsWin32's friendly overload to omit the parameter.

@mikebattista mikebattista self-assigned this Jul 27, 2023
@riverar
Copy link
Collaborator

riverar commented Jul 27, 2023

Warning: This is not valid for Windows Server 2003 and Windows XP. This runs into an open question-- which OSes does win32metadata target? That answer could help define the scope of the supported OS attribute too. #738

@AArnott
Copy link
Member Author

AArnott commented Jul 27, 2023

Ah, I hadn't noticed that. Thanks for pointing it out.

In general, if the parameter isn't always reserved, we shouldn't attribute it, and instead leave it to the author to do the right thing.
But in the case of XP and 2003, I personally think we should only support Windows versions that Microsoft supports.

@mikebattista
Copy link
Contributor

I'm fine keeping Reserved in this case.

@riverar
Copy link
Collaborator

riverar commented Jul 27, 2023

I don't think we should be entangling metadata with whatever Microsoft's support policy is today. By marking a possibly reserved parameter as [Reserved] we then create an issue where projections can't differentiate between this reserved parameter and one that truly is always null (even on Windows XP).

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

No branches or pull requests

3 participants