Commit 6d01d014 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

ncrypt: Implement NCryptSignHash().

parent 07f9952a
......@@ -525,6 +525,20 @@ SECURITY_STATUS WINAPI NCryptSetProperty(NCRYPT_HANDLE handle, const WCHAR *name
return set_object_property(object, name, input, insize);
}
SECURITY_STATUS WINAPI NCryptSignHash(NCRYPT_KEY_HANDLE handle, void *padding, BYTE *value, DWORD value_len,
BYTE *sig, DWORD sig_len, DWORD *ret_len, DWORD flags)
{
struct object *object = (struct object *)handle;
TRACE("(%#Ix, %p, %p, %lu, %p, %lu, %#lx)\n", handle, padding, value, value_len, sig, sig_len, flags);
if (flags & NCRYPT_SILENT_FLAG) FIXME("Silent flag not implemented\n");
if (!object || object->type != KEY) return NTE_INVALID_HANDLE;
return map_ntstatus(BCryptSignHash(object->key.bcrypt_key, padding, value, value_len, sig, sig_len,
ret_len, flags & ~NCRYPT_SILENT_FLAG));
}
SECURITY_STATUS WINAPI NCryptVerifySignature(NCRYPT_KEY_HANDLE handle, void *padding, BYTE *hash, DWORD hash_size,
BYTE *signature, DWORD signature_size, DWORD flags)
{
......
......@@ -91,7 +91,7 @@
@ stub NCryptSecretAgreement
@ stub NCryptSetAuditingInterface
@ stdcall NCryptSetProperty(ptr wstr ptr long long)
@ stub NCryptSignHash
@ stdcall NCryptSignHash(long ptr ptr long ptr long ptr long)
@ stub NCryptStreamClose
@ stub NCryptStreamOpenToProtect
@ stub NCryptStreamOpenToUnprotect
......
......@@ -125,6 +125,7 @@ SECURITY_STATUS WINAPI NCryptIsAlgSupported(NCRYPT_PROV_HANDLE, const WCHAR *, D
SECURITY_STATUS WINAPI NCryptOpenKey(NCRYPT_PROV_HANDLE, NCRYPT_KEY_HANDLE *, const WCHAR *, DWORD, DWORD);
SECURITY_STATUS WINAPI NCryptOpenStorageProvider(NCRYPT_PROV_HANDLE *, const WCHAR *, DWORD);
SECURITY_STATUS WINAPI NCryptSetProperty(NCRYPT_HANDLE, const WCHAR *, BYTE *, DWORD, DWORD);
SECURITY_STATUS WINAPI NCryptSignHash(NCRYPT_KEY_HANDLE, void *, BYTE *, DWORD, BYTE *, DWORD, DWORD *, DWORD);
SECURITY_STATUS WINAPI NCryptVerifySignature(NCRYPT_KEY_HANDLE, void *, BYTE *, DWORD, BYTE *, DWORD, DWORD);
#ifdef __cplusplus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment