ReactOS 0.4.15-dev-7907-g95bf896
ctl.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winerror.h>
#include <wincrypt.h>
#include "wine/test.h"
Include dependency graph for ctl.c:

Go to the source code of this file.

Functions

static void testCreateCTL (void)
 
static void testDupCTL (void)
 
static void checkHash (const BYTE *data, DWORD dataLen, ALG_ID algID, PCCTL_CONTEXT context, DWORD propID)
 
static void testCTLProperties (void)
 
static void testAddCTLToStore (void)
 
 START_TEST (ctl)
 

Variables

static const BYTE emptyCTL []
 
static const BYTE ctlWithOneEntry []
 
static const BYTE signedCTL []
 
static const BYTE signedCTLWithSubjectAlgorithm []
 
static const BYTE signedCTLWithCTLInnerContent []
 
static const BYTE signedCTLWithCTLInnerContentAndBadSig []
 
static const BYTE signedCTLWithUsage []
 
static const BYTE signedCTLWithListID1 []
 
static const BYTE signedCTLWithListID2 []
 

Function Documentation

◆ checkHash()

static void checkHash ( const BYTE data,
DWORD  dataLen,
ALG_ID  algID,
PCCTL_CONTEXT  context,
DWORD  propID 
)
static

Definition at line 213 of file ctl.c.

215{
216 BYTE hash[20] = { 0 }, hashProperty[20];
217 BOOL ret;
218 DWORD size;
219
220 memset(hash, 0, sizeof(hash));
221 memset(hashProperty, 0, sizeof(hashProperty));
222 size = sizeof(hash);
223 ret = CryptHashCertificate(0, algID, 0, data, dataLen, hash, &size);
224 ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError());
225 ret = CertGetCTLContextProperty(context, propID, hashProperty, &size);
226 ok(ret, "CertGetCTLContextProperty failed: %08x\n", GetLastError());
227 if (ret)
228 ok(!memcmp(hash, hashProperty, size),
229 "Unexpected hash for property %d\n", propID);
230}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define ok(value,...)
Definition: atltest.h:57
BOOL WINAPI CryptHashCertificate(HCRYPTPROV_LEGACY hCryptProv, ALG_ID Algid, DWORD dwFlags, const BYTE *pbEncoded, DWORD cbEncoded, BYTE *pbComputedHash, DWORD *pcbComputedHash)
Definition: cert.c:2187
BOOL WINAPI CertGetCTLContextProperty(PCCTL_CONTEXT pCTLContext, DWORD dwPropId, void *pvData, DWORD *pcbData)
Definition: ctl.c:590
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
#define memset(x, y, z)
Definition: compat.h:39
Definition: http.c:7252
Definition: _hash_fun.h:40
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
unsigned char BYTE
Definition: xxhash.c:193

Referenced by testCTLProperties().

◆ START_TEST()

START_TEST ( ctl  )

Definition at line 456 of file ctl.c.

457{
459 testDupCTL();
462}
static void testCreateCTL(void)
Definition: ctl.c:110
static void testCTLProperties(void)
Definition: ctl.c:232
static void testDupCTL(void)
Definition: ctl.c:190
static void testAddCTLToStore(void)
Definition: ctl.c:350

◆ testAddCTLToStore()

static void testAddCTLToStore ( void  )
static

Definition at line 350 of file ctl.c.

