aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-12-13 18:24:40 +0000
committerWerner Koch <[email protected]>2021-12-13 18:25:48 +0000
commit1af559a9a24fd930094ab7b466ed051cdbc66f99 (patch)
tree32d716f6289a63cf00c795a84f99696a0b65c208
parentgpg: Accept Ed25519 private key in SOS which reserves leading zeros. (diff)
downloadgnupg-1af559a9a24fd930094ab7b466ed051cdbc66f99.tar.gz
gnupg-1af559a9a24fd930094ab7b466ed051cdbc66f99.zip
common,w32: Sync read_w32_registry_string with the gpgrt version
* common/w32-reg.c (get_root_key): Add short version of the root classes. -- The code here is only used by gpgconf's new --show-configs command. Usually on Windows the code from gpgrt is used for reading the registry. This one here is an exception and when backporting it I missed to add the HKCU etc al string. Fixes-commit: 6c6c404883e52545ed38293384c95fdacb7227c4 GnuPG-bug-id: 5724
-rw-r--r--common/w32-reg.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/w32-reg.c b/common/w32-reg.c
index f36c66453..fda2d1cfa 100644
--- a/common/w32-reg.c
+++ b/common/w32-reg.c
@@ -54,17 +54,17 @@ get_root_key(const char *root)
if (!root)
root_key = HKEY_CURRENT_USER;
- else if (!strcmp( root, "HKEY_CLASSES_ROOT" ) )
+ else if (!strcmp (root, "HKEY_CLASSES_ROOT") || !strcmp (root, "HKCR"))
root_key = HKEY_CLASSES_ROOT;
- else if (!strcmp( root, "HKEY_CURRENT_USER" ) )
+ else if (!strcmp (root, "HKEY_CURRENT_USER") || !strcmp (root, "HKCU"))
root_key = HKEY_CURRENT_USER;
- else if (!strcmp( root, "HKEY_LOCAL_MACHINE" ) )
+ else if (!strcmp (root, "HKEY_LOCAL_MACHINE") || !strcmp (root, "HKLM"))
root_key = HKEY_LOCAL_MACHINE;
- else if (!strcmp( root, "HKEY_USERS" ) )
+ else if (!strcmp (root, "HKEY_USERS") || !strcmp (root, "HKU"))
root_key = HKEY_USERS;
- else if (!strcmp( root, "HKEY_PERFORMANCE_DATA" ) )
+ else if (!strcmp (root, "HKEY_PERFORMANCE_DATA"))
root_key = HKEY_PERFORMANCE_DATA;
- else if (!strcmp( root, "HKEY_CURRENT_CONFIG" ) )
+ else if (!strcmp (root, "HKEY_CURRENT_CONFIG") || !strcmp (root, "HKCC"))
root_key = HKEY_CURRENT_CONFIG;
else
return NULL;