Commit 045f50a7 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

bcrypt: Build without -DWINE_NO_LONG_TYPES.

parent 867dfae7
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = bcrypt.dll
IMPORTS = advapi32
IMPORTLIB = bcrypt
......
......@@ -39,34 +39,37 @@ static unixlib_handle_t bcrypt_handle;
#define UNIX_CALL( func, params ) __wine_unix_call( bcrypt_handle, unix_ ## func, params )
NTSTATUS WINAPI BCryptAddContextFunction(ULONG table, LPCWSTR context, ULONG iface, LPCWSTR function, ULONG pos)
NTSTATUS WINAPI BCryptAddContextFunction( ULONG table, const WCHAR *ctx, ULONG iface, const WCHAR *func, ULONG pos )
{
FIXME("%08x, %s, %08x, %s, %u: stub\n", table, debugstr_w(context), iface, debugstr_w(function), pos);
FIXME( "%#lx, %s, %#lx, %s, %lu: stub\n", table, debugstr_w(ctx), iface, debugstr_w(func), pos );
return STATUS_SUCCESS;
}
NTSTATUS WINAPI BCryptAddContextFunctionProvider(ULONG table, LPCWSTR context, ULONG iface, LPCWSTR function, LPCWSTR provider, ULONG pos)
NTSTATUS WINAPI BCryptAddContextFunctionProvider( ULONG table, const WCHAR *ctx, ULONG iface, const WCHAR *func,
const WCHAR *provider, ULONG pos )
{
FIXME("%08x, %s, %08x, %s, %s, %u: stub\n", table, debugstr_w(context), iface, debugstr_w(function), debugstr_w(provider), pos);
FIXME( "%#lx, %s, %#lx, %s, %s, %lu: stub\n", table, debugstr_w(ctx), iface, debugstr_w(func),
debugstr_w(provider), pos );
return STATUS_SUCCESS;
}
NTSTATUS WINAPI BCryptRemoveContextFunction(ULONG table, LPCWSTR context, ULONG iface, LPCWSTR function)
NTSTATUS WINAPI BCryptRemoveContextFunction( ULONG table, const WCHAR *ctx, ULONG iface, const WCHAR *func )
{
FIXME("%08x, %s, %08x, %s: stub\n", table, debugstr_w(context), iface, debugstr_w(function));
FIXME( "%#lx, %s, %#lx, %s: stub\n", table, debugstr_w(ctx), iface, debugstr_w(func) );
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS WINAPI BCryptRemoveContextFunctionProvider(ULONG table, LPCWSTR context, ULONG iface, LPCWSTR function, LPCWSTR provider)
NTSTATUS WINAPI BCryptRemoveContextFunctionProvider( ULONG table, const WCHAR *ctx, ULONG iface, const WCHAR *func,
const WCHAR *provider )
{
FIXME("%08x, %s, %08x, %s, %s: stub\n", table, debugstr_w(context), iface, debugstr_w(function), debugstr_w(provider));
FIXME( "%#lx, %s, %#lx, %s, %s: stub\n", table, debugstr_w(ctx), iface, debugstr_w(func), debugstr_w(provider) );
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS WINAPI BCryptEnumContextFunctions( ULONG table, const WCHAR *ctx, ULONG iface, ULONG *buflen,
CRYPT_CONTEXT_FUNCTIONS **buffer )
{
FIXME( "%u, %s, %u, %p, %p\n", table, debugstr_w(ctx), iface, buflen, buffer );
FIXME( "%#lx, %s, %#lx, %p, %p\n", table, debugstr_w(ctx), iface, buflen, buffer );
return STATUS_NOT_IMPLEMENTED;
}
......@@ -75,15 +78,15 @@ void WINAPI BCryptFreeBuffer( void *buffer )
FIXME( "%p\n", buffer );
}
NTSTATUS WINAPI BCryptRegisterProvider(LPCWSTR provider, ULONG flags, PCRYPT_PROVIDER_REG reg)
NTSTATUS WINAPI BCryptRegisterProvider( const WCHAR *provider, ULONG flags, CRYPT_PROVIDER_REG *reg )
{
FIXME("%s, %08x, %p: stub\n", debugstr_w(provider), flags, reg);
FIXME( "%s, %#lx, %p: stub\n", debugstr_w(provider), flags, reg );
return STATUS_SUCCESS;
}
NTSTATUS WINAPI BCryptUnregisterProvider(LPCWSTR provider)
NTSTATUS WINAPI BCryptUnregisterProvider( const WCHAR *provider )
{
FIXME("%s: stub\n", debugstr_w(provider));
FIXME( "%s: stub\n", debugstr_w(provider) );
return STATUS_NOT_IMPLEMENTED;
}
......@@ -146,7 +149,7 @@ NTSTATUS WINAPI BCryptEnumAlgorithms( ULONG type, ULONG *ret_count, BCRYPT_ALGOR
BCRYPT_ALGORITHM_IDENTIFIER *list;
ULONG i, count = 0;
TRACE( "%08x, %p, %p, %08x\n", type, ret_count, ret_list, flags );
TRACE( "%#lx, %p, %p, %#lx\n", type, ret_count, ret_list, flags );
if (!ret_count || !ret_list || (type & ~supported)) return STATUS_INVALID_PARAMETER;
......@@ -175,7 +178,7 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
const DWORD supported_flags = BCRYPT_USE_SYSTEM_PREFERRED_RNG;
struct algorithm *algorithm = handle;
TRACE("%p, %p, %u, %08x - semi-stub\n", handle, buffer, count, flags);
TRACE("%p, %p, %lu, %#lx - semi-stub\n", handle, buffer, count, flags);
if (!algorithm)
{
......@@ -192,7 +195,7 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
return STATUS_INVALID_PARAMETER;
if (flags & ~supported_flags)
FIXME("unsupported flags %08x\n", flags & ~supported_flags);
FIXME("unsupported flags %#lx\n", flags & ~supported_flags);
if (algorithm)
FIXME("ignoring selected algorithm\n");
......@@ -211,19 +214,20 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR id, LPCWSTR implementation, DWORD flags )
NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, const WCHAR *id, const WCHAR *implementation,
DWORD flags )
{
const DWORD supported_flags = BCRYPT_ALG_HANDLE_HMAC_FLAG | BCRYPT_HASH_REUSABLE_FLAG;
struct algorithm *alg;
enum alg_id alg_id;
ULONG i;
TRACE( "%p, %s, %s, %08x\n", handle, wine_dbgstr_w(id), wine_dbgstr_w(implementation), flags );
TRACE( "%p, %s, %s, %#lx\n", handle, wine_dbgstr_w(id), wine_dbgstr_w(implementation), flags );
if (!handle || !id) return STATUS_INVALID_PARAMETER;
if (flags & ~supported_flags)
{
FIXME( "unsupported flags %08x\n", flags & ~supported_flags);
FIXME( "unsupported flags %#lx\n", flags & ~supported_flags );
return STATUS_NOT_IMPLEMENTED;
}
......@@ -261,7 +265,7 @@ NTSTATUS WINAPI BCryptCloseAlgorithmProvider( BCRYPT_ALG_HANDLE handle, DWORD fl
{
struct algorithm *alg = handle;
TRACE( "%p, %08x\n", handle, flags );
TRACE( "%p, %#lx\n", handle, flags );
if (!alg || alg->hdr.magic != MAGIC_ALG) return STATUS_INVALID_HANDLE;
alg->hdr.magic = 0;
......@@ -729,11 +733,12 @@ static NTSTATUS get_key_property( const struct key *key, const WCHAR *prop, UCHA
}
}
NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *buffer, ULONG count, ULONG *res, ULONG flags )
NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHAR *buffer, ULONG count, ULONG *res,
ULONG flags )
{
struct object *object = handle;
TRACE( "%p, %s, %p, %u, %p, %08x\n", handle, wine_dbgstr_w(prop), buffer, count, res, flags );
TRACE( "%p, %s, %p, %lu, %p, %#lx\n", handle, wine_dbgstr_w(prop), buffer, count, res, flags );
if (!object) return STATUS_INVALID_HANDLE;
if (!prop || !res) return STATUS_INVALID_PARAMETER;
......@@ -756,7 +761,7 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
return get_hash_property( hash, prop, buffer, count, res );
}
default:
WARN( "unknown magic %08x\n", object->magic );
WARN( "unknown magic %#lx\n", object->magic );
return STATUS_INVALID_HANDLE;
}
}
......@@ -829,11 +834,10 @@ NTSTATUS WINAPI BCryptCreateHash( BCRYPT_ALG_HANDLE algorithm, BCRYPT_HASH_HANDL
struct hash *hash;
NTSTATUS status;
TRACE( "%p, %p, %p, %u, %p, %u, %08x\n", algorithm, handle, object, object_len,
secret, secret_len, flags );
TRACE( "%p, %p, %p, %lu, %p, %lu, %#lx\n", algorithm, handle, object, object_len, secret, secret_len, flags );
if (flags & ~BCRYPT_HASH_REUSABLE_FLAG)
{
FIXME( "unimplemented flags %08x\n", flags );
FIXME( "unimplemented flags %#lx\n", flags );
return STATUS_NOT_IMPLEMENTED;
}
......@@ -851,7 +855,7 @@ NTSTATUS WINAPI BCryptDuplicateHash( BCRYPT_HASH_HANDLE handle, BCRYPT_HASH_HAND
struct hash *hash_orig = handle;
struct hash *hash_copy;
TRACE( "%p, %p, %p, %u, %u\n", handle, handle_copy, object, objectlen, flags );
TRACE( "%p, %p, %p, %lu, %#lx\n", handle, handle_copy, object, objectlen, flags );
if (!hash_orig || hash_orig->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE;
if (!handle_copy) return STATUS_INVALID_PARAMETER;
......@@ -894,7 +898,7 @@ NTSTATUS WINAPI BCryptHashData( BCRYPT_HASH_HANDLE handle, UCHAR *input, ULONG s
{
struct hash *hash = handle;
TRACE( "%p, %p, %u, %08x\n", handle, input, size, flags );
TRACE( "%p, %p, %lu, %#lx\n", handle, input, size, flags );
if (!hash || hash->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE;
if (!input) return STATUS_SUCCESS;
......@@ -928,7 +932,7 @@ NTSTATUS WINAPI BCryptFinishHash( BCRYPT_HASH_HANDLE handle, UCHAR *output, ULON
{
struct hash *hash = handle;
TRACE( "%p, %p, %u, %08x\n", handle, output, size, flags );
TRACE( "%p, %p, %lu, %#lx\n", handle, output, size, flags );
if (!hash || hash->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE;
if (!output) return STATUS_INVALID_PARAMETER;
......@@ -943,7 +947,7 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG se
struct hash *hash;
NTSTATUS status;
TRACE( "%p, %p, %u, %p, %u, %p, %u\n", algorithm, secret, secret_len, input, input_len, output, output_len );
TRACE( "%p, %p, %lu, %p, %lu, %p, %lu\n", algorithm, secret, secret_len, input, input_len, output, output_len );
if (!alg || alg->hdr.magic != MAGIC_ALG) return STATUS_INVALID_HANDLE;
......@@ -1037,7 +1041,7 @@ static NTSTATUS key_import( BCRYPT_ALG_HANDLE algorithm, const WCHAR *type, BCRY
if (header->dwMagic != BCRYPT_KEY_DATA_BLOB_MAGIC) return STATUS_INVALID_PARAMETER;
if (header->dwVersion != BCRYPT_KEY_DATA_BLOB_VERSION1)
{
FIXME( "unknown key data blob version %u\n", header->dwVersion );
FIXME( "unknown key data blob version %lu\n", header->dwVersion );
return STATUS_INVALID_PARAMETER;
}
len = header->cbKeyData;
......@@ -1533,7 +1537,7 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
ULONG block_size, size;
struct key *key;
TRACE( "%p, %p, %p, %u, %p, %u, %08x\n", algorithm, handle, object, object_len, secret, secret_len, flags );
TRACE( "%p, %p, %p, %lu, %p, %lu, %#lx\n", algorithm, handle, object, object_len, secret, secret_len, flags );
if (!alg || alg->hdr.magic != MAGIC_ALG) return STATUS_INVALID_HANDLE;
if (object) FIXME( "ignoring object buffer\n" );
......@@ -1550,17 +1554,17 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
{
if (secret_len > (size = key_lengths.dwMaxLength / 8))
{
WARN( "secret_len %u exceeds key max length %u, setting to maximum.\n", secret_len, size );
WARN( "secret_len %lu exceeds key max length %lu, setting to maximum\n", secret_len, size );
secret_len = size;
}
else if (secret_len < (size = key_lengths.dwMinLength / 8))
{
WARN( "secret_len %u is less than minimum key length %u.\n", secret_len, size );
WARN( "secret_len %lu is less than minimum key length %lu\n", secret_len, size );
return STATUS_INVALID_PARAMETER;
}
else if (key_lengths.dwIncrement && (secret_len * 8 - key_lengths.dwMinLength) % key_lengths.dwIncrement)
{
WARN( "secret_len %u is not a valid key length.\n", secret_len );
WARN( "secret_len %lu is not a valid key length\n", secret_len );
return STATUS_INVALID_PARAMETER;
}
}
......@@ -1592,7 +1596,7 @@ NTSTATUS WINAPI BCryptGenerateKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_H
NTSTATUS status;
ULONG size;
TRACE( "%p, %p, %u, %08x\n", algorithm, handle, key_len, flags );
TRACE( "%p, %p, %lu, %#lx\n", algorithm, handle, key_len, flags );
if (!alg || alg->hdr.magic != MAGIC_ALG) return STATUS_INVALID_HANDLE;
if (!handle) return STATUS_INVALID_PARAMETER;
......@@ -1626,20 +1630,20 @@ NTSTATUS WINAPI BCryptFinalizeKeyPair( BCRYPT_KEY_HANDLE handle, ULONG flags )
{
struct key *key = handle;
TRACE( "%p, %08x\n", key, flags );
TRACE( "%p, %#lx\n", key, flags );
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
return UNIX_CALL( key_asymmetric_generate, key );
}
NTSTATUS WINAPI BCryptImportKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HANDLE decrypt_key, LPCWSTR type,
BCRYPT_KEY_HANDLE *key, PUCHAR object, ULONG object_len, PUCHAR input,
NTSTATUS WINAPI BCryptImportKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HANDLE decrypt_key, const WCHAR *type,
BCRYPT_KEY_HANDLE *key, UCHAR *object, ULONG object_len, UCHAR *input,
ULONG input_len, ULONG flags )
{
struct algorithm *alg = algorithm;
TRACE("%p, %p, %s, %p, %p, %u, %p, %u, %u\n", algorithm, decrypt_key, debugstr_w(type), key, object,
object_len, input, input_len, flags);
TRACE( "%p, %p, %s, %p, %p, %lu, %p, %lu, %#lx\n", algorithm, decrypt_key, debugstr_w(type), key, object,
object_len, input, input_len, flags );
if (!alg || alg->hdr.magic != MAGIC_ALG) return STATUS_INVALID_HANDLE;
if (!key || !type || !input) return STATUS_INVALID_PARAMETER;
......@@ -1653,12 +1657,12 @@ NTSTATUS WINAPI BCryptImportKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HANDLE
return key_import( algorithm, type, key, object, object_len, input, input_len );
}
NTSTATUS WINAPI BCryptExportKey( BCRYPT_KEY_HANDLE export_key, BCRYPT_KEY_HANDLE encrypt_key, LPCWSTR type,
PUCHAR output, ULONG output_len, ULONG *size, ULONG flags )
NTSTATUS WINAPI BCryptExportKey( BCRYPT_KEY_HANDLE export_key, BCRYPT_KEY_HANDLE encrypt_key, const WCHAR *type,
UCHAR *output, ULONG output_len, ULONG *size, ULONG flags )
{
struct key *key = export_key;
TRACE("%p, %p, %s, %p, %u, %p, %u\n", key, encrypt_key, debugstr_w(type), output, output_len, size, flags);
TRACE( "%p, %p, %s, %p, %lu, %p, %#lx\n", key, encrypt_key, debugstr_w(type), output, output_len, size, flags );
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (!type || !size) return STATUS_INVALID_PARAMETER;
......@@ -1738,7 +1742,7 @@ NTSTATUS WINAPI BCryptDuplicateKey( BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE
struct key *key_copy;
NTSTATUS status;
TRACE( "%p, %p, %p, %u, %08x\n", handle, handle_copy, object, object_len, flags );
TRACE( "%p, %p, %p, %lu, %#lx\n", handle, handle_copy, object, object_len, flags );
if (object) FIXME( "ignoring object buffer\n" );
if (!key_orig || key_orig->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
......@@ -1760,7 +1764,7 @@ NTSTATUS WINAPI BCryptImportKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HAN
{
struct algorithm *alg = algorithm;
TRACE( "%p, %p, %s, %p, %p, %u, %08x\n", algorithm, decrypt_key, debugstr_w(type), ret_key, input,
TRACE( "%p, %p, %s, %p, %p, %lu, %#lx\n", algorithm, decrypt_key, debugstr_w(type), ret_key, input,
input_len, flags );
if (!alg || alg->hdr.magic != MAGIC_ALG) return STATUS_INVALID_HANDLE;
......@@ -1780,7 +1784,7 @@ NTSTATUS WINAPI BCryptSignHash( BCRYPT_KEY_HANDLE handle, void *padding, UCHAR *
struct key_asymmetric_sign_params params;
struct key *key = handle;
TRACE( "%p, %p, %p, %u, %p, %u, %p, %08x\n", handle, padding, input, input_len, output, output_len,
TRACE( "%p, %p, %p, %lu, %p, %lu, %p, %#lx\n", handle, padding, input, input_len, output, output_len,
ret_len, flags );
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
......@@ -1807,7 +1811,7 @@ NTSTATUS WINAPI BCryptVerifySignature( BCRYPT_KEY_HANDLE handle, void *padding,
struct key_asymmetric_verify_params params;
struct key *key = handle;
TRACE( "%p, %p, %p, %u, %p, %u, %08x\n", handle, padding, hash, hash_len, signature, signature_len, flags );
TRACE( "%p, %p, %p, %lu, %p, %lu, %#lx\n", handle, padding, hash, hash_len, signature, signature_len, flags );
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (!hash || !hash_len || !signature || !signature_len) return STATUS_INVALID_PARAMETER;
......@@ -1841,7 +1845,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
struct key *key = handle;
NTSTATUS ret;
TRACE( "%p, %p, %u, %p, %p, %u, %p, %u, %p, %08x\n", handle, input, input_len, padding, iv, iv_len, output,
TRACE( "%p, %p, %lu, %p, %p, %lu, %p, %lu, %p, %#lx\n", handle, input, input_len, padding, iv, iv_len, output,
output_len, ret_len, flags );
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
......@@ -1852,7 +1856,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
}
if (flags & ~BCRYPT_BLOCK_PADDING)
{
FIXME( "flags %08x not implemented\n", flags );
FIXME( "flags %#lx not implemented\n", flags );
return STATUS_NOT_IMPLEMENTED;
}
......@@ -1868,13 +1872,13 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
struct key_asymmetric_decrypt_params params;
struct key *key = handle;
TRACE( "%p, %p, %u, %p, %p, %u, %p, %u, %p, %08x\n", handle, input, input_len, padding, iv, iv_len, output,
TRACE( "%p, %p, %lu, %p, %p, %lu, %p, %lu, %p, %#lx\n", handle, input, input_len, padding, iv, iv_len, output,
output_len, ret_len, flags );
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (flags & ~BCRYPT_BLOCK_PADDING)
{
FIXME( "flags %08x not supported\n", flags );
FIXME( "flags %#lx not supported\n", flags );
return STATUS_NOT_IMPLEMENTED;
}
......@@ -1900,7 +1904,7 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
{
struct object *object = handle;
TRACE( "%p, %s, %p, %u, %08x\n", handle, debugstr_w(prop), value, size, flags );
TRACE( "%p, %s, %p, %lu, %#lx\n", handle, debugstr_w(prop), value, size, flags );
if (!object) return STATUS_INVALID_HANDLE;
......@@ -1917,7 +1921,7 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
return set_key_property( key, prop, value, size, flags );
}
default:
WARN( "unknown magic %08x\n", object->magic );
WARN( "unknown magic %#lx\n", object->magic );
return STATUS_INVALID_HANDLE;
}
}
......@@ -1930,7 +1934,7 @@ NTSTATUS WINAPI BCryptDeriveKeyCapi( BCRYPT_HASH_HANDLE handle, BCRYPT_ALG_HANDL
NTSTATUS status;
ULONG len;
TRACE( "%p, %p, %p, %u, %08x\n", handle, halg, key, keylen, flags );
TRACE( "%p, %p, %p, %lu, %#lx\n", handle, halg, key, keylen, flags );
if (!key || !keylen) return STATUS_INVALID_PARAMETER;
if (!hash || hash->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE;
......@@ -2025,7 +2029,7 @@ NTSTATUS WINAPI BCryptDeriveKeyPBKDF2( BCRYPT_ALG_HANDLE handle, UCHAR *pwd, ULO
UCHAR *partial;
NTSTATUS status;
TRACE( "%p, %p, %u, %p, %u, %s, %p, %u, %08x\n", handle, pwd, pwd_len, salt, salt_len,
TRACE( "%p, %p, %lu, %p, %lu, %s, %p, %lu, %#lx\n", handle, pwd, pwd_len, salt, salt_len,
wine_dbgstr_longlong(iterations), dk, dk_len, flags );
if (!alg || alg->hdr.magic != MAGIC_ALG) return STATUS_INVALID_HANDLE;
......@@ -2068,13 +2072,14 @@ NTSTATUS WINAPI BCryptDeriveKeyPBKDF2( BCRYPT_ALG_HANDLE handle, UCHAR *pwd, ULO
return STATUS_SUCCESS;
}
NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_HANDLE publickey, BCRYPT_SECRET_HANDLE *handle, ULONG flags)
NTSTATUS WINAPI BCryptSecretAgreement( BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_HANDLE publickey,
BCRYPT_SECRET_HANDLE *handle, ULONG flags )
{
struct key *privkey = privatekey;
struct key *pubkey = publickey;
struct secret *secret;
FIXME( "%p, %p, %p, %08x\n", privatekey, publickey, handle, flags );
FIXME( "%p, %p, %p, %#lx\n", privatekey, publickey, handle, flags );
if (!privkey || privkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (!pubkey || pubkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
......@@ -2099,12 +2104,12 @@ NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE handle)
return STATUS_SUCCESS;
}
NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCryptBufferDesc *parameter,
PUCHAR derived, ULONG derived_size, ULONG *result, ULONG flags)
NTSTATUS WINAPI BCryptDeriveKey( BCRYPT_SECRET_HANDLE handle, const WCHAR *kdf, BCryptBufferDesc *parameter,
UCHAR *derived, ULONG derived_size, ULONG *result, ULONG flags )
{
struct secret *secret = handle;
FIXME( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(kdf), parameter, derived, derived_size, result, flags );
FIXME( "%p, %s, %p, %p, %lu, %p, %#lx\n", secret, debugstr_w(kdf), parameter, derived, derived_size, result, flags );
if (!secret || secret->hdr.magic != MAGIC_SECRET) return STATUS_INVALID_HANDLE;
if (!kdf) return STATUS_INVALID_PARAMETER;
......
......@@ -688,7 +688,7 @@ static NTSTATUS export_gnutls_pubkey_ecc( gnutls_privkey_t gnutls_key, enum alg_
if (*pubkey_len < sizeof(*ecc_blob) + size * 2)
{
FIXME( "wrong pubkey len %u / %u\n", *pubkey_len, (ULONG)sizeof(*ecc_blob) + size * 2 );
FIXME( "wrong pubkey len %u / %lu\n", *pubkey_len, sizeof(*ecc_blob) + size * 2 );
pgnutls_perror( ret );
free( x.data ); free( y.data );
return STATUS_BUFFER_TOO_SMALL;
......@@ -730,7 +730,7 @@ static NTSTATUS export_gnutls_pubkey_dsa( gnutls_privkey_t gnutls_key, ULONG bit
if (*pubkey_len < sizeof(*dsa_blob) + bitlen / 8 * 3)
{
FIXME( "wrong pubkey len %u / %u\n", *pubkey_len, (ULONG)sizeof(*dsa_blob) + bitlen / 8 * 3 );
FIXME( "wrong pubkey len %u / %lu\n", *pubkey_len, sizeof(*dsa_blob) + bitlen / 8 * 3 );
pgnutls_perror( ret );
free( p.data ); free( q.data ); free( g.data ); free( y.data );
return STATUS_NO_MEMORY;
......@@ -1506,7 +1506,7 @@ static NTSTATUS key_asymmetric_verify( void *args )
case ALG_ID_ECDSA_P256:
case ALG_ID_ECDSA_P384:
{
if (flags) FIXME( "flags %08x not supported\n", flags );
if (flags) FIXME( "flags %#x not supported\n", flags );
/* only the hash size must match, not the actual hash function */
switch (params->hash_len)
......@@ -1540,7 +1540,7 @@ static NTSTATUS key_asymmetric_verify( void *args )
}
case ALG_ID_DSA:
{
if (flags) FIXME( "flags %08x not supported\n", flags );
if (flags) FIXME( "flags %#x not supported\n", flags );
if (params->hash_len != 20)
{
FIXME( "hash size %u not supported\n", params->hash_len );
......@@ -1674,7 +1674,7 @@ static NTSTATUS key_asymmetric_sign( void *args )
}
else if (key->alg_id == ALG_ID_DSA)
{
if (flags) FIXME( "flags %08x not supported\n", flags );
if (flags) FIXME( "flags %#x not supported\n", flags );
if (params->input_len != 20)
{
FIXME( "hash size %u not supported\n", params->input_len );
......@@ -1698,12 +1698,12 @@ static NTSTATUS key_asymmetric_sign( void *args )
}
else if (!flags)
{
WARN( "invalid flags %08x\n", flags );
WARN( "invalid flags %#x\n", flags );
return STATUS_INVALID_PARAMETER;
}
else
{
FIXME( "flags %08x not implemented\n", flags );
FIXME( "flags %#x not implemented\n", flags );
return STATUS_NOT_IMPLEMENTED;
}
......
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