crypt32: Remove a redundant test.
This commit is contained in:
parent
4fa4f67c79
commit
b16a78baa7
|
@ -3851,23 +3851,14 @@ static const BYTE v2CRLWithExt[] = { 0x30,0x5c,0x02,0x01,0x01,0x30,0x02,0x06,
|
|||
0x02,0x01,0x01,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,
|
||||
0x30,0x30,0x30,0x30,0x5a,0xa0,0x13,0x30,0x11,0x30,0x0f,0x06,0x03,0x55,0x1d,
|
||||
0x13,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 };
|
||||
static const BYTE v2CRLWithIssuingDistPoint[] = { 0x30,0x5c,0x02,0x01,0x01,
|
||||
0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,
|
||||
0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31,
|
||||
0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,
|
||||
0x16,0x30,0x14,0x02,0x01,0x01,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,
|
||||
0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0xa0,0x13,0x30,0x11,0x30,0x0f,0x06,
|
||||
0x03,0x55,0x1d,0x13,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 };
|
||||
|
||||
static void test_encodeCRLToBeSigned(DWORD dwEncoding)
|
||||
{
|
||||
BOOL ret;
|
||||
BYTE *buf = NULL;
|
||||
static CHAR oid_issuing_dist_point[] = szOID_ISSUING_DIST_POINT;
|
||||
DWORD size = 0;
|
||||
CRL_INFO info = { 0 };
|
||||
CRL_ENTRY entry = { { 0 }, { 0 }, 0, 0 };
|
||||
CERT_EXTENSION ext;
|
||||
|
||||
/* Test with a V1 CRL */
|
||||
ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info,
|
||||
|
@ -3978,21 +3969,6 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding)
|
|||
ok(!memcmp(buf, v2CRLWithExt, size), "Got unexpected value\n");
|
||||
LocalFree(buf);
|
||||
}
|
||||
/* a v2 CRL with an issuing dist point extension */
|
||||
ext.pszObjId = oid_issuing_dist_point;
|
||||
ext.fCritical = TRUE;
|
||||
ext.Value.cbData = sizeof(urlIDP);
|
||||
ext.Value.pbData = (LPBYTE)urlIDP;
|
||||
entry.rgExtension = &ext;
|
||||
ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info,
|
||||
CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
|
||||
ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
|
||||
if (buf)
|
||||
{
|
||||
ok(size == sizeof(v2CRLWithIssuingDistPoint), "Wrong size %d\n", size);
|
||||
ok(!memcmp(buf, v2CRLWithIssuingDistPoint, size), "Unexpected value\n");
|
||||
LocalFree(buf);
|
||||
}
|
||||
}
|
||||
|
||||
static const BYTE verisignCRL[] = { 0x30, 0x82, 0x01, 0xb1, 0x30, 0x82, 0x01,
|
||||
|
@ -4682,19 +4658,6 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding)
|
|||
{
|
||||
CRL_INFO *info = (CRL_INFO *)buf;
|
||||
|
||||
ok(info->cExtension == 1, "Expected 1 extensions, got %d\n",
|
||||
info->cExtension);
|
||||
LocalFree(buf);
|
||||
}
|
||||
/* And again, with an issuing dist point */
|
||||
ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED,
|
||||
v2CRLWithIssuingDistPoint, sizeof(v2CRLWithIssuingDistPoint),
|
||||
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
|
||||
ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
|
||||
if (buf)
|
||||
{
|
||||
CRL_INFO *info = (CRL_INFO *)buf;
|
||||
|
||||
ok(info->cExtension == 1, "Expected 1 extensions, got %d\n",
|
||||
info->cExtension);
|
||||
LocalFree(buf);
|
||||
|
|
Loading…
Reference in New Issue