351{
352 HCERTSTORE store;
353 BOOL ret;
354 DWORD numCTLs, expectedCTLs;
355 PCCTL_CONTEXT ctl;
356
359 /* Add two CTLs */
363 ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError());
367 NULL);
368 ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError());
369 /* Check that two exist */
370 numCTLs = 0;
371 ctl = NULL;
372 do {
373 ctl = CertEnumCTLsInStore(store, ctl);
374 if (ctl)
375 numCTLs++;
376 } while (ctl);
377 ok(numCTLs == 2, "expected 2 CTLs, got %d\n", numCTLs);
378 CertCloseStore(store, 0);
379
382 /* Add the two CTLs again. They're identical except for the signature.. */
386 ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError());
387 /* so adding the second CTL fails. */
388 SetLastError(0xdeadbeef);
392 NULL);
394 "expected CRYPT_E_EXISTS or OSS_DATA_ERROR, got %d %08x\n", ret, GetLastError());
395 CertCloseStore(store, 0);
396
399 /* Add two CTLs. These two have different usages, so they're considered
400 * different.
401 */
405 ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError());
406 expectedCTLs = 1;
409 NULL);
410 ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* some win98 */),
411 "CertAddEncodedCTLToStore failed: %08x\n", GetLastError());
412 if (ret)
413 expectedCTLs++;
414 /* Check that two exist */
415 numCTLs = 0;
416 ctl = NULL;
417 do {
418 ctl = CertEnumCTLsInStore(store, ctl);
419 if (ctl)
420 numCTLs++;
421 } while (ctl);
422 ok(numCTLs == expectedCTLs, "expected %d CTLs, got %d\n", expectedCTLs,
423 numCTLs);
424 CertCloseStore(store, 0);
425
428 /* Add two CTLs. Now they have the same (empty) usages and different list
429 * IDs, so they're different.
430 */
433 NULL);
434 if (!ret)
435 {
436 skip("adding a CTL with an empty usage not supported\n");
437 return;
438 }
439 ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError());
442 NULL);
443 ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError());
444 /* Check that two exist */
445 numCTLs = 0;
446 ctl = NULL;
447 do {
448 ctl = CertEnumCTLsInStore(store, ctl);
449 if (ctl)
450 numCTLs++;
451 } while (ctl);
452 ok(numCTLs == 2, "expected 2 CTLs, got %d\n", numCTLs);
453 CertCloseStore(store, 0);
454}
#define broken(x)
Definition: _sntprintf.h:21
#define skip(...)
Definition: atltest.h:64
#define NULL
Definition: types.h:112
PCCTL_CONTEXT WINAPI CertEnumCTLsInStore(HCERTSTORE hCertStore, PCCTL_CONTEXT pPrev)
Definition: ctl.c:200
BOOL WINAPI CertAddEncodedCTLToStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType, const BYTE *pbCtlEncoded, DWORD cbCtlEncoded, DWORD dwAddDisposition, PCCTL_CONTEXT *ppCtlContext)
Definition: ctl.c:177
HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider, DWORD dwMsgAndCertEncodingType, HCRYPTPROV_LEGACY hCryptProv, DWORD dwFlags, const void *pvPara)
Definition: store.c:815
BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
Definition: store.c:1127
#define SetLastError(x)
Definition: compat.h:752
static const BYTE signedCTLWithUsage[]
Definition: ctl.c:291
static const BYTE signedCTLWithListID1[]
Definition: ctl.c:311
static const BYTE signedCTLWithCTLInnerContentAndBadSig[]
Definition: ctl.c:89
static const BYTE signedCTLWithListID2[]
Definition: ctl.c:330
static const BYTE signedCTLWithCTLInnerContent[]
Definition: ctl.c:69
#define CERT_STORE_CREATE_NEW_FLAG
Definition: wincrypt.h:2464
#define X509_ASN_ENCODING
Definition: wincrypt.h:2297
#define CERT_STORE_PROV_MEMORY
Definition: wincrypt.h:2251
#define CERT_STORE_ADD_NEW
Definition: wincrypt.h:2482
#define CERT_STORE_ADD_ALWAYS
Definition: wincrypt.h:2485
#define CRYPT_E_EXISTS
Definition: winerror.h:3008
#define OSS_DATA_ERROR
Definition: winerror.h:3042

Referenced by START_TEST().

◆ testCreateCTL()

static void testCreateCTL ( void  )
static

Definition at line 110 of file ctl.c.

