Commit d20d4929 authored by Ge van Geldorp's avatar Ge van Geldorp Committed by Alexandre Julliard

crypt32/tests: Fix cert test on Win7.

parent 6fa09d1d
......@@ -3143,7 +3143,8 @@ static void testGetPublicKeyLength(void)
ret, GetLastError());
SetLastError(0xdeadbeef);
ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info);
ok(ret == 56, "Expected length 56, got %d\n", ret);
ok(ret == 56 || broken(ret == 0 && GetLastError() == NTE_BAD_LEN) /* Win7 */,
"Expected length 56, got %d\n", ret);
/* An RSA key with the DH OID */
info.Algorithm.pszObjId = oid_rsa_dh;
SetLastError(0xdeadbeef);
......@@ -3157,12 +3158,14 @@ static void testGetPublicKeyLength(void)
info.Algorithm.pszObjId = oid_rsa_rsa;
SetLastError(0xdeadbeef);
ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info);
ok(ret == 56, "Expected length 56, got %d\n", ret);
ok(ret == 56 || broken(ret == 0 && GetLastError() == NTE_BAD_LEN) /* Win7 */,
"Expected length 56, got %d\n", ret);
/* With the RSA OID and a message encoding */
info.Algorithm.pszObjId = oid_rsa_rsa;
SetLastError(0xdeadbeef);
ret = CertGetPublicKeyLength(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, &info);
ok(ret == 56, "Expected length 56, got %d\n", ret);
ok(ret == 56 || broken(ret == 0 && GetLastError() == NTE_BAD_LEN) /* Win7 */,
"Expected length 56, got %d\n", ret);
}
START_TEST(cert)
......
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