-
Notifications
You must be signed in to change notification settings - Fork 29
Correctly set the machine store flag when requested #802
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
Conversation
@@ -33,7 +33,7 @@ const ( | |||
NCRYPT_PCP_USAGE_AUTH_PROPERTY = "PCP_USAGEAUTH" | |||
|
|||
// Key Storage Flags | |||
NCRYPT_MACHINE_KEY_FLAG = 0x00000001 | |||
NCRYPT_MACHINE_KEY_FLAG = 0x00000020 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kms/capi/capi.go
Outdated
SoftwareProvider = "Microsoft Software Key Storage Provider" | ||
SmartCardProvider = "Microsoft Smart Card Key Storage Provider" | ||
PlatformProvider = "Microsoft Platform Crypto Provider" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ncrypt_windows.go provides the same constants with a different name, perhaps we want to use those instead of creating new ones. We should also use a constant on New() to set the default provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
18cbf69
to
ab01b7b
Compare
Fix the NCRYPT_MACHINE_KEY_FLAG constant and use it in calls for key operations when the machine store is specified in the uri.
ab01b7b
to
2fe35c1
Compare
Fix the NCRYPT_MACHINE_KEY_FLAG constant and use it in calls for key operations when the machine store is specified in the uri. Validate the store arg is compatible with the provider.
Pain or issue this feature alleviates:
Why is this important to the project (if not answered above):
Creating a key in the machine store fails. Getting or deleting a key from the machine store silently gets or deletes the key of the same name in the user store.
In what environments or workflows is this feature supported?
Windows
💔Thank you!