111{
112 PCCTL_CONTEXT ctl;
113
114 SetLastError(0xdeadbeef);
115 ctl = CertCreateCTLContext(0, NULL, 0);
116 ok(!ctl && GetLastError() == E_INVALIDARG,
117 "expected E_INVALIDARG, got %08x\n", GetLastError());
118 SetLastError(0xdeadbeef);
120 ok(!ctl &&
122 GetLastError() == OSS_MORE_INPUT), /* win9x */
123 "expected ERROR_INVALID_DATA, got %d (0x%08x)\n", GetLastError(),
124 GetLastError());
125 /* An empty CTL can't be created.. */
126 SetLastError(0xdeadbeef);
128 ok(!ctl &&
130 GetLastError() == OSS_DATA_ERROR), /* win9x */
131 "expected ERROR_INVALID_DATA, got %d (0x%08x)\n", GetLastError(),
132 GetLastError());
133 /* Nor can any of these "signed" CTLs whose inner content OID isn't
134 * szOID_CTL.
135 */
136 SetLastError(0xdeadbeef);
138 ok(!ctl &&
140 GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE /* win9x */ ||
141 GetLastError() == ERROR_SUCCESS /* some win98 */),
142 "expected ERROR_INVALID_DATA, CRYPT_E_UNEXPECTED_MSG_TYPE, or ERROR_SUCCESS, got %d (0x%08x)\n", GetLastError(),
143 GetLastError());
144 SetLastError(0xdeadbeef);
146 sizeof(ctlWithOneEntry));
147 ok(!ctl &&
149 GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE /* win9x */ ||
150 GetLastError() == OSS_DATA_ERROR /* some win98 */ ||
151 GetLastError() == ERROR_SUCCESS /* some win98 */),
152 "expected ERROR_INVALID_DATA, CRYPT_E_UNEXPECTED_MSG_TYPE, OSS_DATA_ERROR, or ERROR_SUCCESS, got %d (0x%08x)\n", GetLastError(),
153 GetLastError());
154 SetLastError(0xdeadbeef);
157 ok(!ctl &&
159 GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE /* win9x */ ||
160 GetLastError() == ERROR_SUCCESS /* some win98 */),
161 "expected ERROR_INVALID_DATA, got %d (0x%08x)\n", GetLastError(),
162 GetLastError());
163 /* This signed CTL with the appropriate inner content type can be decoded.
164 */
167 ok(ctl != NULL, "CertCreateCTLContext failed: %08x\n", GetLastError());
168 if (ctl)
169 {
170 /* Even though the CTL was decoded with X509_ASN_ENCODING, the
171 * message encoding type is included in the CTL's encoding type.
172 */
175 "expected X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, got %08x\n",
178 }
179 /* This CTL with a bad signature can also be decoded, so the sig isn't
180 * checked when loading the CTL.
181 */
185 ok(ctl != NULL, "CertCreateCTLContext failed: %08x\n", GetLastError());
186 if (ctl)
188}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define ERROR_SUCCESS
Definition: deptool.c:10
BOOL WINAPI CertFreeCTLContext(PCCTL_CONTEXT pCTLContext)
Definition: ctl.c:499
PCCTL_CONTEXT WINAPI CertCreateCTLContext(DWORD dwMsgAndCertEncodingType, const BYTE *pbCtlEncoded, DWORD cbCtlEncoded)
Definition: ctl.c:363
static const BYTE emptyCTL[]
Definition: ctl.c:31
static const BYTE ctlWithOneEntry[]
Definition: ctl.c:34
static const BYTE signedCTL[]
Definition: ctl.c:38
static const BYTE signedCTLWithSubjectAlgorithm[]
Definition: ctl.c:53
DWORD dwMsgAndCertEncodingType
Definition: wincrypt.h:744
#define PKCS_7_ASN_ENCODING
Definition: wincrypt.h:2299
#define CRYPT_E_UNEXPECTED_MSG_TYPE
Definition: winerror.h:3013
#define OSS_MORE_INPUT
Definition: winerror.h:3041
#define ERROR_INVALID_DATA
Definition: winerror.h:116

Referenced by START_TEST().

◆ testCTLProperties()

static void testCTLProperties ( void  )
static

Definition at line 232 of file ctl.c.

233{
234 PCCTL_CONTEXT ctl;
235 BOOL ret;
236 DWORD propID, numProps, access, size;
237
240 if (!ctl)
241 {
242 skip("CertCreateCTLContext failed: %08x\n", GetLastError());
243 return;
244 }
245
246 /* No properties as yet */
247 propID = 0;
248 numProps = 0;
249 do {
250 propID = CertEnumCTLContextProperties(ctl, propID);
251 if (propID)
252 numProps++;
253 } while (propID != 0);
254 ok(numProps == 0, "Expected 0 properties, got %d\n", numProps);
255
256 /* An implicit property */
258 &size);
259 ok(ret || broken(GetLastError() == CRYPT_E_NOT_FOUND /* some win98 */),
260 "CertGetCTLContextProperty failed: %08x\n", GetLastError());
262 &size);
263 ok(ret || broken(GetLastError() == CRYPT_E_NOT_FOUND /* some win98 */),
264 "CertGetCTLContextProperty failed: %08x\n", GetLastError());
265 if (ret)
267 "Didn't expect a persisted cert\n");
268
271
272 /* Now that the hash property is set, we should get one property when
273 * enumerating.
274 */
275 propID = 0;
276 numProps = 0;
277 do {
278 propID = CertEnumCTLContextProperties(ctl, propID);
279 if (propID)
280 numProps++;
281 } while (propID != 0);
282 ok(numProps == 1, "Expected 1 properties, got %d\n", numProps);
283
287
289}
DWORD WINAPI CertEnumCTLContextProperties(PCCTL_CONTEXT pCTLContext, DWORD dwPropId)
Definition: ctl.c:508
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
static void checkHash(const BYTE *data, DWORD dataLen, ALG_ID algID, PCCTL_CONTEXT context, DWORD propID)
Definition: ctl.c:213
#define CERT_MD5_HASH_PROP_ID
Definition: wincrypt.h:2689
#define CALG_SHA1
Definition: wincrypt.h:1807
#define CALG_MD5
Definition: wincrypt.h:1805
#define CERT_ACCESS_STATE_PROP_ID
Definition: wincrypt.h:2700
#define CERT_ACCESS_STATE_WRITE_PERSIST_FLAG
Definition: wincrypt.h:2766
#define CERT_HASH_PROP_ID
Definition: wincrypt.h:2688
#define CRYPT_E_NOT_FOUND
Definition: winerror.h:3007

Referenced by START_TEST().

◆ testDupCTL()

static void testDupCTL ( void  )
static

Definition at line 190 of file ctl.c.

191{
192 PCCTL_CONTEXT context, dupContext;
193 BOOL res;
194
196 ok(context == NULL, "expected NULL\n");
199 dupContext = CertDuplicateCTLContext(context);
200 ok(dupContext != NULL, "expected a context\n");
201 ok(dupContext == context, "expected identical context addresses\n");
202
203 res = CertFreeCTLContext(dupContext);
204 ok(res, "CertFreeCTLContext failed\n");
205
207 ok(res, "CertFreeCTLContext failed\n");
208
210 ok(res, "CertFreeCTLContext failed\n");
211}
PCCTL_CONTEXT WINAPI CertDuplicateCTLContext(PCCTL_CONTEXT pCtlContext)
Definition: ctl.c:491
GLuint res
Definition: glext.h:9613

Referenced by START_TEST().

Variable Documentation

◆ ctlWithOneEntry

const BYTE ctlWithOneEntry[]
static
Initial value:
= {
0x30,0x2a,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,
0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x30,0x11,0x30,0x0f,0x04,
0x01,0x01,0x31,0x0a,0x30,0x08,0x06,0x02,0x2a,0x03,0x31,0x02,0x30,0x00 }

Definition at line 34 of file ctl.c.

Referenced by testCreateCTL().

◆ emptyCTL

const BYTE emptyCTL[]
static
Initial value:
= {
0x30,0x17,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,
0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00 }

Definition at line 31 of file ctl.c.

Referenced by testCreateCTL().

◆ signedCTL

const BYTE signedCTL[]
static
Initial value:
= {
0x30,0x81,0xc7,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0xb9,0x30,0x81,0xb6,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x28,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x1b,0x04,0x19,0x30,0x17,0x30,0x00,
0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
0x30,0x5a,0x30,0x02,0x06,0x00,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,
0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,
0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,
0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,
0x00,0x04,0x40,0xca,0xd8,0x32,0xd1,0xbd,0x97,0x61,0x54,0xd6,0x80,0xcf,0x0d,
0xbd,0xa2,0x42,0xc7,0xca,0x37,0x91,0x7d,0x9d,0xac,0x8c,0xdf,0x05,0x8a,0x39,
0xc6,0x07,0xc1,0x37,0xe6,0xb9,0xd1,0x0d,0x26,0xec,0xa5,0xb0,0x8a,0x51,0x26,
0x2b,0x4f,0x73,0x44,0x86,0x83,0x5e,0x2b,0x6e,0xcc,0xf8,0x1b,0x85,0x53,0xe9,
0x7a,0x80,0x8f,0x6b,0x42,0x19,0x93 }

Definition at line 38 of file ctl.c.

Referenced by testCreateCTL().

◆ signedCTLWithCTLInnerContent

const BYTE signedCTLWithCTLInnerContent[]
static
Initial value:
= {
0x30,0x82,0x01,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
0xa0,0x82,0x01,0x00,0x30,0x81,0xfd,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,
0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x30,0x06,0x09,
0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x23,0x30,0x21,0x30,0x00,
0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
0x30,0x5a,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,
0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,
0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,
0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,
0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,0x3b,0x30,0x18,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2b,0x06,0x01,0x04,
0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x54,0x71,0xbc,0xe1,0x56,0x31,0xa2,0xf9,
0x65,0x70,0x34,0xf8,0xe2,0xe9,0xb4,0xf4,0x30,0x04,0x06,0x00,0x05,0x00,0x04,
0x40,0x2f,0x1b,0x9f,0x5a,0x4a,0x15,0x73,0xfa,0xb1,0x93,0x3d,0x09,0x52,0xdf,
0x6b,0x98,0x4b,0x13,0x5e,0xe7,0xbf,0x65,0xf4,0x9c,0xc2,0xb1,0x77,0x09,0xb1,
0x66,0x4d,0x72,0x0d,0xb1,0x1a,0x50,0x20,0xe0,0x57,0xa2,0x39,0xc7,0xcd,0x7f,
0x8e,0xe7,0x5f,0x76,0x2b,0xd1,0x6a,0x82,0xb3,0x30,0x25,0x61,0xf6,0x25,0x23,
0x57,0x6c,0x0b,0x47,0xb8 }

Definition at line 69 of file ctl.c.

Referenced by testAddCTLToStore(), testCreateCTL(), testCTLProperties(), and testDupCTL().

◆ signedCTLWithCTLInnerContentAndBadSig

const BYTE signedCTLWithCTLInnerContentAndBadSig[]
static
Initial value:
= {
0x30,0x82,0x01,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
0xa0,0x82,0x01,0x00,0x30,0x81,0xfd,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,
0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x30,0x06,0x09,
0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x23,0x30,0x21,0x30,0x00,
0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
0x30,0x5a,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,
0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,
0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,
0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,
0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,0x3b,0x30,0x18,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2b,0x06,0x01,0x04,
0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x54,0x71,0xbc,0xe1,0x56,0x31,0xa2,0xf9,
0x65,0x70,0x34,0xf8,0xe2,0xe9,0xb4,0xf4,0x30,0x04,0x06,0x00,0x05,0x00,0x04,
0x40,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff }

Definition at line 89 of file ctl.c.

Referenced by testAddCTLToStore(), and testCreateCTL().

◆ signedCTLWithListID1

const BYTE signedCTLWithListID1[]
static
Initial value:
= {
0x30,0x82,0x01,0x07,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
0xa0,0x81,0xf9,0x30,0x81,0xf6,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,
0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x29,0x06,0x09,0x2b,
0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x1c,0x30,0x1a,0x30,0x00,0x04,
0x01,0x01,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,
0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,
0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,
0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,
0x3b,0x30,0x18,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,
0x0b,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,
0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x09,0x04,0x31,0x12,0x04,0x10,0xbc,
0x13,0xde,0x17,0xc7,0x7c,0x67,0x5b,0xf9,0xa9,0x7c,0xb0,0xd9,0xf2,0x84,0xd5,
0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }

