Hans Leidekker : dssenh: Implement CRYPT_DELETEKEYSET.

Alexandre Julliard julliard at winehq.org
Mon Oct 19 15:54:05 CDT 2020


Module: wine
Branch: master
Commit: 320b9eb47451eb8c167b211282f2ea49fcfbbab8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=320b9eb47451eb8c167b211282f2ea49fcfbbab8

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Mon Oct 19 11:24:12 2020 +0200

dssenh: Implement CRYPT_DELETEKEYSET.

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dssenh/main.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c
index 5ad0ef1505d..4867fef2f59 100644
--- a/dlls/dssenh/main.c
+++ b/dlls/dssenh/main.c
@@ -247,6 +247,23 @@ static struct container *read_key_container( const char *name, DWORD flags )
     return ret;
 }
 
+static void delete_key_container( const char *name, DWORD flags )
+{
+    char path[sizeof(dss_path_fmt) + MAX_PATH];
+    HKEY rootkey;
+
+    sprintf( path, dss_path_fmt, name );
+
+    if (flags & CRYPT_MACHINE_KEYSET)
+        rootkey = HKEY_LOCAL_MACHINE;
+    else
+        rootkey = HKEY_CURRENT_USER;
+
+    /* @@ Wine registry key: HKLM\Software\Wine\Crypto\DSS */
+    /* @@ Wine registry key: HKCU\Software\Wine\Crypto\DSS */
+    RegDeleteKeyExA( rootkey, path, 0, 0 );
+}
+
 BOOL WINAPI CPAcquireContext( HCRYPTPROV *ret_prov, LPSTR container, DWORD flags, PVTableProvStruc vtable )
 {
     struct container *ret;
@@ -285,6 +302,11 @@ BOOL WINAPI CPAcquireContext( HCRYPTPROV *ret_prov, LPSTR container, DWORD flags
         ret = create_key_container( "", flags );
         break;
 
+    case CRYPT_DELETEKEYSET:
+        delete_key_container( name, flags );
+        *ret_prov = 0;
+        return TRUE;
+
     default:
         FIXME( "unsupported flags %08x\n", flags );
         return FALSE;




More information about the wine-cvs mailing list