mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
[BCRYPT] Add ECDSA P384 to known algorithms
Add missing structs and handler in BCryptOpenAlgorithmProvider(). Cherry-pick a part of Michael Müller's76b6c360fa
Follow-up toe0a47b7
(0.4.15-dev-3603). CORE-14198
This commit is contained in:
parent
be56aff102
commit
c3e0df0611
1 changed files with 3 additions and 0 deletions
|
@ -268,6 +268,7 @@ enum alg_id
|
|||
ALG_ID_SHA384,
|
||||
ALG_ID_SHA512,
|
||||
ALG_ID_ECDSA_P256,
|
||||
ALG_ID_ECDSA_P384,
|
||||
};
|
||||
|
||||
static const struct {
|
||||
|
@ -281,6 +282,7 @@ static const struct {
|
|||
/* ALG_ID_SHA384 */ { 48, BCRYPT_SHA384_ALGORITHM },
|
||||
/* ALG_ID_SHA512 */ { 64, BCRYPT_SHA512_ALGORITHM },
|
||||
/* ALG_ID_ECDSA_P256 */ { 0, BCRYPT_ECDSA_P256_ALGORITHM },
|
||||
/* ALG_ID_ECDSA_P384 */ { 0, BCRYPT_ECDSA_P384_ALGORITHM },
|
||||
};
|
||||
|
||||
struct algorithm
|
||||
|
@ -354,6 +356,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
|
|||
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_ECDSA_P256_ALGORITHM )) alg_id = ALG_ID_ECDSA_P256;
|
||||
else if (!strcmpW( id, BCRYPT_ECDSA_P384_ALGORITHM )) alg_id = ALG_ID_ECDSA_P384;
|
||||
else
|
||||
{
|
||||
FIXME( "algorithm %s not supported\n", debugstr_w(id) );
|
||||
|
|
Loading…
Reference in a new issue