Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
07f9952a
Commit
07f9952a
authored
Nov 23, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ncrypt: Implement NCryptExportKey().
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53966
parent
a90df92a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
2 deletions
+32
-2
main.c
dlls/ncrypt/main.c
+27
-0
ncrypt.spec
dlls/ncrypt/ncrypt.spec
+1
-1
ncrypt.h
include/ncrypt.h
+4
-1
No files found.
dlls/ncrypt/main.c
View file @
07f9952a
...
...
@@ -413,6 +413,33 @@ SECURITY_STATUS WINAPI NCryptImportKey(NCRYPT_PROV_HANDLE provider, NCRYPT_KEY_H
return
ERROR_SUCCESS
;
}
SECURITY_STATUS
WINAPI
NCryptExportKey
(
NCRYPT_KEY_HANDLE
key
,
NCRYPT_KEY_HANDLE
encrypt_key
,
const
WCHAR
*
type
,
NCryptBufferDesc
*
params
,
BYTE
*
output
,
DWORD
output_len
,
DWORD
*
ret_len
,
DWORD
flags
)
{
struct
object
*
object
=
(
struct
object
*
)
key
;
TRACE
(
"(%#Ix, %#Ix, %s, %p, %p, %lu, %p, %#lx)
\n
"
,
key
,
encrypt_key
,
wine_dbgstr_w
(
type
),
params
,
output
,
output_len
,
ret_len
,
flags
);
if
(
encrypt_key
)
{
FIXME
(
"Key blob encryption not implemented
\n
"
);
return
NTE_NOT_SUPPORTED
;
}
if
(
params
)
{
FIXME
(
"Parameter information not implemented
\n
"
);
return
NTE_NOT_SUPPORTED
;
}
if
(
flags
==
NCRYPT_SILENT_FLAG
)
{
FIXME
(
"Silent flag not implemented
\n
"
);
}
return
map_ntstatus
(
BCryptExportKey
(
object
->
key
.
bcrypt_key
,
NULL
,
type
,
output
,
output_len
,
ret_len
,
0
));
}
SECURITY_STATUS
WINAPI
NCryptIsAlgSupported
(
NCRYPT_PROV_HANDLE
provider
,
const
WCHAR
*
algid
,
DWORD
flags
)
{
static
const
ULONG
supported
=
BCRYPT_CIPHER_OPERATION
|
\
...
...
dlls/ncrypt/ncrypt.spec
View file @
07f9952a
...
...
@@ -70,7 +70,7 @@
@ stdcall NCryptEnumAlgorithms(long long ptr ptr long)
@ stdcall NCryptEnumKeys(long wstr ptr ptr long)
@ stub NCryptEnumStorageProviders
@ st
ub NCryptExportKey
@ st
dcall NCryptExportKey(long long wstr ptr ptr long ptr long)
@ stdcall NCryptFinalizeKey(long long)
@ stdcall NCryptFreeBuffer(ptr)
@ stdcall NCryptFreeObject(long)
...
...
include/ncrypt.h
View file @
07f9952a
...
...
@@ -110,9 +110,12 @@ typedef ULONG_PTR NCRYPT_SECRET_HANDLE;
#define NCRYPT_SCARD_PIN_ID L"SmartCardPinId"
#define NCRYPT_SCARD_PIN_INFO L"SmartCardPinInfo"
SECURITY_STATUS
WINAPI
NCryptCreatePersistedKey
(
NCRYPT_PROV_HANDLE
,
NCRYPT_KEY_HANDLE
*
,
const
WCHAR
*
,
const
WCHAR
*
,
DWORD
,
DWORD
);
SECURITY_STATUS
WINAPI
NCryptCreatePersistedKey
(
NCRYPT_PROV_HANDLE
,
NCRYPT_KEY_HANDLE
*
,
const
WCHAR
*
,
const
WCHAR
*
,
DWORD
,
DWORD
);
SECURITY_STATUS
WINAPI
NCryptDecrypt
(
NCRYPT_KEY_HANDLE
,
BYTE
*
,
DWORD
,
void
*
,
BYTE
*
,
DWORD
,
DWORD
*
,
DWORD
);
SECURITY_STATUS
WINAPI
NCryptEncrypt
(
NCRYPT_KEY_HANDLE
,
BYTE
*
,
DWORD
,
void
*
,
BYTE
*
,
DWORD
,
DWORD
*
,
DWORD
);
SECURITY_STATUS
WINAPI
NCryptExportKey
(
NCRYPT_KEY_HANDLE
,
NCRYPT_KEY_HANDLE
,
const
WCHAR
*
,
NCryptBufferDesc
*
,
BYTE
*
,
DWORD
,
DWORD
*
,
DWORD
);
SECURITY_STATUS
WINAPI
NCryptFinalizeKey
(
NCRYPT_KEY_HANDLE
,
DWORD
);
SECURITY_STATUS
WINAPI
NCryptFreeObject
(
NCRYPT_HANDLE
);
SECURITY_STATUS
WINAPI
NCryptGetProperty
(
NCRYPT_HANDLE
,
const
WCHAR
*
,
BYTE
*
,
DWORD
,
DWORD
*
,
DWORD
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment