mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[BCRYPT] Add ECDSA P256 to known algorithms
Add missing structs and handler in BCryptOpenAlgorithmProvider(). Fixes CORE-16741 and similar problems.
This commit is contained in:
parent
d5deacd903
commit
e0a47b7b5f
1 changed files with 5 additions and 2 deletions
|
@ -266,7 +266,8 @@ enum alg_id
|
||||||
ALG_ID_SHA1,
|
ALG_ID_SHA1,
|
||||||
ALG_ID_SHA256,
|
ALG_ID_SHA256,
|
||||||
ALG_ID_SHA384,
|
ALG_ID_SHA384,
|
||||||
ALG_ID_SHA512
|
ALG_ID_SHA512,
|
||||||
|
ALG_ID_ECDSA_P256,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
|
@ -278,7 +279,8 @@ static const struct {
|
||||||
/* ALG_ID_SHA1 */ { 20, BCRYPT_SHA1_ALGORITHM },
|
/* ALG_ID_SHA1 */ { 20, BCRYPT_SHA1_ALGORITHM },
|
||||||
/* ALG_ID_SHA256 */ { 32, BCRYPT_SHA256_ALGORITHM },
|
/* ALG_ID_SHA256 */ { 32, BCRYPT_SHA256_ALGORITHM },
|
||||||
/* ALG_ID_SHA384 */ { 48, BCRYPT_SHA384_ALGORITHM },
|
/* ALG_ID_SHA384 */ { 48, BCRYPT_SHA384_ALGORITHM },
|
||||||
/* ALG_ID_SHA512 */ { 64, BCRYPT_SHA512_ALGORITHM }
|
/* ALG_ID_SHA512 */ { 64, BCRYPT_SHA512_ALGORITHM },
|
||||||
|
/* ALG_ID_ECDSA_P256 */ { 0, BCRYPT_ECDSA_P256_ALGORITHM },
|
||||||
};
|
};
|
||||||
|
|
||||||
struct algorithm
|
struct algorithm
|
||||||
|
@ -351,6 +353,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
|
||||||
else if (!strcmpW( id, BCRYPT_SHA256_ALGORITHM )) alg_id = ALG_ID_SHA256;
|
else if (!strcmpW( id, BCRYPT_SHA256_ALGORITHM )) alg_id = ALG_ID_SHA256;
|
||||||
else if (!strcmpW( id, BCRYPT_SHA384_ALGORITHM )) alg_id = ALG_ID_SHA384;
|
else if (!strcmpW( id, BCRYPT_SHA384_ALGORITHM )) alg_id = ALG_ID_SHA384;
|
||||||
else if (!strcmpW( id, BCRYPT_SHA512_ALGORITHM )) alg_id = ALG_ID_SHA512;
|
else if (!strcmpW( id, BCRYPT_SHA512_ALGORITHM )) alg_id = ALG_ID_SHA512;
|
||||||
|
else if (!strcmpW( id, BCRYPT_ECDSA_P256_ALGORITHM )) alg_id = ALG_ID_ECDSA_P256;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FIXME( "algorithm %s not supported\n", debugstr_w(id) );
|
FIXME( "algorithm %s not supported\n", debugstr_w(id) );
|
||||||
|
|
Loading…
Reference in a new issue