Commit cbfcfc23 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

crypt32: Add OID info for szOID_ECC_PUBLIC_KEY.

parent 073c2394
...@@ -1271,6 +1271,8 @@ static const struct OIDInfoConstructor { ...@@ -1271,6 +1271,8 @@ static const struct OIDInfoConstructor {
{ 3, szOID_INFOSEC_mosaicKMandUpdSig, CALG_DSS_SIGN, L"mosaicKMandUpdSig", &mosaicFlagsBlob }, { 3, szOID_INFOSEC_mosaicKMandUpdSig, CALG_DSS_SIGN, L"mosaicKMandUpdSig", &mosaicFlagsBlob },
{ 3, szOID_RSA_SMIMEalgESDH, CALG_DH_EPHEM, L"ESDH", &noNullBlob }, { 3, szOID_RSA_SMIMEalgESDH, CALG_DH_EPHEM, L"ESDH", &noNullBlob },
{ 3, szOID_PKIX_NO_SIGNATURE, CALG_NO_SIGN, L"NOSIGN", NULL }, { 3, szOID_PKIX_NO_SIGNATURE, CALG_NO_SIGN, L"NOSIGN", NULL },
{ 3, szOID_ECC_PUBLIC_KEY, CALG_OID_INFO_PARAMETERS, L"ECC", NULL,
CRYPT_OID_INFO_ECC_PARAMETERS_ALGORITHM, L"" },
{ 4, szOID_RSA_SHA1RSA, CALG_SHA1, L"sha1RSA", &rsaSignBlob }, { 4, szOID_RSA_SHA1RSA, CALG_SHA1, L"sha1RSA", &rsaSignBlob },
{ 4, szOID_RSA_SHA256RSA, CALG_SHA_256, L"sha256RSA", &rsaSignBlob }, { 4, szOID_RSA_SHA256RSA, CALG_SHA_256, L"sha256RSA", &rsaSignBlob },
......
...@@ -72,7 +72,8 @@ static const struct OIDToAlgID oidToAlgID[] = { ...@@ -72,7 +72,8 @@ static const struct OIDToAlgID oidToAlgID[] = {
{ szOID_INFOSEC_mosaicKMandUpdSig, CALG_DSS_SIGN }, { szOID_INFOSEC_mosaicKMandUpdSig, CALG_DSS_SIGN },
{ szOID_NIST_sha256, CALG_SHA_256, -1 }, { szOID_NIST_sha256, CALG_SHA_256, -1 },
{ szOID_NIST_sha384, CALG_SHA_384, -1 }, { szOID_NIST_sha384, CALG_SHA_384, -1 },
{ szOID_NIST_sha512, CALG_SHA_512, -1 } { szOID_NIST_sha512, CALG_SHA_512, -1 },
{ szOID_ECC_PUBLIC_KEY, CALG_OID_INFO_PARAMETERS },
}; };
static const struct OIDToAlgID algIDToOID[] = { static const struct OIDToAlgID algIDToOID[] = {
...@@ -509,6 +510,7 @@ static void test_findOIDInfo(void) ...@@ -509,6 +510,7 @@ static void test_findOIDInfo(void)
{ {
static CHAR oid_rsa_md5[] = szOID_RSA_MD5, oid_sha256[] = szOID_NIST_sha256; static CHAR oid_rsa_md5[] = szOID_RSA_MD5, oid_sha256[] = szOID_NIST_sha256;
static CHAR oid_ecdsa_sha256[] = szOID_ECDSA_SHA256; static CHAR oid_ecdsa_sha256[] = szOID_ECDSA_SHA256;
static CHAR oid_ecc_public_key[] = szOID_ECC_PUBLIC_KEY;
ALG_ID alg = CALG_SHA1; ALG_ID alg = CALG_SHA1;
ALG_ID algs[2] = { CALG_MD5, CALG_RSA_SIGN }; ALG_ID algs[2] = { CALG_MD5, CALG_RSA_SIGN };
const struct oid_info const struct oid_info
...@@ -573,6 +575,17 @@ static void test_findOIDInfo(void) ...@@ -573,6 +575,17 @@ static void test_findOIDInfo(void)
} }
else else
win_skip("Host does not support ECDSA_SHA256, skipping test\n"); win_skip("Host does not support ECDSA_SHA256, skipping test\n");
info = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, oid_ecc_public_key, 0);
ok(!!info, "got error %#lx.\n", GetLastError());
ok(!strcmp(info->pszOID, oid_ecc_public_key), "got %s.\n", info->pszOID);
ok(!wcscmp(info->pwszName, L"ECC"), "got %s.\n", wine_dbgstr_w(info->pwszName));
ok(info->dwGroupId == CRYPT_PUBKEY_ALG_OID_GROUP_ID, "got %lu.\n", info->dwGroupId);
ok(U(*info).Algid == CALG_OID_INFO_PARAMETERS, "got %d.\n", U(*info).Algid);
ok(!info->ExtraInfo.cbData, "got %ld.\n", info->ExtraInfo.cbData);
ok(!wcscmp(info->pwszCNGAlgid, CRYPT_OID_INFO_ECC_PARAMETERS_ALGORITHM), "got %s.\n", wine_dbgstr_w(info->pwszCNGAlgid));
ok(info->pwszCNGExtraAlgid && !wcscmp(info->pwszCNGExtraAlgid, L""), "got %s.\n",
wine_dbgstr_w(info->pwszCNGExtraAlgid));
} }
static void test_registerOIDInfo(void) static void test_registerOIDInfo(void)
......
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