Set correctly flags for ECDH derive operations

This commit is contained in:
Jakub Jelen 2019-05-16 17:26:09 +02:00 committed by Frank Morgner
parent 6d751e8b22
commit 272e380898
2 changed files with 2 additions and 1 deletions

View File

@ -4877,7 +4877,7 @@ DWORD WINAPI CardConstructDHAgreement(__in PCARD_DATA pCardData,
DWORD dwret;
VENDOR_SPECIFIC *vs;
struct sc_pkcs15_object *pkey = NULL;
int r, opt_derive_flags = 0;
int r, opt_derive_flags = SC_ALGORITHM_ECDH_CDH_RAW;
u8* out = 0;
unsigned long outlen = 0;
PBYTE pbPublicKey = NULL;

View File

@ -4263,6 +4263,7 @@ pkcs15_prkey_derive(struct sc_pkcs11_session *session, void *obj,
CK_ECDH1_DERIVE_PARAMS * ecdh_params = (CK_ECDH1_DERIVE_PARAMS *) pParameters;
ulSeedDataLen = ecdh_params->ulPublicDataLen;
pSeedData = ecdh_params->pPublicData;
flags = SC_ALGORITHM_ECDH_CDH_RAW;
}
break;
}