Hans Leidekker : dssenh: Implement CPExportKey.
Alexandre Julliard
julliard at winehq.org
Wed Oct 14 15:37:20 CDT 2020
Module: wine
Branch: master
Commit: e1374be7363d89be0e8f002ee4f6309e129d7184
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e1374be7363d89be0e8f002ee4f6309e129d7184
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Oct 14 11:03:54 2020 +0200
dssenh: Implement CPExportKey.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dssenh/main.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c
index 38f249ef04..b575689ab1 100644
--- a/dlls/dssenh/main.c
+++ b/dlls/dssenh/main.c
@@ -17,7 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-
#include <stdarg.h>
#include "windef.h"
@@ -469,7 +468,29 @@ BOOL WINAPI CPImportKey( HCRYPTPROV hprov, const BYTE *data, DWORD len, HCRYPTKE
BOOL WINAPI CPExportKey( HCRYPTPROV hprov, HCRYPTKEY hkey, HCRYPTKEY hexpkey, DWORD blobtype, DWORD flags,
BYTE *data, DWORD *len )
{
- return FALSE;
+ struct key *key = (struct key *)hkey;
+
+ TRACE( "%p, %p, %p, %08x, %08x, %p, %p\n", (void *)hprov, (void *)hkey, (void *)hexpkey, blobtype, flags,
+ data, len );
+
+ if (key->magic != MAGIC_KEY) return FALSE;
+ if (hexpkey)
+ {
+ FIXME( "export key not supported\n" );
+ return FALSE;
+ }
+ if (blobtype != PUBLICKEYBLOB)
+ {
+ FIXME( "blob type %u not supported\n", blobtype );
+ return FALSE;
+ }
+ if (flags)
+ {
+ FIXME( "flags %08x not supported\n", flags );
+ return FALSE;
+ }
+
+ return !BCryptExportKey( key->handle, NULL, LEGACY_DSA_V2_PUBLIC_BLOB, data, *len, len, 0 );
}
static struct key *duplicate_key( const struct key *key )
More information about the wine-cvs
mailing list