Definition at line 311 of file ctl.c.

Referenced by testAddCTLToStore().

◆ signedCTLWithListID2

const BYTE signedCTLWithListID2[]
static
Initial value:
= {
0x30,0x82,0x01,0x07,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
0xa0,0x81,0xf9,0x30,0x81,0xf6,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,
0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x29,0x06,0x09,0x2b,
0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x1c,0x30,0x1a,0x30,0x00,0x04,
0x01,0x02,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,
0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,
0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,
0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,
0x3b,0x30,0x18,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,
0x0b,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,
0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x60,
0x6b,0x10,0xb6,0xb8,0x74,0xb8,0xf3,0x79,0xd5,0x42,0x15,0x4a,0x60,0x93,0x1f,
0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }

Definition at line 330 of file ctl.c.

Referenced by testAddCTLToStore().

◆ signedCTLWithSubjectAlgorithm

const BYTE signedCTLWithSubjectAlgorithm[]
static
Initial value:
= {
0x30,0x81,0xd1,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0xc3,0x30,0x81,0xc0,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x32,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x25,0x04,0x23,0x30,0x21,0x30,0x00,
0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
0x30,0x5a,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,
0x00,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,
0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,
0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,
0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0xca,0x7a,
0xfa,0xbf,0x44,0x36,0xfd,0xb2,0x84,0x70,0x0f,0xf5,0x66,0xcb,0x68,0xdb,0x45,
0x74,0xa1,0xed,0xe3,0x30,0x4a,0x11,0xd2,0x7b,0xf5,0xa9,0x68,0x8d,0x36,0xe8,
0x79,0xff,0xa2,0xf2,0x4c,0x8a,0xa9,0x65,0x03,0xf8,0x77,0xa5,0x01,0xd3,0x46,
0x8a,0xcc,0x93,0x36,0x30,0xe1,0xa4,0x47,0x70,0x3d,0xb3,0x97,0xfc,0x6d,0x24,
0xe9,0xf9 }

Definition at line 53 of file ctl.c.

Referenced by testCreateCTL().

◆ signedCTLWithUsage

const BYTE signedCTLWithUsage[]
static
Initial value:
= {
0x30,0x82,0x01,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
0xa0,0x82,0x01,0x00,0x30,0x81,0xfd,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,
0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x30,0x06,0x09,
0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x23,0x30,0x21,0x30,0x0a,
0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x18,0x0f,0x31,0x36,0x30,
0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,
0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,
0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,
0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,
0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,0x3b,0x30,0x18,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2b,0x06,0x01,0x04,
0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x01,0x09,0x04,0x31,0x12,0x04,0x10,0xc4,0x3e,0x7e,0xc8,0xf9,0x85,0xf3,0x27,
0x7d,0xc0,0x38,0xb2,0x7f,0xc7,0x76,0x85,0x30,0x04,0x06,0x00,0x05,0x00,0x04,
0x40,0x90,0x33,0x1b,0xb4,0x88,0x35,0xe6,0xf7,0x7f,0x93,0x05,0xc9,0x1a,0x0e,
0x8f,0x21,0xc0,0xaa,0xb3,0xab,0x3e,0x4a,0xa6,0x63,0x74,0xfd,0xef,0x11,0xbd,
0x67,0x3a,0x1b,0x07,0x4b,0x88,0x59,0x31,0xd5,0x08,0xf9,0x09,0x2f,0x0b,0x85,
0x62,0x5a,0x67,0x3b,0x62,0x7e,0x81,0x31,0xea,0xa4,0x36,0x5f,0x9a,0x92,0xb6,
0x66,0xa5,0x00,0x60,0x96 }

Definition at line 291 of file ctl.c.

Referenced by testAddCTLToStore().