ReactOS  0.4.13-dev-249-gcba1a2f
message.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 message.c:

Go to the source code of this file.

Macros

#define GET_PROC(dll, func)
 

Functions

static BOOL (WINAPI *pCryptAcquireContextA)(HCRYPTPROV *
 
static void init_function_pointers (void)
 
static void test_msg_get_signer_count (void)
 
static void test_verify_detached_message_hash (void)
 
static void test_verify_message_hash (void)
 
static PCCERT_CONTEXT WINAPI msg_get_signer_callback (void *pvArg, DWORD certEncodingType, PCERT_INFO signerId, HCERTSTORE store)
 
static void test_verify_detached_message_signature (void)
 
static void test_verify_message_signature (void)
 
static void test_hash_message (void)
 
static void test_sign_message (void)
 
static void test_encrypt_message (void)
 
 START_TEST (message)
 

Variables

static LPCSTR
 
static DWORD
 
static const BYTE dataEmptyBareContent [] = { 0x04,0x00 }
 
static const BYTE dataEmptyContent []
 
static const BYTE signedEmptyBareContent []
 
static const BYTE signedEmptyContent []
 
static BYTE detachedHashContent []
 
static const BYTE msgData [] = { 1, 2, 3, 4 }
 
static BYTE hashContent []
 
static const BYTE signedWithCertContent []
 
static const BYTE signedContent []
 
static const BYTE detachedSignedContent []
 
static const BYTE v1CertWithValidPubKey []
 
static const BYTE signedWithCertEmptyContent []
 
static const BYTE signedWithCertWithPubKeyContent []
 
static const BYTE signedWithCertWithValidPubKeyContent []
 
static const BYTE detachedHashBlob []
 
static const BYTE hashBlob []
 
static const BYTE hashVal []
 
static const BYTE publicPrivateKeyPair []
 
static const BYTE cert1 []
 
static const BYTE cert2 []
 
static const BYTE crl []
 
static const BYTE signedHashForEmptyMessage []
 
static const BYTE signedEmptyMessage []
 
static const BYTE signedHash []
 
static const BYTE signedHashWithCert []
 
static const BYTE signedHashWithCRL []
 
static const BYTE signedData []
 
static const BYTE encryptedMessage []
 

Macro Definition Documentation

◆ GET_PROC

#define GET_PROC (   dll,
  func 
)
Value:
p ## func = (void *)GetProcAddress(dll, #func); \
if(!p ## func) \
trace("GetProcAddress(%s) failed\n", #func);
GLenum func
Definition: glext.h:6028
static HMODULE dll
Definition: str.c:188
#define GetProcAddress(x, y)
Definition: compat.h:410
GLfloat GLfloat p
Definition: glext.h:8902

Function Documentation

◆ BOOL()

static BOOL ( WINAPI pCryptAcquireContextA)
static

◆ init_function_pointers()

static void init_function_pointers ( void  )
static

Definition at line 33 of file message.c.

34 {
35  HMODULE hAdvapi32 = GetModuleHandleA("advapi32.dll");
36 
37 #define GET_PROC(dll, func) \
38  p ## func = (void *)GetProcAddress(dll, #func); \
39  if(!p ## func) \
40  trace("GetProcAddress(%s) failed\n", #func);
41 
42  GET_PROC(hAdvapi32, CryptAcquireContextA)
43 
44 #undef GET_PROC
45 }
#define GET_PROC(dll, func)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:819
BOOL WINAPI CryptAcquireContextA(HCRYPTPROV *phProv, LPCSTR pszContainer, LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
Definition: crypt.c:569

Referenced by START_TEST().

◆ msg_get_signer_callback()

static PCCERT_CONTEXT WINAPI msg_get_signer_callback ( void pvArg,
DWORD  certEncodingType,
PCERT_INFO  signerId,
HCERTSTORE  store 
)
static

Definition at line 339 of file message.c.

341 {
344 }
#define X509_ASN_ENCODING
Definition: wincrypt.h:2297
PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded)
Definition: cert.c:316
static const BYTE v1CertWithValidPubKey[]
Definition: message.c:323

Referenced by test_verify_detached_message_signature().

◆ START_TEST()

START_TEST ( message  )

Definition at line 1366 of file message.c.

1367 {
1369 
1378 }
static void test_verify_message_hash(void)
Definition: message.c:217
static void test_verify_detached_message_hash(void)
Definition: message.c:117
static void test_encrypt_message(void)
Definition: message.c:1210
static void test_verify_detached_message_signature(void)
Definition: message.c:346
static void test_verify_message_signature(void)
Definition: message.c:502
static void test_sign_message(void)
Definition: message.c:994
static void init_function_pointers(void)
Definition: message.c:33
static void test_msg_get_signer_count(void)
Definition: message.c:67
static void test_hash_message(void)
Definition: message.c:654

◆ test_encrypt_message()

static void test_encrypt_message ( void  )
static

Definition at line 1210 of file message.c.

1211 {
1212  BOOL ret;
1214  static char oid_rsa_rc4[] = szOID_RSA_RC4;
1215  static const BYTE blob[] = { 0x01, 0x02, 0x03, 0x04 };
1216  PCCERT_CONTEXT certs[2];
1217  HCRYPTPROV hCryptProv = 0;
1218  LPBYTE encryptedBlob;
1219  DWORD encryptedBlobSize;
1220 
1221  SetLastError(0xdeadbeef);
1222  ret = pCryptAcquireContextA(&hCryptProv, NULL, NULL, PROV_RSA_FULL,
1224  ok(ret, "CryptAcquireContextA failed: %08x\n", GetLastError());
1225 
1226  SetLastError(0xdeadbeef);
1228  PKCS_7_ASN_ENCODING, cert1, sizeof(cert1));
1229  ok(certs[0] != NULL, "CertCreateCertificateContext failed: %08x\n",
1230  GetLastError());
1231  SetLastError(0xdeadbeef);
1233  PKCS_7_ASN_ENCODING, cert2, sizeof(cert2));
1234  ok(certs[1] != NULL, "CertCreateCertificateContext failed: %08x\n",
1235  GetLastError());
1236 
1237  memset(&para, 0, sizeof(para));
1238  SetLastError(0xdeadbeef);
1239  encryptedBlobSize = 255;
1240  ret = CryptEncryptMessage(&para, 0, NULL, NULL, 0, NULL,
1241  &encryptedBlobSize);
1242  ok(!ret && GetLastError() == E_INVALIDARG,
1243  "expected E_INVALIDARG, got %08x\n", GetLastError());
1244  ok(!encryptedBlobSize, "unexpected size %d\n", encryptedBlobSize);
1245  para.cbSize = sizeof(para);
1247  SetLastError(0xdeadbeef);
1248  encryptedBlobSize = 255;
1249  ret = CryptEncryptMessage(&para, 0, NULL, NULL, 0, NULL,
1250  &encryptedBlobSize);
1251  ok(!ret && GetLastError() == E_INVALIDARG,
1252  "expected E_INVALIDARG, got %08x\n", GetLastError());
1253  ok(!encryptedBlobSize, "unexpected size %d\n", encryptedBlobSize);
1255  SetLastError(0xdeadbeef);
1256  encryptedBlobSize = 255;
1257  ret = CryptEncryptMessage(&para, 0, NULL, NULL, 0, NULL,
1258  &encryptedBlobSize);
1259  ok(!ret &&
1261  GetLastError() == E_INVALIDARG), /* Win9x */
1262  "expected CRYPT_E_UNKNOWN_ALGO or E_INVALIDARG, got %08x\n",
1263  GetLastError());
1264  ok(!encryptedBlobSize, "unexpected size %d\n", encryptedBlobSize);
1265 
1266  para.hCryptProv = hCryptProv;
1268 
1269  SetLastError(0xdeadbeef);
1270  encryptedBlobSize = 0;
1271  ret = CryptEncryptMessage(&para, 0, NULL, NULL, 0, NULL,
1272  &encryptedBlobSize);
1273  ok(ret ||
1274  broken(!ret) /* Win9x */,
1275  "CryptEncryptMessage failed: %08x\n", GetLastError());
1276  if (ret)
1277  {
1278  encryptedBlob = CryptMemAlloc(encryptedBlobSize);
1279  if (encryptedBlob)
1280  {
1281  SetLastError(0xdeadbeef);
1282  ret = CryptEncryptMessage(&para, 0, NULL, NULL, 0, encryptedBlob,
1283  &encryptedBlobSize);
1284  ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError());
1285  ok(encryptedBlobSize == sizeof(encryptedMessage),
1286  "unexpected size of encrypted blob %d\n", encryptedBlobSize);
1287  ok(!memcmp(encryptedBlob, encryptedMessage, encryptedBlobSize),
1288  "unexpected value\n");
1289  CryptMemFree(encryptedBlob);
1290  }
1291  }
1292 
1293  SetLastError(0xdeadbeef);
1294  encryptedBlobSize = 0;
1295  ret = CryptEncryptMessage(&para, 2, certs, NULL, 0, NULL,
1296  &encryptedBlobSize);
1297  ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError());
1298  if (ret)
1299  {
1300  encryptedBlob = CryptMemAlloc(encryptedBlobSize);
1301  if (encryptedBlob)
1302  {
1303  SetLastError(0xdeadbeef);
1304  ret = CryptEncryptMessage(&para, 2, certs, NULL, 0, encryptedBlob,
1305  &encryptedBlobSize);
1306  ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError());
1307  CryptMemFree(encryptedBlob);
1308  }
1309  }
1310 
1311  SetLastError(0xdeadbeef);
1312  encryptedBlobSize = 0;
1313  ret = CryptEncryptMessage(&para, 0, NULL, blob, sizeof(blob), NULL,
1314  &encryptedBlobSize);
1315  ok(ret ||
1316  broken(!ret) /* Win9x */,
1317  "CryptEncryptMessage failed: %08x\n", GetLastError());
1318  if (ret)
1319  {
1320  encryptedBlob = CryptMemAlloc(encryptedBlobSize);
1321  if (encryptedBlob)
1322  {
1323  SetLastError(0xdeadbeef);
1324  ret = CryptEncryptMessage(&para, 0, NULL, blob, sizeof(blob),
1325  encryptedBlob, &encryptedBlobSize);
1326  ok(ret ||
1327  broken(!ret && GetLastError() == NTE_PERM), /* some NT4 */
1328  "CryptEncryptMessage failed: %08x\n", GetLastError());
1329  if (ret)
1330  {
1331  ok(encryptedBlobSize == 55,
1332  "unexpected size of encrypted blob %d\n", encryptedBlobSize);
1333  }
1334  CryptMemFree(encryptedBlob);
1335  }
1336  }
1337 
1338  SetLastError(0xdeadbeef);
1339  encryptedBlobSize = 0;
1340  ret = CryptEncryptMessage(&para, 2, certs, blob, sizeof(blob), NULL,
1341  &encryptedBlobSize);
1342  ok(ret, "CryptEncryptMessage failed: %08x\n", GetLastError());
1343  if (ret)
1344  {
1345  encryptedBlob = CryptMemAlloc(encryptedBlobSize);
1346  if (encryptedBlob)
1347  {
1348  SetLastError(0xdeadbeef);
1349  ret = CryptEncryptMessage(&para, 2, certs, blob, sizeof(blob),
1350  encryptedBlob, &encryptedBlobSize);
1351  ok(ret ||
1352  broken(!ret), /* some Win95 and some NT4 */
1353  "CryptEncryptMessage failed: %08x\n", GetLastError());
1354  CryptMemFree(encryptedBlob);
1355  }
1356  }
1357 
1358  if (certs[0])
1359  CertFreeCertificateContext(certs[0]);
1360  if (certs[1])
1361  CertFreeCertificateContext(certs[1]);
1362  if (hCryptProv)
1363  CryptReleaseContext(hCryptProv, 0);
1364 }
static char oid_rsa_rc4[]
Definition: msg.c:2051
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
Definition: image.c:133
BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
Definition: cert.c:371
static const BYTE encryptedMessage[]
Definition: message.c:1204
#define szOID_RSA_RC4
Definition: wincrypt.h:3055
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define PKCS_7_ASN_ENCODING
Definition: wincrypt.h:2299
static const BYTE cert1[]
Definition: message.c:828
#define NTE_PERM
Definition: winerror.h:2884
#define X509_ASN_ENCODING
Definition: wincrypt.h:2297
LPVOID WINAPI CryptMemAlloc(ULONG cbSize)
Definition: main.c:131
unsigned char * LPBYTE
Definition: typedefs.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
CRYPT_ALGORITHM_IDENTIFIER ContentEncryptionAlgorithm
Definition: wincrypt.h:1471
#define ok(value,...)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
static const BYTE cert2[]
Definition: message.c:844
int ret
PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded)
Definition: cert.c:316
unsigned char BYTE
Definition: mem.h:68
#define CRYPT_E_UNKNOWN_ALGO
Definition: winerror.h:2986
BOOL WINAPI CryptEncryptMessage(PCRYPT_ENCRYPT_MESSAGE_PARA pEncryptPara, DWORD cRecipientCert, PCCERT_CONTEXT rgpRecipientCert[], const BYTE *pbToBeEncrypted, DWORD cbToBeEncrypted, BYTE *pbEncryptedBlob, DWORD *pcbEncryptedBlob)
Definition: message.c:521
#define broken(x)
Definition: _sntprintf.h:21
#define CRYPT_VERIFYCONTEXT
Definition: wincrypt.h:2069
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:46
VOID WINAPI CryptMemFree(LPVOID pv)
Definition: main.c:141
BOOL WINAPI CryptReleaseContext(HCRYPTPROV hProv, ULONG_PTR dwFlags)
Definition: crypt.c:651
#define memset(x, y, z)
Definition: compat.h:39
HCRYPTPROV_LEGACY hCryptProv
Definition: wincrypt.h:1470
#define PROV_RSA_FULL
Definition: wincrypt.h:2039

Referenced by START_TEST().

◆ test_hash_message()

static void test_hash_message ( void  )
static

Definition at line 654 of file message.c.

655 {
656  BOOL ret;
658  static const BYTE blob1[] = { 0xde, 0xad, 0xbe, 0xef };
659  static const BYTE blob2[] = { 0xba, 0xad, 0xf0, 0x0d };
660  const BYTE *toHash[] = { blob1, blob2 };
661  DWORD hashSize[] = { sizeof(blob1), sizeof(blob2) };
662  DWORD hashedBlobSize, computedHashSize;
663  static char oid_rsa_md5[] = szOID_RSA_MD5;
664  LPBYTE hashedBlob, computedHash;
665 
666  /* Crash
667  ret = CryptHashMessage(NULL, FALSE, 0, NULL, 0, NULL, NULL, NULL, NULL);
668  */
669  memset(&para, 0, sizeof(para));
670  SetLastError(0xdeadbeef);
671  ret = CryptHashMessage(&para, FALSE, 0, NULL, NULL, NULL, NULL, NULL, NULL);
672  ok(!ret && GetLastError() == E_INVALIDARG,
673  "expected E_INVALIDARG, got 0x%08x\n", GetLastError());
674  para.cbSize = sizeof(para);
675  /* Not quite sure what "success" means in this case, but it does succeed */
676  SetLastError(0xdeadbeef);
677  ret = CryptHashMessage(&para, FALSE, 0, NULL, NULL, NULL, NULL, NULL, NULL);
678  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
679  /* With a bogus encoding type it "succeeds" */
680  para.dwMsgEncodingType = 0xdeadbeef;
681  SetLastError(0xdeadbeef);
682  ret = CryptHashMessage(&para, FALSE, 0, NULL, NULL, NULL, NULL, NULL, NULL);
683  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
684  /* According to MSDN, the third parameter (cToBeHashed) must be 1 if the
685  * second parameter (fDetached) is FALSE, but again it "succeeds."
686  */
687  SetLastError(0xdeadbeef);
688  ret = CryptHashMessage(&para, FALSE, 2, NULL, NULL, NULL, NULL, NULL, NULL);
689  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
690  /* Even passing parameters to hash results in "success." */
691  SetLastError(0xdeadbeef);
692  ret = CryptHashMessage(&para, FALSE, 2, toHash, hashSize, NULL, NULL, NULL,
693  NULL);
694  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
695  /* Try again with a valid encoding type */
697  SetLastError(0xdeadbeef);
698  ret = CryptHashMessage(&para, FALSE, 2, NULL, NULL, NULL, NULL, NULL, NULL);
699  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
700  /* And with valid data to hash */
701  SetLastError(0xdeadbeef);
702  ret = CryptHashMessage(&para, FALSE, 2, toHash, hashSize, NULL, NULL, NULL,
703  NULL);
704  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
705  /* But requesting the size of the hashed blob and indicating there's data
706  * to hash results in a crash
707  */
708  if (0)
709  {
710  CryptHashMessage(&para, FALSE, 2, NULL, NULL, NULL,
711  &hashedBlobSize, NULL, NULL);
712  }
713  /* Passing a valid pointer for the data to hash fails, as the hash
714  * algorithm is finally checked.
715  */
716  SetLastError(0xdeadbeef);
717  ret = CryptHashMessage(&para, FALSE, 2, toHash, hashSize, NULL,
718  &hashedBlobSize, NULL, NULL);
719  ok(!ret &&
721  GetLastError() == CRYPT_E_OID_FORMAT), /* Vista */
722  "expected CRYPT_E_UNKNOWN_ALGO or CRYPT_E_OID_FORMAT, got 0x%08x (%d)\n",
725  /* With a valid hash algorithm, this succeeds, even though fDetached is
726  * FALSE.
727  */
728  SetLastError(0xdeadbeef);
729  ret = CryptHashMessage(&para, FALSE, 2, toHash, hashSize, NULL,
730  &hashedBlobSize, NULL, NULL);
731  todo_wine
732  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
733  if (ret)
734  {
735  /* Actually attempting to get the hashed data fails, perhaps because
736  * detached is FALSE.
737  */
738  hashedBlob = HeapAlloc(GetProcessHeap(), 0, hashedBlobSize);
739  SetLastError(0xdeadbeef);
740  ret = CryptHashMessage(&para, FALSE, 2, toHash, hashSize, hashedBlob,
741  &hashedBlobSize, NULL, NULL);
743  "expected CRYPT_E_MSG_ERROR, got 0x%08x (%d)\n", GetLastError(),
744  GetLastError());
745  HeapFree(GetProcessHeap(), 0, hashedBlob);
746  }
747  /* Repeating tests with fDetached = TRUE results in success */
748  SetLastError(0xdeadbeef);
749  ret = CryptHashMessage(&para, TRUE, 2, toHash, hashSize, NULL,
750  &hashedBlobSize, NULL, NULL);
751  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
752  if (ret)
753  {
754  hashedBlob = HeapAlloc(GetProcessHeap(), 0, hashedBlobSize);
755  SetLastError(0xdeadbeef);
756  ret = CryptHashMessage(&para, TRUE, 2, toHash, hashSize, hashedBlob,
757  &hashedBlobSize, NULL, NULL);
758  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
759  ok(hashedBlobSize == sizeof(detachedHashBlob),
760  "unexpected size of detached blob %d\n", hashedBlobSize);
761  ok(!memcmp(hashedBlob, detachedHashBlob, hashedBlobSize),
762  "unexpected detached blob value\n");
763  HeapFree(GetProcessHeap(), 0, hashedBlob);
764  }
765  /* Hashing a single item with fDetached = FALSE also succeeds */
766  SetLastError(0xdeadbeef);
767  ret = CryptHashMessage(&para, FALSE, 1, toHash, hashSize, NULL,
768  &hashedBlobSize, NULL, NULL);
769  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
770  if (ret)
771  {
772  hashedBlob = HeapAlloc(GetProcessHeap(), 0, hashedBlobSize);
773  ret = CryptHashMessage(&para, FALSE, 1, toHash, hashSize, hashedBlob,
774  &hashedBlobSize, NULL, NULL);
775  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
776  ok(hashedBlobSize == sizeof(hashBlob),
777  "unexpected size of detached blob %d\n", hashedBlobSize);
778  ok(!memcmp(hashedBlob, hashBlob, hashedBlobSize),
779  "unexpected detached blob value\n");
780  HeapFree(GetProcessHeap(), 0, hashedBlob);
781  }
782  /* Check the computed hash value too. You don't need to get the encoded
783  * blob to get it.
784  */
785  computedHashSize = 0xdeadbeef;
786  ret = CryptHashMessage(&para, TRUE, 2, toHash, hashSize, NULL,
787  &hashedBlobSize, NULL, &computedHashSize);
788  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
789  ok(computedHashSize == 16, "expected hash size of 16, got %d\n",
790  computedHashSize);
791  if (ret)
792  {
793  computedHash = HeapAlloc(GetProcessHeap(), 0, computedHashSize);
794  SetLastError(0xdeadbeef);
795  ret = CryptHashMessage(&para, TRUE, 2, toHash, hashSize, NULL,
796  &hashedBlobSize, computedHash, &computedHashSize);
797  ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError());
798  ok(computedHashSize == sizeof(hashVal),
799  "unexpected size of hash value %d\n", computedHashSize);
800  ok(!memcmp(computedHash, hashVal, computedHashSize),
801  "unexpected value\n");
802  HeapFree(GetProcessHeap(), 0, computedHash);
803  }
804 }
static char oid_rsa_md5[]
Definition: msg.c:34
#define CRYPT_E_MSG_ERROR
Definition: winerror.h:2985
#define TRUE
Definition: types.h:120
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static const BYTE hashBlob[]
Definition: message.c:644
static const BYTE detachedHashBlob[]
Definition: message.c:638
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static const BYTE hashVal[]
Definition: message.c:650
#define PKCS_7_ASN_ENCODING
Definition: wincrypt.h:2299
CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm
Definition: wincrypt.h:1493
#define CRYPT_E_OID_FORMAT
Definition: winerror.h:2987
unsigned char * LPBYTE
Definition: typedefs.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ok(value,...)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
int ret
#define todo_wine
Definition: test.h:154
unsigned char BYTE
Definition: mem.h:68
#define CRYPT_E_UNKNOWN_ALGO
Definition: winerror.h:2986
#define szOID_RSA_MD5
Definition: wincrypt.h:3053
BOOL WINAPI CryptHashMessage(PCRYPT_HASH_MESSAGE_PARA pHashPara, BOOL fDetachedHash, DWORD cToBeHashed, const BYTE *rgpbToBeHashed[], DWORD rgcbToBeHashed[], BYTE *pbHashedBlob, DWORD *pcbHashedBlob, BYTE *pbComputedHash, DWORD *pcbComputedHash)
Definition: message.c:255
#define memset(x, y, z)
Definition: compat.h:39
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by START_TEST().

◆ test_msg_get_signer_count()

static void test_msg_get_signer_count ( void  )
static

Definition at line 67 of file message.c.

68 {
69  LONG count;
70 
71  SetLastError(0xdeadbeef);
73  ok(count == -1, "Expected -1, got %d\n", count);
74  ok(GetLastError() == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n",
75  GetLastError());
76  SetLastError(0xdeadbeef);
78  ok(count == -1, "Expected -1, got %d\n", count);
80  GetLastError() == OSS_BAD_ARG, /* win9x */
81  "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError());
82  SetLastError(0xdeadbeef);
85  ok(count == -1, "Expected -1, got %d\n", count);
87  GetLastError() == OSS_PDU_MISMATCH, /* win9x */
88  "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError());
89  SetLastError(0xdeadbeef);
92  ok(count == -1, "Expected -1, got %d\n", count);
94  "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError());
95  SetLastError(0xdeadbeef);
98  ok(count == -1, "Expected -1, got %d\n", count);
100  GetLastError() == OSS_DATA_ERROR, /* win9x */
101  "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError());
104  ok(count == 1 ||
105  broken(count == -1), /* win9x */
106  "Expected 1, got %d\n", count);
107 }
#define CRYPT_E_ASN1_BADTAG
Definition: winerror.h:3095
LONG WINAPI CryptGetMessageSignerCount(DWORD dwMsgEncodingType, const BYTE *pbSignedBlob, DWORD cbSignedBlob)
Definition: message.c:41
GLuint GLuint GLsizei count
Definition: gl.h:1545
static const BYTE signedEmptyContent[]
Definition: message.c:58
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define PKCS_7_ASN_ENCODING
Definition: wincrypt.h:2299
#define OSS_BAD_ARG
Definition: winerror.h:3043
long LONG
Definition: pedump.c:60
#define ok(value,...)
static const BYTE signedEmptyBareContent[]
Definition: message.c:51
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define CRYPT_E_INVALID_MSG_TYPE
Definition: winerror.h:2988
#define CRYPT_E_ASN1_EOD
Definition: winerror.h:3086
#define SetLastError(x)
Definition: compat.h:409
static const BYTE dataEmptyContent[]
Definition: message.c:48
#define OSS_DATA_ERROR
Definition: winerror.h:3042
#define broken(x)
Definition: _sntprintf.h:21
static const BYTE dataEmptyBareContent[]
Definition: message.c:47
#define OSS_PDU_MISMATCH
Definition: winerror.h:3046

Referenced by START_TEST().

◆ test_sign_message()

static void test_sign_message ( void  )
static

Definition at line 994 of file message.c.

995 {
996  BOOL ret;
998  static char oid_rsa_md5[] = szOID_RSA_MD5;
999  static const BYTE blob1[] = { 0x01, 0x02, 0x03, 0x04 };
1000  static const BYTE blob2[] = { 0x11, 0x12, 0x13, 0x14 };
1001  const BYTE *toSign[] = { blob1, blob2 };
1002  DWORD signSize[] = { sizeof(blob1), sizeof(blob2) };
1003  LPBYTE signedBlob;
1004  DWORD signedBlobSize;
1005  PCCRL_CONTEXT crlContext;
1006  CERT_KEY_CONTEXT keyContext;
1007  HCRYPTPROV hCryptProv = 0;
1008  HCRYPTKEY hKey = 0;
1009 
1010  memset(&para, 0, sizeof(para));
1011  SetLastError(0xdeadbeef);
1012  ret = CryptSignMessage(&para, FALSE, 0, NULL, NULL, NULL, &signedBlobSize);
1013  ok(!ret &&
1014  (GetLastError() == E_INVALIDARG ||
1015  GetLastError() == ERROR_ARITHMETIC_OVERFLOW), /* Win7 */
1016  "expected E_INVALIDARG or ERROR_ARITHMETIC_OVERFLOW, got %08x\n",
1017  GetLastError());
1018  para.cbSize = sizeof(para);
1020  SetLastError(0xdeadbeef);
1021  signedBlobSize = 255;
1022  ret = CryptSignMessage(&para, FALSE, 0, NULL, NULL, NULL, &signedBlobSize);
1023  ok(!ret && GetLastError() == E_INVALIDARG,
1024  "expected E_INVALIDARG, got %08x\n", GetLastError());
1025  ok(!signedBlobSize, "unexpected size %d\n", signedBlobSize);
1027  SetLastError(0xdeadbeef);
1028  signedBlobSize = 0;
1029  ret = CryptSignMessage(&para, FALSE, 0, NULL, NULL, NULL, &signedBlobSize);
1030  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1031  todo_wine
1032  ok(signedBlobSize, "bad size\n");
1033 
1034  SetLastError(0xdeadbeef);
1035  ret = pCryptAcquireContextA(&hCryptProv, NULL, NULL, PROV_RSA_FULL,
1037  ok(ret, "CryptAcquireContextA failed: %08x\n", GetLastError());
1038  SetLastError(0xdeadbeef);
1039  ret = CryptImportKey(hCryptProv, publicPrivateKeyPair,
1040  sizeof(publicPrivateKeyPair), 0, 0, &hKey);
1041  if (!ret && GetLastError() == NTE_PERM) /* Win9x */
1042  {
1043  skip("Failed to import a key\n");
1044  if (hCryptProv)
1045  CryptReleaseContext(hCryptProv, 0);
1046  return;
1047  }
1048  ok(ret, "CryptImportKey failed: %08x\n", GetLastError());
1049 
1051  SetLastError(0xdeadbeef);
1053  PKCS_7_ASN_ENCODING, cert1, sizeof(cert1));
1054  ok(para.pSigningCert != NULL, "CertCreateCertificateContext failed: %08x\n",
1055  GetLastError());
1057 
1058  memset(&keyContext, 0, sizeof(keyContext));
1059  keyContext.cbSize = sizeof(keyContext);
1060  keyContext.hCryptProv = hCryptProv;
1061  keyContext.dwKeySpec = AT_SIGNATURE;
1062  SetLastError(0xdeadbeef);
1064  CERT_KEY_CONTEXT_PROP_ID, 0, &keyContext);
1065  ok(ret, "CertSetCertificateContextProperty failed: %08x\n", GetLastError());
1066 
1067  SetLastError(0xdeadbeef);
1068  signedBlobSize = 0;
1069  ret = CryptSignMessage(&para, TRUE, 0, NULL, NULL, NULL, &signedBlobSize);
1070  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1071  signedBlob = CryptMemAlloc(signedBlobSize);
1072  if (signedBlob)
1073  {
1074  SetLastError(0xdeadbeef);
1075  ret = CryptSignMessage(&para, TRUE, 0, NULL, NULL, signedBlob,
1076  &signedBlobSize);
1077  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1078  ok(signedBlobSize == sizeof(signedHashForEmptyMessage),
1079  "unexpected size %d\n", signedBlobSize);
1080  ok(!memcmp(signedBlob, signedHashForEmptyMessage, signedBlobSize),
1081  "unexpected value\n");
1082  CryptMemFree(signedBlob);
1083  }
1084 
1085  SetLastError(0xdeadbeef);
1086  signedBlobSize = 0;
1087  ret = CryptSignMessage(&para, FALSE, 0, NULL, NULL, NULL, &signedBlobSize);
1088  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1089  signedBlob = CryptMemAlloc(signedBlobSize);
1090  if (signedBlob)
1091  {
1092  SetLastError(0xdeadbeef);
1093  ret = CryptSignMessage(&para, FALSE, 0, NULL, NULL, signedBlob,
1094  &signedBlobSize);
1095  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1096  ok(signedBlobSize == sizeof(signedEmptyMessage), "unexpected size %d\n",
1097  signedBlobSize);
1098  ok(!memcmp(signedBlob, signedEmptyMessage, signedBlobSize),
1099  "unexpected value\n");
1100  CryptMemFree(signedBlob);
1101  }
1102 
1103  SetLastError(0xdeadbeef);
1104  signedBlobSize = 0;
1105  ret = CryptSignMessage(&para, TRUE, 2, toSign, signSize, NULL,
1106  &signedBlobSize);
1107  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1108  signedBlob = CryptMemAlloc(signedBlobSize);
1109  if (signedBlob)
1110  {
1111  SetLastError(0xdeadbeef);
1112  ret = CryptSignMessage(&para, TRUE, 2, toSign, signSize, signedBlob,
1113  &signedBlobSize);
1114  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1115  ok(signedBlobSize == sizeof(signedHash),
1116  "unexpected size of signed blob %d\n", signedBlobSize);
1117  ok(!memcmp(signedBlob, signedHash, signedBlobSize),
1118  "unexpected value\n");
1119  CryptMemFree(signedBlob);
1120  }
1121 
1122  para.cMsgCert = 1;
1123  para.rgpMsgCert = &para.pSigningCert;
1124 
1125  SetLastError(0xdeadbeef);
1126  signedBlobSize = 0;
1127  ret = CryptSignMessage(&para, TRUE, 2, toSign, signSize, NULL,
1128  &signedBlobSize);
1129  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1130  signedBlob = CryptMemAlloc(signedBlobSize);
1131  if (signedBlob)
1132  {
1133  SetLastError(0xdeadbeef);
1134  ret = CryptSignMessage(&para, TRUE, 2, toSign, signSize, signedBlob,
1135  &signedBlobSize);
1136  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1137  ok(signedBlobSize == sizeof(signedHashWithCert),
1138  "unexpected size of signed blob %d\n", signedBlobSize);
1139  ok(!memcmp(signedBlob, signedHashWithCert, signedBlobSize),
1140  "unexpected value\n");
1141  CryptMemFree(signedBlob);
1142  }
1143 
1144  para.cMsgCert = 0;
1145  para.rgpMsgCert = NULL;
1146  para.cMsgCrl = 1;
1147  SetLastError(0xdeadbeef);
1149  crl, sizeof(crl));
1150  ok(crlContext != NULL, "CertCreateCRLContext failed: %08x\n",
1151  GetLastError());
1152  para.rgpMsgCrl = &crlContext;
1153 
1154  SetLastError(0xdeadbeef);
1155  signedBlobSize = 0;
1156  ret = CryptSignMessage(&para, TRUE, 2, toSign, signSize, NULL,
1157  &signedBlobSize);
1158  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1159  signedBlob = CryptMemAlloc(signedBlobSize);
1160  if (signedBlob)
1161  {
1162  SetLastError(0xdeadbeef);
1163  ret = CryptSignMessage(&para, TRUE, 2, toSign, signSize, signedBlob,
1164  &signedBlobSize);
1165  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1166  ok(signedBlobSize == sizeof(signedHashWithCRL),
1167  "unexpected size of signed blob %d\n", signedBlobSize);
1168  ok(!memcmp(signedBlob, signedHashWithCRL, signedBlobSize),
1169  "unexpected value\n");
1170  CryptMemFree(signedBlob);
1171  }
1172 
1173  CertFreeCRLContext(crlContext);
1174  para.cMsgCrl = 0;
1175  para.rgpMsgCrl = NULL;
1176 
1177  SetLastError(0xdeadbeef);
1178  signedBlobSize = 0;
1179  ret = CryptSignMessage(&para, FALSE, 1, toSign, signSize, NULL,
1180  &signedBlobSize);
1181  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1182  signedBlob = CryptMemAlloc(signedBlobSize);
1183  if (signedBlob)
1184  {
1185  SetLastError(0xdeadbeef);
1186  ret = CryptSignMessage(&para, FALSE, 1, toSign, signSize, signedBlob,
1187  &signedBlobSize);
1188  ok(ret, "CryptSignMessage failed: %08x\n", GetLastError());
1189  ok(signedBlobSize == sizeof(signedData),
1190  "unexpected size of signed blob %d\n", signedBlobSize);
1191  ok(!memcmp(signedBlob, signedData, signedBlobSize),
1192  "unexpected value\n");
1193  CryptMemFree(signedBlob);
1194  }
1195 
1196  if (para.pSigningCert)
1198  if (hKey)
1199  CryptDestroyKey(hKey);
1200  if (hCryptProv)
1201  CryptReleaseContext(hCryptProv, 0);
1202 }
static char oid_rsa_md5[]
Definition: msg.c:34
#define TRUE
Definition: types.h:120
static const BYTE crl[]
Definition: message.c:864
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
PCCERT_CONTEXT pSigningCert
Definition: wincrypt.h:1428
BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
Definition: cert.c:371
CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm
Definition: wincrypt.h:1429
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
BOOL WINAPI CryptSignMessage(PCRYPT_SIGN_MESSAGE_PARA pSignPara, BOOL fDetachedSignature, DWORD cToBeSigned, const BYTE *rgpbToBeSigned[], DWORD rgcbToBeSigned[], BYTE *pbSignedBlob, DWORD *pcbSignedBlob)
Definition: message.c:406
#define PKCS_7_ASN_ENCODING
Definition: wincrypt.h:2299
static const BYTE cert1[]
Definition: message.c:828
#define NTE_PERM
Definition: winerror.h:2884
static const BYTE signedEmptyMessage[]
Definition: message.c:893
#define X509_ASN_ENCODING
Definition: wincrypt.h:2297
LPVOID WINAPI CryptMemAlloc(ULONG cbSize)
Definition: main.c:131
unsigned char * LPBYTE
Definition: typedefs.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ok(value,...)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
PCCERT_CONTEXT * rgpMsgCert
Definition: wincrypt.h:1432
BOOL WINAPI CryptDestroyKey(HCRYPTKEY hKey)
Definition: crypt.c:935
static const BYTE signedHash[]
Definition: message.c:907
#define ERROR_ARITHMETIC_OVERFLOW
Definition: winerror.h:351
static const BYTE signedHashWithCert[]
Definition: message.c:921
PCCRL_CONTEXT * rgpMsgCrl
Definition: wincrypt.h:1434
PCCRL_CONTEXT WINAPI CertCreateCRLContext(DWORD dwCertEncodingType, const BYTE *pbCrlEncoded, DWORD cbCrlEncoded)
Definition: crl.c:85
HCRYPTPROV hCryptProv
Definition: wincrypt.h:220
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
int ret
#define CERT_KEY_CONTEXT_PROP_ID
Definition: wincrypt.h:2690
#define todo_wine
Definition: test.h:154
static const BYTE publicPrivateKeyPair[]
Definition: message.c:806
PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded)
Definition: cert.c:316
static const BYTE signedHashWithCRL[]
Definition: message.c:950
unsigned char BYTE
Definition: mem.h:68
#define szOID_RSA_MD5
Definition: wincrypt.h:3053
#define CRYPT_VERIFYCONTEXT
Definition: wincrypt.h:2069
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:46
static const BYTE signedHashForEmptyMessage[]
Definition: message.c:879
ULONG_PTR HCRYPTKEY
Definition: wincrypt.h:49
#define skip(...)
VOID WINAPI CryptMemFree(LPVOID pv)
Definition: main.c:141
BOOL WINAPI CryptReleaseContext(HCRYPTPROV hProv, ULONG_PTR dwFlags)
Definition: crypt.c:651
#define AT_SIGNATURE
Definition: wincrypt.h:2036
#define memset(x, y, z)
Definition: compat.h:39
BOOL WINAPI CryptImportKey(HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLen, HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey)
Definition: crypt.c:1855
BOOL WINAPI CertSetCertificateContextProperty(PCCERT_CONTEXT pCertContext, DWORD dwPropId, DWORD dwFlags, const void *pvData)
Definition: cert.c:799
#define PROV_RSA_FULL
Definition: wincrypt.h:2039
BOOL WINAPI CertFreeCRLContext(PCCRL_CONTEXT pCrlContext)
Definition: crl.c:386
static const BYTE signedData[]
Definition: message.c:978

Referenced by START_TEST().

◆ test_verify_detached_message_hash()

static void test_verify_detached_message_hash ( void  )
static

Definition at line 117 of file message.c.

118 {
119  BOOL ret;
121  DWORD size, hashSize;
122  const BYTE *pMsgData = msgData;
123  BYTE hash[16];
124 
125  if (0)
126  {
128  NULL);
129  }
130  memset(&para, 0, sizeof(para));
131  SetLastError(0xdeadbeef);
133  NULL);
134  ok(!ret && GetLastError() == E_INVALIDARG,
135  "expected E_INVALIDARG, got %08x\n", GetLastError());
136  para.cbSize = sizeof(para);
137  SetLastError(0xdeadbeef);
139  NULL);
140  ok(!ret && GetLastError() == E_INVALIDARG,
141  "expected E_INVALIDARG, got %08x\n", GetLastError());
143  SetLastError(0xdeadbeef);
145  NULL);
146  ok(!ret &&
148  GetLastError() == OSS_BAD_ARG), /* win9x */
149  "expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError());
151  SetLastError(0xdeadbeef);
153  NULL);
154  ok(!ret && GetLastError() == E_INVALIDARG,
155  "expected E_INVALIDARG, got %08x\n", GetLastError());
157  SetLastError(0xdeadbeef);
159  NULL);
160  ok(!ret &&
162  GetLastError() == OSS_BAD_ARG), /* win9x */
163  "expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError());
164  /* Curiously, passing no data to hash succeeds.. */
166  sizeof(detachedHashContent), 0, NULL, NULL, NULL, NULL);
167  todo_wine
168  ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError());
169  /* as does passing the actual content of the message to hash.. */
170  size = sizeof(msgData);
171  pMsgData = msgData;
173  sizeof(detachedHashContent), 1, &pMsgData, &size, NULL, NULL);
174  ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError());
175  /* while passing data to hash that isn't the content of the message fails.
176  */
177  size = sizeof(detachedHashContent);
178  pMsgData = detachedHashContent;
179  SetLastError(0xdeadbeef);
181  sizeof(detachedHashContent), 1, &pMsgData, &size, NULL, NULL);
183  "expected CRYPT_E_HASH_VALUE, got %08x\n", GetLastError());
184  /* Getting the size of the hash while passing no hash data causes the
185  * hash to be checked (and fail.)
186  */
187  SetLastError(0xdeadbeef);
189  sizeof(detachedHashContent), 0, NULL, NULL, NULL, &hashSize);
191  "expected CRYPT_E_HASH_VALUE, got %08x\n", GetLastError());
192  size = sizeof(msgData);
193  pMsgData = msgData;
195  sizeof(detachedHashContent), 1, &pMsgData, &size, NULL, &hashSize);
196  ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError());
197  ok(hashSize == sizeof(hash), "unexpected size %d\n", hashSize);
198  hashSize = 1;
199  SetLastError(0xdeadbeef);
201  sizeof(detachedHashContent), 1, &pMsgData, &size, hash, &hashSize);
203  "expected ERROR_MORE_DATA, got %08x\n", GetLastError());
204  hashSize = sizeof(hash);
206  sizeof(detachedHashContent), 1, &pMsgData, &size, hash, &hashSize);
207  ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError());
208 }
static BYTE detachedHashContent[]
Definition: message.c:109
static const BYTE msgData[]
Definition: message.c:115
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define PKCS_7_ASN_ENCODING
Definition: wincrypt.h:2299
#define OSS_BAD_ARG
Definition: winerror.h:3043
BOOL WINAPI CryptVerifyDetachedMessageHash(PCRYPT_HASH_MESSAGE_PARA pHashPara, BYTE *pbDetachedHashBlob, DWORD cbDetachedHashBlob, DWORD cToBeHashed, const BYTE *rgpbToBeHashed[], DWORD rgcbToBeHashed[], BYTE *pbComputedHash, DWORD *pcbComputedHash)
Definition: message.c:309
#define X509_ASN_ENCODING
Definition: wincrypt.h:2297
int hash
Definition: main.c:58
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ok(value,...)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
#define CRYPT_E_ASN1_EOD
Definition: winerror.h:3086
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
int ret
#define todo_wine
Definition: test.h:154
unsigned char BYTE
Definition: mem.h:68
#define ERROR_MORE_DATA
Definition: dderror.h:13
Definition: _hash_fun.h:40
#define memset(x, y, z)
Definition: compat.h:39
#define CRYPT_E_HASH_VALUE
Definition: winerror.h:2991

Referenced by START_TEST().

◆ test_verify_detached_message_signature()

static void test_verify_detached_message_signature ( void  )
static

Definition at line 346 of file message.c.

347 {
349  BOOL ret;
350  const BYTE *pContent;
351  DWORD cbContent;
352 
353  memset(&para, 0, sizeof(para));
354  SetLastError(0xdeadbeef);
356  NULL, NULL);
357  ok(!ret && GetLastError() == E_INVALIDARG,
358  "Expected E_INVALIDARG, got %08x\n", GetLastError());
359  SetLastError(0xdeadbeef);
361  NULL, NULL);
362  ok(!ret && GetLastError() == E_INVALIDARG,
363  "Expected E_INVALIDARG, got %08x\n", GetLastError());
364  para.cbSize = sizeof(para);
365  SetLastError(0xdeadbeef);
367  NULL, NULL);
368  ok(!ret && GetLastError() == E_INVALIDARG,
369  "Expected E_INVALIDARG, got %08x\n", GetLastError());
371  SetLastError(0xdeadbeef);
373  NULL, NULL);
374  ok(!ret && GetLastError() == E_INVALIDARG,
375  "Expected E_INVALIDARG, got %08x\n", GetLastError());
377  SetLastError(0xdeadbeef);
379  NULL, NULL);
380  ok(!ret, "Expected 0, got %d\n", ret);
382  GetLastError() == OSS_BAD_ARG, /* win98 */
383  "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError());
384  /* None of these messages contains a cert in the message itself, so the
385  * default callback isn't able to verify their signature.
386  */
387  SetLastError(0xdeadbeef);
389  sizeof(signedWithCertContent), 0, NULL, NULL, NULL);
390  ok(!ret, "Expected 0, got %d\n", ret);
391  todo_wine
393  GetLastError() == OSS_DATA_ERROR, /* win98 */
394  "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError());
395  SetLastError(0xdeadbeef);
397  sizeof(signedContent), 0, NULL, NULL, NULL);
398  ok(!ret, "Expected 0, got %d\n", ret);
400  GetLastError() == OSS_DATA_ERROR, /* win98 */
401  "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError());
402  SetLastError(0xdeadbeef);
404  sizeof(detachedSignedContent), 0, NULL, NULL, NULL);
405  ok(!ret, "Expected 0, got %d\n", ret);
407  GetLastError() == OSS_DATA_ERROR, /* win98 */
408  "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError());
409  SetLastError(0xdeadbeef);
410  pContent = msgData;
411  cbContent = sizeof(msgData);
413  sizeof(detachedSignedContent), 1, &pContent, &cbContent, NULL);
414  ok(!ret, "Expected 0, got %d\n", ret);
416  GetLastError() == OSS_DATA_ERROR, /* win98 */
417  "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError());
418  /* Passing the correct callback results in success */
421  sizeof(detachedSignedContent), 1, &pContent, &cbContent, NULL);
422  ok(ret ||
423  broken(!ret), /* win98 */
424  "CryptVerifyDetachedMessageSignature failed: %08x\n",
425  GetLastError());
426  /* Not passing the correct data to be signed results in the signature not
427  * matching.
428  */
429  SetLastError(0xdeadbeef);
431  sizeof(detachedSignedContent), 0, NULL, NULL, NULL);
432  ok(!ret, "Expected 0, got %d\n", ret);
434  GetLastError() == OSS_DATA_ERROR, /* win98 */
435  "Expected NTE_BAD_SIGNATURE or OSS_DATA_ERROR, got %08x\n", GetLastError());
436 }
#define NTE_BAD_SIGNATURE
Definition: winerror.h:2874
#define CRYPT_E_NOT_FOUND
Definition: winerror.h:3007
static const BYTE msgData[]
Definition: message.c:115
static PCCERT_CONTEXT WINAPI msg_get_signer_callback(void *pvArg, DWORD certEncodingType, PCERT_INFO signerId, HCERTSTORE store)
Definition: message.c:339
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define PKCS_7_ASN_ENCODING
Definition: wincrypt.h:2299
static const BYTE signedWithCertContent[]
Definition: message.c:274
#define OSS_BAD_ARG
Definition: winerror.h:3043
static const BYTE detachedSignedContent[]
Definition: message.c:310
#define X509_ASN_ENCODING
Definition: wincrypt.h:2297
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ok(value,...)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define CRYPT_E_ASN1_EOD
Definition: winerror.h:3086
PFN_CRYPT_GET_SIGNER_CERTIFICATE pfnGetSignerCertificate
Definition: wincrypt.h:1463
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
int ret
#define todo_wine
Definition: test.h:154
#define OSS_DATA_ERROR
Definition: winerror.h:3042
unsigned char BYTE
Definition: mem.h:68
static const BYTE signedContent[]
Definition: message.c:296
#define broken(x)
Definition: _sntprintf.h:21
BOOL WINAPI CryptVerifyDetachedMessageSignature(PCRYPT_VERIFY_MESSAGE_PARA pVerifyPara, DWORD dwSignerIndex, const BYTE *pbDetachedSignBlob, DWORD cbDetachedSignBlob, DWORD cToBeSigned, const BYTE *rgpbToBeSigned[], DWORD rgcbToBeSigned[], PCCERT_CONTEXT *ppSignerCert)
Definition: message.c:108
#define memset(x, y, z)
Definition: compat.h:39

Referenced by START_TEST().

◆ test_verify_message_hash()

static void test_verify_message_hash ( void  )
static

Definition at line 217 of file message.c.

218 {
219  BOOL ret;
221  DWORD size;
222  BYTE *buf = NULL;
223 
224  memset(&para, 0, sizeof(para));
225  /* Crash */
226  if (0)
228  SetLastError(0xdeadbeef);
229  ret = CryptVerifyMessageHash(&para, NULL, 0, NULL, NULL, NULL, NULL);
230  ok(!ret && GetLastError() == E_INVALIDARG,
231  "expected E_INVALIDARG, got %08x\n", GetLastError());
232  para.cbSize = sizeof(para);
233  SetLastError(0xdeadbeef);
234  ret = CryptVerifyMessageHash(&para, NULL, 0, NULL, NULL, NULL, NULL);
235  ok(!ret && GetLastError() == E_INVALIDARG,
236  "expected E_INVALIDARG, got %08x\n", GetLastError());
238  SetLastError(0xdeadbeef);
239  ret = CryptVerifyMessageHash(&para, NULL, 0, NULL, NULL, NULL, NULL);
240  ok(!ret, "Expected 0, got %d\n", ret);
242  GetLastError() == OSS_BAD_ARG, /* win98 */
243  "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError());
244  /* Verifying the hash of a detached message succeeds? */
246  sizeof(detachedHashContent), NULL, NULL, NULL, NULL);
247  todo_wine
248  ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError());
249  /* As does verifying the hash of a regular message. */
251  NULL, NULL, NULL, NULL);
252  ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError());
254  NULL, &size, NULL, NULL);
255  ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError());
256  if (ret)
258  if (buf)
259  {
260  size = 1;
262  buf, &size, NULL, NULL);
264  "expected ERROR_MORE_DATA, got %08x\n", GetLastError());
266  buf, &size, NULL, NULL);
267  ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError());
268  ok(size == sizeof(msgData), "unexpected size %d\n", size);
269  ok(!memcmp(buf, msgData, size), "unexpected value\n");
270  CryptMemFree(buf);
271  }
272 }
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static BYTE detachedHashContent[]
Definition: message.c:109
static const BYTE msgData[]
Definition: message.c:115
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define PKCS_7_ASN_ENCODING
Definition: wincrypt.h:2299
#define OSS_BAD_ARG
Definition: winerror.h:3043
LPVOID WINAPI CryptMemAlloc(ULONG cbSize)
Definition: main.c:131
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ok(value,...)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
#define CRYPT_E_ASN1_EOD
Definition: winerror.h:3086
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
int ret
#define todo_wine
Definition: test.h:154
unsigned char BYTE
Definition: mem.h:68
#define ERROR_MORE_DATA
Definition: dderror.h:13
VOID WINAPI CryptMemFree(LPVOID pv)
Definition: main.c:141
#define memset(x, y, z)
Definition: compat.h:39
BOOL WINAPI CryptVerifyMessageHash(PCRYPT_HASH_MESSAGE_PARA pHashPara, BYTE *pbHashedBlob, DWORD cbHashedBlob, BYTE *pbToBeHashed, DWORD *pcbToBeHashed, BYTE *pbComputedHash, DWORD *pcbComputedHash)
Definition: message.c:364
static BYTE hashContent[]
Definition: message.c:210

Referenced by START_TEST().

◆ test_verify_message_signature()

static void test_verify_message_signature ( void  )
static

Definition at line 502 of file message.c.

503 {
504  BOOL ret;
505  CRYPT_VERIFY_MESSAGE_PARA para = { 0 };
507  DWORD cbDecoded;
508  BYTE decoded[sizeof(msgData)];
509 
510  SetLastError(0xdeadbeef);
512  ok(!ret && GetLastError() == E_INVALIDARG,
513  "Expected E_INVALIDARG, got %08x\n", GetLastError());
514  /* Is cbDecoded set when invalid parameters are passed? */
515  cbDecoded = 0xdeadbeef;
516  ret = CryptVerifyMessageSignature(NULL, 0, NULL, 0, NULL, &cbDecoded,
517  NULL);
518  ok(!ret && GetLastError() == E_INVALIDARG,
519  "Expected E_INVALIDARG, got %08x\n", GetLastError());
520  ok(cbDecoded == 0, "expected 0, got %08x\n", cbDecoded);
521  SetLastError(0xdeadbeef);
522  ret = CryptVerifyMessageSignature(&para, 0, NULL, 0, NULL, 0, NULL);
523  ok(!ret && GetLastError() == E_INVALIDARG,
524  "Expected E_INVALIDARG, got %08x\n", GetLastError());
525  para.cbSize = sizeof(para);
526  SetLastError(0xdeadbeef);
527  ret = CryptVerifyMessageSignature(&para, 0, NULL, 0, NULL, 0, NULL);
528  ok(!ret && GetLastError() == E_INVALIDARG,
529  "Expected E_INVALIDARG, got %08x\n", GetLastError());
530  para.cbSize = 0;
532  SetLastError(0xdeadbeef);
533  ret = CryptVerifyMessageSignature(&para, 0, NULL, 0, NULL, 0, NULL);
534  ok(!ret && GetLastError() == E_INVALIDARG,
535  "Expected E_INVALIDARG, got %08x\n", GetLastError());
536  para.cbSize = sizeof(para);
537  SetLastError(0xdeadbeef);
538  ret = CryptVerifyMessageSignature(&para, 0, NULL, 0, NULL, 0, NULL);
539  ok(!ret &&
541  GetLastError() == OSS_BAD_ARG), /* win9x */
542  "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError());
543  /* Check whether cert is set on error */
544  cert = (PCCERT_CONTEXT)0xdeadbeef;
545  ret = CryptVerifyMessageSignature(&para, 0, NULL, 0, NULL, 0, &cert);
546  ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD ||
547  GetLastError() == OSS_BAD_ARG /* NT40 */),
548  "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError());
549  ok(cert == NULL, "Expected NULL cert\n");
550  /* Check whether cbDecoded is set on error */
551  cbDecoded = 0xdeadbeef;
552  ret = CryptVerifyMessageSignature(&para, 0, NULL, 0, NULL, &cbDecoded,
553  NULL);
554  ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD ||
555  GetLastError() == OSS_BAD_ARG /* NT40 */),
556  "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError());
557  ok(!cbDecoded, "Expected 0\n");
558  SetLastError(0xdeadbeef);
560  sizeof(dataEmptyBareContent), NULL, 0, NULL);
562  GetLastError() == OSS_PDU_MISMATCH /* NT40 */),
563  "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError());
565  GetLastError() == OSS_PDU_MISMATCH, /* win9x */
566  "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError());
567  SetLastError(0xdeadbeef);
569  sizeof(dataEmptyContent), NULL, 0, NULL);
571  "Expected CRYPT_E_UNEXPECTED_MSG_TYPE, got %08x\n", GetLastError());
572  SetLastError(0xdeadbeef);
574  sizeof(signedEmptyBareContent), NULL, 0, NULL);
575  ok(!ret &&
577  GetLastError() == OSS_DATA_ERROR), /* win9x */
578  "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError());
579  SetLastError(0xdeadbeef);
581  sizeof(signedEmptyContent), NULL, 0, NULL);
582  ok(!ret &&
584  GetLastError() == OSS_DATA_ERROR), /* win9x */
585  "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
586  SetLastError(0xdeadbeef);
588  sizeof(signedContent), NULL, 0, NULL);
589  ok(!ret &&
591  GetLastError() == OSS_DATA_ERROR), /* win9x */
592  "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
593  /* FIXME: Windows fails with CRYPT_E_NOT_FOUND for these messages, but
594  * their signer certs have invalid public keys that fail to decode. In
595  * Wine therefore the failure is an ASN error. Need some messages with
596  * valid public keys and invalid signatures to check against.
597  */
599  sizeof(signedWithCertEmptyContent), NULL, 0, NULL);
600  ok(!ret, "Expected failure\n");
602  sizeof(signedWithCertContent), NULL, 0, NULL);
603  ok(!ret, "Expected failure\n");
606  ok(!ret, "Expected failure\n");
607  /* Apparently, an output pcbDecoded parameter is expected. */
608  ret = CryptVerifyMessageSignature(&para, 0,
611  todo_wine
612  ok(!ret, "Expected failure\n");
613  /* Finally, a message signed with a valid public key verifies successfully
614  */
615  cbDecoded = 0xdeadbeef;
616  ret = CryptVerifyMessageSignature(&para, 0,
618  sizeof(signedWithCertWithValidPubKeyContent), NULL, &cbDecoded, NULL);
619  ok(ret, "CryptVerifyMessageSignature failed: %08x\n", GetLastError());
620  ok(cbDecoded == sizeof(msgData), "expected 4, got %d\n", cbDecoded);
621  cbDecoded = 0;
622  ret = CryptVerifyMessageSignature(&para, 0,
624  sizeof(signedWithCertWithValidPubKeyContent), NULL, &cbDecoded, NULL);
625  /* Setting cbDecoded to 0 succeeds when a NULL buffer is provided */
626  ok(ret, "CryptVerifyMessageSignature failed: %08x\n", GetLastError());
627  ok(cbDecoded == sizeof(msgData), "expected 4, got %d\n", cbDecoded);
628  cbDecoded = 0;
629  ret = CryptVerifyMessageSignature(&para, 0,
631  sizeof(signedWithCertWithValidPubKeyContent), decoded, &cbDecoded, NULL);
632  /* When a non-NULL buffer is provided, cbDecoded must not be too small */
634  "expected ERROR_MORE_DATA, got %d (%08x)\n", GetLastError(),
635  GetLastError());
636 }
#define CRYPT_E_ASN1_BADTAG
Definition: winerror.h:3095
#define CRYPT_E_NOT_FOUND
Definition: winerror.h:3007
static const BYTE msgData[]
Definition: message.c:115
static const BYTE signedEmptyContent[]
Definition: message.c:58
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define PKCS_7_ASN_ENCODING
Definition: wincrypt.h:2299
static const BYTE signedWithCertContent[]
Definition: message.c:274
#define OSS_BAD_ARG
Definition: winerror.h:3043
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ok(value,...)
static const BYTE signedEmptyBareContent[]
Definition: message.c:51
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
static BYTE cert[]
Definition: msg.c:1437
#define CRYPT_E_UNEXPECTED_MSG_TYPE
Definition: winerror.h:3013
#define CRYPT_E_ASN1_EOD
Definition: winerror.h:3086
static const BYTE signedWithCertWithValidPubKeyContent[]
Definition: message.c:473
const CERT_CONTEXT * PCCERT_CONTEXT
Definition: wincrypt.h:485
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
static const BYTE dataEmptyContent[]
Definition: message.c:48
int ret
#define todo_wine
Definition: test.h:154
#define OSS_DATA_ERROR
Definition: winerror.h:3042
unsigned char BYTE
Definition: mem.h:68
static const BYTE signedContent[]
Definition: message.c:296
#define ERROR_MORE_DATA
Definition: dderror.h:13
static const BYTE signedWithCertEmptyContent[]
Definition: message.c:438
static const BYTE dataEmptyBareContent[]
Definition: message.c:47
#define OSS_PDU_MISMATCH
Definition: winerror.h:3046
BOOL WINAPI CryptVerifyMessageSignature(PCRYPT_VERIFY_MESSAGE_PARA pVerifyPara, DWORD dwSignerIndex, const BYTE *pbSignedBlob, DWORD cbSignedBlob, BYTE *pbDecoded, DWORD *pcbDecoded, PCCERT_CONTEXT *ppSignerCert)
Definition: message.c:184
static const BYTE signedWithCertWithPubKeyContent[]
Definition: message.c:455

Referenced by START_TEST().

Variable Documentation

◆ cert1

const BYTE cert1[]
static
Initial value:
= {
0x30,0x81,0xd0,0x30,0x81,0xbe,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x20,0x42,
0x68,0x69,0xe9,0xea,0x61,0x83,0x11,0xdf,0xc0,0x24,0x2f,0x3b,0xad,0x40,0x30,
0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x0c,0x31,0x0a,0x30,
0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x4e,0x30,0x20,0x17,0x0d,0x31,0x30,
0x30,0x39,0x31,0x34,0x31,0x33,0x31,0x39,0x30,0x39,0x5a,0x18,0x0f,0x33,0x30,
0x31,0x30,0x30,0x39,0x31,0x34,0x31,0x33,0x31,0x39,0x30,0x39,0x5a,0x30,0x0c,
0x31,0x0a,0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x4e,0x30,0x5c,0x30,
0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,
0x4b,0x00,0x30,0x48,0x02,0x41,0x00,0xe8,0xa9,0xc0,0x99,0x82,0x64,0x87,0x1b,
0xf3,0x39,0xf0,0x8d,0xa3,0xdd,0x92,0x87,0xca,0x95,0x4f,0xe6,0xfc,0xe0,0x2d,
0x29,0x28,0x98,0x95,0x4c,0x3c,0x78,0xcd,0x3e,0x8a,0xaa,0x4a,0xd7,0x7b,0x07,
0xc1,0xf7,0x9c,0x71,0x0c,0xb9,0xe3,0x17,0x96,0xc5,0x39,0xdd,0x1d,0x06,0x6a,
0x1e,0x94,0x09,0x9e,0x50,0x09,0x5b,0xd9,0x60,0xd9,0x9b,0x02,0x03,0x01,0x00,
0x01,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x02,0x00,
0xc1 }

Definition at line 828 of file message.c.

Referenced by cert_mgr_sort_by_date(), test_encrypt_message(), test_sign_message(), testGetIssuerCert(), testIsValidCRLForCert(), testRegStoreSavedCerts(), and testStoresInCollection().

◆ cert2

const BYTE cert2[]
static
Initial value:
= {
0x30,0x82,0x01,0x15,0x30,0x82,0x01,0x02,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
0x1c,0xf2,0x1f,0xec,0x6b,0xdc,0x36,0xbf,0x4a,0xd7,0xe1,0x6c,0x84,0x85,0xcd,
0x2e,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x0c,0x31,
0x0a,0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x58,0x30,0x20,0x17,0x0d,
0x31,0x30,0x30,0x37,0x31,0x32,0x31,0x31,0x33,0x37,0x35,0x36,0x5a,0x18,0x0f,
0x33,0x30,0x31,0x30,0x30,0x37,0x31,0x32,0x31,0x31,0x33,0x37,0x35,0x36,0x5a,
0x30,0x0c,0x31,0x0a,0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x58,0x30,
0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,
0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xab,0xed,
0x6e,0xe0,0x00,0x3c,0xcf,0x2d,0x2b,0xda,0x05,0x88,0x6a,0x7e,0xed,0x60,0x30,
0x24,0xef,0x6c,0x6b,0xad,0x28,0x9b,0x14,0x90,0xf6,0xd0,0x96,0x79,0x6d,0xad,
0xac,0x46,0x14,0x7b,0x0e,0xfe,0xa9,0x8a,0x05,0x5a,0xc8,0x84,0x38,0x44,0xf9,
0xce,0xb2,0xe6,0xde,0x5b,0x80,0x0b,0x15,0xff,0x1b,0x60,0x3f,0xba,0xb2,0xfe,
0x6e,0xf5,0xdc,0x54,0x33,0xfc,0xfc,0x79,0x0a,0x10,0xa4,0x23,0x6d,0x67,0xeb,
0x16,0xb2,0x92,0xbf,0x63,0x42,0x17,0x0a,0xde,0xe6,0xab,0x8e,0xf7,0x8e,0x41,
0x8c,0x04,0xe8,0xe2,0x38,0x73,0xd3,0x82,0xd7,0xd1,0xee,0xd3,0xa6,0x54,0x8c,
0xcd,0x0b,0x93,0xda,0x63,0x55,0x0d,0x1f,0x68,0x5c,0x30,0xee,0xad,0x2d,0xd5,
0x40,0x56,0xe0,0xd8,0xc7,0xef,0x02,0x03,0x01,0x00,0x01,0x30,0x09,0x06,0x05,
0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x02,0x00,0x06 }

Definition at line 844 of file message.c.

Referenced by cert_mgr_sort_by_date(), test_encrypt_message(), testCertRegisterSystemStore(), testEmptyStore(), testGetIssuerCert(), testIsValidCRLForCert(), testRegStoreSavedCerts(), and testStoresInCollection().

◆ crl

const BYTE crl[]
static
Initial value:
= {
0x30,0x81,0xc2,0x30,0x7e,0x02,0x01,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x3c,0x31,0x0b,0x30,0x09,0x06,
0x03,0x55,0x04,0x06,0x13,0x02,0x52,0x55,0x31,0x0c,0x30,0x0a,0x06,0x03,0x55,
0x04,0x08,0x13,0x03,0x53,0x50,0x62,0x31,0x0c,0x30,0x0a,0x06,0x03,0x55,0x04,
0x07,0x13,0x03,0x53,0x50,0x62,0x31,0x11,0x30,0x0f,0x06,0x03,0x55,0x04,0x0a,
0x13,0x08,0x45,0x74,0x65,0x72,0x73,0x6f,0x66,0x74,0x17,0x0d,0x31,0x30,0x30,
0x36,0x32,0x38,0x31,0x32,0x35,0x31,0x32,0x37,0x5a,0x17,0x0d,0x31,0x30,0x30,
0x37,0x32,0x38,0x31,0x32,0x35,0x31,0x32,0x37,0x5a,0xa0,0x0e,0x30,0x0c,0x30,
0x0a,0x06,0x03,0x55,0x1d,0x14,0x04,0x03,0x02,0x01,0x00,0x30,0x0d,0x06,0x09,
0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x31,0x00,0x83,
0x35,0x9c,0xf5,0x35,0x5c,0xc1,0x20,0x81,0x80,0x5c,0x35,0x56,0xaf,0xb3,0x27,
0x15,0xc6,0xdd,0x24,0xe1,0xff,0xb9,0xf9,0x19,0x21,0xed,0x5e,0x1b,0xff,0x72,
0xc3,0x33,0xf6,0x9f,0xcb,0xde,0x84,0x0b,0x12,0x84,0xad,0x48,0x90,0x9d,0xdd,
0x89,0xbb }

Definition at line 864 of file message.c.

Referenced by CertAddEncodedCRLToStore(), CertCreateCRLContext(), CertVerifySubjectCertificateContext(), check_store_context_type(), Collection_addCRL(), Collection_deleteCRL(), compare_crl_existing(), countCRLsInStore(), CRL_clone(), CRL_free(), CRLContext_GetHashProp(), CRLContext_GetProperty(), CRLContext_SetProperty(), CRYPT_FileWriteCRL(), CRYPT_FindCertificateInCRL(), CRYPT_RegWriteCRL(), CRYPT_SavePKCSToMem(), export_append_extension(), import_crl(), import_store(), MemStore_addCRL(), ProvStore_addCRL(), ProvStore_deleteCRL(), test_crypt_ui_wiz_import(), test_retrieveObjectByUrl(), test_sign_message(), testCloseStore(), testEmptyStore(), testFileNameStore(), testFindCertInCRL(), testIsValidCRLForCert(), testMessageStore(), testSerializedStore(), testVerifyCRLRevocation(), verify_cert_revocation(), verify_cert_revocation_from_dist_points_ext(), verify_cert_revocation_with_crl_offline(), and verify_cert_revocation_with_crl_online().

◆ dataEmptyBareContent

const BYTE dataEmptyBareContent[] = { 0x04,0x00 }
static

Definition at line 47 of file message.c.

Referenced by test_msg_get_signer_count(), and test_verify_message_signature().

◆ dataEmptyContent

const BYTE dataEmptyContent[]
static
Initial value:
= {
0x30,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x02,
0x04,0x00 }

Definition at line 48 of file message.c.

Referenced by test_msg_get_signer_count(), and test_verify_message_signature().

◆ detachedHashBlob

const BYTE detachedHashBlob[]
static
Initial value:
= {
0x30,0x3f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x32,
0x30,0x30,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
0x07,0x01,0x04,0x10,0x2d,0x1b,0xbc,0x1f,0xc7,0xab,0x36,0x8d,0xdb,0x95,0xe6,
0x24,0xb9,0x66,0x7c,0x21 }

Definition at line 638 of file message.c.

Referenced by test_hash_message().

◆ detachedHashContent

BYTE detachedHashContent[]
static
Initial value:
= {
0x30,0x3f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x32,
0x30,0x30,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
0x07,0x01,0x04,0x10,0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,
0x9d,0x2a,0x8f,0x26,0x2f }

Definition at line 109 of file message.c.

Referenced by test_verify_detached_message_hash(), and test_verify_message_hash().

◆ detachedSignedContent

const BYTE detachedSignedContent[]
static
Initial value:
= {
0x30,0x81,0xaa,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0x9c,0x30,0x81,0x99,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,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,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,
0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,
0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,
0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,
0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }

Definition at line 310 of file message.c.

Referenced by test_verify_detached_message_signature().

◆ DWORD

Definition at line 31 of file message.c.

◆ encryptedMessage

const BYTE encryptedMessage[]
static
Initial value:
= {
0x30,0x31,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x03,0xa0,0x24,
0x30,0x22,0x02,0x01,0x00,0x31,0x00,0x30,0x1b,0x06,0x09,0x2a,0x86,0x48,0x86,
0xf7,0x0d,0x01,0x07,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x03,0x04,0x05,0x00,0x80,0x00 }

Definition at line 1204 of file message.c.

Referenced by test_encrypt_message().

◆ hashBlob

const BYTE hashBlob[]
static
Initial value:
= {
0x30,0x47,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x3a,
0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
0x07,0x01,0xa0,0x06,0x04,0x04,0xde,0xad,0xbe,0xef,0x04,0x10,0x2f,0x24,0x92,
0x30,0xa8,0xe7,0xc2,0xbf,0x60,0x05,0xcc,0xd2,0x67,0x92,0x59,0xec }

Definition at line 644 of file message.c.

Referenced by CDecodeHashMsg_VerifyHash(), and test_hash_message().

◆ hashContent

BYTE hashContent[]
static
Initial value:
= {
0x30,0x47,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x3a,
0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x08,0xd6,0xc0,
0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f }

Definition at line 210 of file message.c.

Referenced by test_verify_message_hash().

◆ hashVal

const BYTE hashVal[]
static
Initial value:
= {
0x2d,0x1b,0xbc,0x1f,0xc7,0xab,0x36,0x8d,0xdb,0x95,0xe6,0x24,0xb9,0x66,0x7c,
0x21 }

Definition at line 650 of file message.c.

Referenced by test_hash_message(), and testAddSerialized().

◆ LPCSTR

Definition at line 31 of file message.c.

◆ msgData

◆ publicPrivateKeyPair

const BYTE publicPrivateKeyPair[]
static
Initial value:
= {
0x07,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x52,0x53,0x41,0x32,0x00,0x02,0x00,
0x00,0x01,0x00,0x01,0x00,0x9b,0xd9,0x60,0xd9,0x5b,0x09,0x50,0x9e,0x09,0x94,
0x1e,0x6a,0x06,0x1d,0xdd,0x39,0xc5,0x96,0x17,0xe3,0xb9,0x0c,0x71,0x9c,0xf7,
0xc1,0x07,0x7b,0xd7,0x4a,0xaa,0x8a,0x3e,0xcd,0x78,0x3c,0x4c,0x95,0x98,0x28,
0x29,0x2d,0xe0,0xfc,0xe6,0x4f,0x95,0xca,0x87,0x92,0xdd,0xa3,0x8d,0xf0,0x39,
0xf3,0x1b,0x87,0x64,0x82,0x99,0xc0,0xa9,0xe8,0x87,0x86,0x2e,0x72,0x07,0x07,
0x8f,0x45,0x54,0x51,0x2f,0x51,0xd0,0x60,0x97,0x48,0x54,0x0e,0x78,0xb5,0x7e,
0x2b,0x9d,0xca,0x81,0xa8,0xa8,0x00,0x57,0x69,0xa6,0xf7,0x4d,0x45,0xe0,0xf7,
0xfa,0xd2,0xeb,0xaa,0xb8,0x06,0x34,0xce,0xf0,0x9d,0x2b,0x76,0x8a,0x4f,0x70,
0x51,0x90,0x33,0x72,0xcb,0x81,0x85,0x7e,0x35,0x2e,0xfb,0x81,0xf0,0xc7,0x85,
0xa5,0x75,0xf9,0x2d,0x00,0x71,0x66,0x36,0xfe,0x22,0xd6,0xc9,0x36,0x61,0x9b,
0x64,0x92,0xe8,0x25,0x38,0x35,0xeb,0x0c,0x84,0x83,0x76,0x42,0x90,0xf7,0x73,
0x91,0xdc,0x43,0x83,0x07,0x77,0xc9,0x1b,0x3f,0x74,0xc0,0xbe,0x18,0x97,0xd6,
0x86,0xe5,0xfa,0x28,0x7c,0xf7,0x8d,0x89,0xb1,0x93,0xac,0x48,0x3c,0xa1,0x02,
0xfa,0xc6,0x1c,0xa0,0xb5,0xe8,0x4f,0xd7,0xd1,0x33,0x63,0x8b,0x7e,0xf1,0x94,
0x56,0x07,0xbc,0x6e,0x0c,0xbd,0xa0,0x15,0xba,0x99,0x5d,0xb7,0x5e,0x09,0xf2,
0x1b,0x46,0x85,0x61,0x91,0x6a,0x78,0x31,0xb5,0xf0,0xba,0x20,0xf5,0x7a,0xb4,
0x8e,0xd3,0x50,0x87,0xf8,0xf3,0xe4,0xd9,0xab,0x6f,0x0e,0x59,0x42,0xac,0x7d,
0xb1,0x8c,0xea,0x33,0x54,0x08,0x38,0xc9,0xcd,0xac,0x10,0x19,0x4a,0xba,0x89,
0xdc,0xb6,0x73,0xef,0xec,0x56,0x93,0xd6,0xf2,0x4b,0xba,0x50,0x2d,0x8f,0x15,
0xed,0x8b,0xb5,0x67,0xc8,0xfc,0x51,0x5f }

Definition at line 806 of file message.c.

Referenced by test_sign_message().

◆ signedContent

const BYTE signedContent[]
static
Initial value:
= {
0x30,0x81,0xb2,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0xa4,0x30,0x81,0xa1,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,
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,0x81,0xa6,0x70,
0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,
0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,
0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,
0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,
0x0d }

Definition at line 296 of file message.c.

Referenced by test_verify_detached_message_signature(), and test_verify_message_signature().

◆ signedData

const BYTE signedData[]
static
Initial value:
= {
0x30,0x81,0xc3,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,
0x31,0x81,0x87,0x30,0x81,0x84,0x02,0x01,0x01,0x30,0x20,0x30,0x0c,0x31,0x0a,
0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x4e,0x02,0x10,0x20,0x42,0x68,
0x69,0xe9,0xea,0x61,0x83,0x11,0xdf,0xc0,0x24,0x2f,0x3b,0xad,0x40,0x30,0x0c,
0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0d,0x06,
0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x04,0x40,0xe4,
0x69,0xf5,0x62,0xfb,0x3a,0x7d,0x1c,0x7b,0x8b,0xcc,0xfc,0x6e,0x8e,0x91,0x85,
0xcf,0x3c,0xb8,0xfd,0x8a,0xac,0x81,0x96,0xa0,0x42,0xac,0x88,0xc4,0x48,0xe8,
0x43,0x64,0xd1,0x38,0xd2,0x6c,0xc4,0xd4,0x9b,0x9a,0xd4,0x33,0x02,0xef,0x88,
0xef,0x98,0x2d,0xac,0xad,0xc1,0x93,0x60,0xc4,0x3a,0xdc,0xa7,0xd6,0x97,0x70,
0x01,0xc1,0x84 }

Definition at line 978 of file message.c.

Referenced by test_sign_message().

◆ signedEmptyBareContent

const BYTE signedEmptyBareContent[]
static
Initial value:
= {
0x30,0x50,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,
0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0x31,0x37,0x30,0x35,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,0x00 }

Definition at line 51 of file message.c.

Referenced by test_msg_get_signer_count(), and test_verify_message_signature().

◆ signedEmptyContent

const BYTE signedEmptyContent[]
static
Initial value:
= {
0x30,0x5f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,0x52,
0x30,0x50,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,
0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0x31,0x37,0x30,0x35,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,0x00 }

Definition at line 58 of file message.c.

Referenced by test_msg_get_signer_count(), and test_verify_message_signature().

◆ signedEmptyMessage

const BYTE signedEmptyMessage[]
static
Initial value:
= {
0x30,0x81,0xbb,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0xad,0x30,0x81,0xaa,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0x31,0x81,0x87,0x30,0x81,0x84,0x02,0x01,
0x01,0x30,0x20,0x30,0x0c,0x31,0x0a,0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,
0x01,0x4e,0x02,0x10,0x20,0x42,0x68,0x69,0xe9,0xea,0x61,0x83,0x11,0xdf,0xc0,
0x24,0x2f,0x3b,0xad,0x40,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x02,0x05,0x05,0x00,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
0x01,0x01,0x05,0x00,0x04,0x40,0xe1,0xee,0xca,0x98,0x16,0x23,0x5a,0x34,0xfd,
0x91,0x69,0x97,0x1e,0x16,0xe4,0x57,0x45,0xad,0xc9,0x5d,0x2e,0xda,0x92,0xbf,
0xee,0x2f,0xb1,0xaa,0x32,0xfa,0x07,0x4e,0x63,0xfd,0xe1,0x52,0x17,0xd0,0xa4,
0x49,0x30,0x54,0x4d,0x12,0xa0,0x6a,0x1c,0x64,0xea,0xc7,0x50,0x49,0xa5,0xca,
0xc3,0x71,0xa4,0xf7,0x8c,0x25,0xe4,0x1a,0xca,0x89 }

Definition at line 893 of file message.c.

Referenced by test_sign_message().

◆ signedHash

const BYTE signedHash[]
static
Initial value:
= {
0x30,0x81,0xbb,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0xad,0x30,0x81,0xaa,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0x31,0x81,0x87,0x30,0x81,0x84,0x02,0x01,
0x01,0x30,0x20,0x30,0x0c,0x31,0x0a,0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,
0x01,0x4e,0x02,0x10,0x20,0x42,0x68,0x69,0xe9,0xea,0x61,0x83,0x11,0xdf,0xc0,
0x24,0x2f,0x3b,0xad,0x40,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x02,0x05,0x05,0x00,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
0x01,0x01,0x05,0x00,0x04,0x40,0x1e,0x04,0xa4,0xe3,0x90,0x54,0xed,0xcb,0x94,
0xa2,0xbe,0x81,0x73,0x7e,0x05,0xf2,0x82,0xd3,0x3a,0x26,0x96,0x7a,0x53,0xcd,
0x05,0xc3,0x09,0x69,0x3d,0x12,0x6c,0xb1,0xb0,0xab,0x0e,0xa1,0xec,0x1b,0xa1,
0xff,0x01,0x9c,0x49,0x9f,0x4b,0x69,0x59,0x74,0x20,0x9f,0xb0,0x19,0x95,0xe7,
0xed,0x1e,0x84,0xeb,0xe2,0x53,0x2c,0xa6,0x43,0xdf }

Definition at line 907 of file message.c.

Referenced by test_sign_message().

◆ signedHashForEmptyMessage

const BYTE signedHashForEmptyMessage[]
static
Initial value:
= {
0x30,0x81,0xbb,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0xad,0x30,0x81,0xaa,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0x31,0x81,0x87,0x30,0x81,0x84,0x02,0x01,
0x01,0x30,0x20,0x30,0x0c,0x31,0x0a,0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,
0x01,0x4e,0x02,0x10,0x20,0x42,0x68,0x69,0xe9,0xea,0x61,0x83,0x11,0xdf,0xc0,
0x24,0x2f,0x3b,0xad,0x40,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x02,0x05,0x05,0x00,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
0x01,0x01,0x05,0x00,0x04,0x40,0xe1,0xee,0xca,0x98,0x16,0x23,0x5a,0x34,0xfd,
0x91,0x69,0x97,0x1e,0x16,0xe4,0x57,0x45,0xad,0xc9,0x5d,0x2e,0xda,0x92,0xbf,
0xee,0x2f,0xb1,0xaa,0x32,0xfa,0x07,0x4e,0x63,0xfd,0xe1,0x52,0x17,0xd0,0xa4,
0x49,0x30,0x54,0x4d,0x12,0xa0,0x6a,0x1c,0x64,0xea,0xc7,0x50,0x49,0xa5,0xca,
0xc3,0x71,0xa4,0xf7,0x8c,0x25,0xe4,0x1a,0xca,0x89 }

Definition at line 879 of file message.c.

Referenced by test_sign_message().

◆ signedHashWithCert

const BYTE signedHashWithCert[]
static
Initial value:
= {
0x30,0x82,0x01,0x93,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
0xa0,0x82,0x01,0x84,0x30,0x82,0x01,0x80,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,
0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0b,0x06,
0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x81,0xd3,0x30,0x81,
0xd0,0x30,0x81,0xbe,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x20,0x42,0x68,0x69,
0xe9,0xea,0x61,0x83,0x11,0xdf,0xc0,0x24,0x2f,0x3b,0xad,0x40,0x30,0x09,0x06,
0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x0c,0x31,0x0a,0x30,0x08,0x06,
0x03,0x55,0x04,0x03,0x13,0x01,0x4e,0x30,0x20,0x17,0x0d,0x31,0x30,0x30,0x39,
0x31,0x34,0x31,0x33,0x31,0x39,0x30,0x39,0x5a,0x18,0x0f,0x33,0x30,0x31,0x30,
0x30,0x39,0x31,0x34,0x31,0x33,0x31,0x39,0x30,0x39,0x5a,0x30,0x0c,0x31,0x0a,
0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x4e,0x30,0x5c,0x30,0x0d,0x06,
0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x4b,0x00,
0x30,0x48,0x02,0x41,0x00,0xe8,0xa9,0xc0,0x99,0x82,0x64,0x87,0x1b,0xf3,0x39,
0xf0,0x8d,0xa3,0xdd,0x92,0x87,0xca,0x95,0x4f,0xe6,0xfc,0xe0,0x2d,0x29,0x28,
0x98,0x95,0x4c,0x3c,0x78,0xcd,0x3e,0x8a,0xaa,0x4a,0xd7,0x7b,0x07,0xc1,0xf7,
0x9c,0x71,0x0c,0xb9,0xe3,0x17,0x96,0xc5,0x39,0xdd,0x1d,0x06,0x6a,0x1e,0x94,
0x09,0x9e,0x50,0x09,0x5b,0xd9,0x60,0xd9,0x9b,0x02,0x03,0x01,0x00,0x01,0x30,
0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x02,0x00,0xc1,0x31,
0x81,0x87,0x30,0x81,0x84,0x02,0x01,0x01,0x30,0x20,0x30,0x0c,0x31,0x0a,0x30,
0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x4e,0x02,0x10,0x20,0x42,0x68,0x69,
0xe9,0xea,0x61,0x83,0x11,0xdf,0xc0,0x24,0x2f,0x3b,0xad,0x40,0x30,0x0c,0x06,
0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0d,0x06,0x09,
0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x04,0x40,0x1e,0x04,
0xa4,0xe3,0x90,0x54,0xed,0xcb,0x94,0xa2,0xbe,0x81,0x73,0x7e,0x05,0xf2,0x82,
0xd3,0x3a,0x26,0x96,0x7a,0x53,0xcd,0x05,0xc3,0x09,0x69,0x3d,0x12,0x6c,0xb1,
0xb0,0xab,0x0e,0xa1,0xec,0x1b,0xa1,0xff,0x01,0x9c,0x49,0x9f,0x4b,0x69,0x59,
0x74,0x20,0x9f,0xb0,0x19,0x95,0xe7,0xed,0x1e,0x84,0xeb,0xe2,0x53,0x2c,0xa6,
0x43,0xdf }

Definition at line 921 of file message.c.

Referenced by test_sign_message().

◆ signedHashWithCRL

const BYTE signedHashWithCRL[]
static
Initial value:
= {
0x30,0x82,0x01,0x85,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
0xa0,0x82,0x01,0x76,0x30,0x82,0x01,0x72,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,
0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0b,0x06,
0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa1,0x81,0xc5,0x30,0x81,
0xc2,0x30,0x7e,0x02,0x01,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,
0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x3c,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,
0x04,0x06,0x13,0x02,0x52,0x55,0x31,0x0c,0x30,0x0a,0x06,0x03,0x55,0x04,0x08,
0x13,0x03,0x53,0x50,0x62,0x31,0x0c,0x30,0x0a,0x06,0x03,0x55,0x04,0x07,0x13,
0x03,0x53,0x50,0x62,0x31,0x11,0x30,0x0f,0x06,0x03,0x55,0x04,0x0a,0x13,0x08,
0x45,0x74,0x65,0x72,0x73,0x6f,0x66,0x74,0x17,0x0d,0x31,0x30,0x30,0x36,0x32,
0x38,0x31,0x32,0x35,0x31,0x32,0x37,0x5a,0x17,0x0d,0x31,0x30,0x30,0x37,0x32,
0x38,0x31,0x32,0x35,0x31,0x32,0x37,0x5a,0xa0,0x0e,0x30,0x0c,0x30,0x0a,0x06,
0x03,0x55,0x1d,0x14,0x04,0x03,0x02,0x01,0x00,0x30,0x0d,0x06,0x09,0x2a,0x86,
0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x31,0x00,0x83,0x35,0x9c,
0xf5,0x35,0x5c,0xc1,0x20,0x81,0x80,0x5c,0x35,0x56,0xaf,0xb3,0x27,0x15,0xc6,
0xdd,0x24,0xe1,0xff,0xb9,0xf9,0x19,0x21,0xed,0x5e,0x1b,0xff,0x72,0xc3,0x33,
0xf6,0x9f,0xcb,0xde,0x84,0x0b,0x12,0x84,0xad,0x48,0x90,0x9d,0xdd,0x89,0xbb,
0x31,0x81,0x87,0x30,0x81,0x84,0x02,0x01,0x01,0x30,0x20,0x30,0x0c,0x31,0x0a,
0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x4e,0x02,0x10,0x20,0x42,0x68,
0x69,0xe9,0xea,0x61,0x83,0x11,0xdf,0xc0,0x24,0x2f,0x3b,0xad,0x40,0x30,0x0c,
0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0d,0x06,
0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x04,0x40,0x1e,
0x04,0xa4,0xe3,0x90,0x54,0xed,0xcb,0x94,0xa2,0xbe,0x81,0x73,0x7e,0x05,0xf2,
0x82,0xd3,0x3a,0x26,0x96,0x7a,0x53,0xcd,0x05,0xc3,0x09,0x69,0x3d,0x12,0x6c,
0xb1,0xb0,0xab,0x0e,0xa1,0xec,0x1b,0xa1,0xff,0x01,0x9c,0x49,0x9f,0x4b,0x69,
0x59,0x74,0x20,0x9f,0xb0,0x19,0x95,0xe7,0xed,0x1e,0x84,0xeb,0xe2,0x53,0x2c,
0xa6,0x43,0xdf }

Definition at line 950 of file message.c.

Referenced by test_sign_message().

◆ signedWithCertContent

const BYTE signedWithCertContent[]
static
Initial value:
= {
0x30,0x82,0x01,0x32,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
0xa0,0x82,0x01,0x23,0x30,0x82,0x01,0x1f,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,
0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,
0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,
0x02,0x03,0x04,0xa0,0x7c,0x30,0x7a,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,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,
0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,
0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,
0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,
0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,
0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,
0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,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,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,
0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,
0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,
0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,
0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }

Definition at line 274 of file message.c.

Referenced by test_verify_detached_message_signature(), and test_verify_message_signature().

◆ signedWithCertEmptyContent

const BYTE signedWithCertEmptyContent[]
static
Initial value:
= {
0x30,0x81,0xdf,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0xd1,0x30,0x81,0xce,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0xa0,0x7c,
0x30,0x7a,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,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,
0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,
0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,
0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,
0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30,
0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,
0xff,0x02,0x01,0x01,0x31,0x37,0x30,0x35,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,
0x00 }

Definition at line 438 of file message.c.

Referenced by test_verify_message_signature().

◆ signedWithCertWithPubKeyContent

const BYTE signedWithCertWithPubKeyContent[]
static
Initial value:
= {
0x30,0x81,0xfc,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
0x81,0xee,0x30,0x81,0xeb,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0xa0,0x81,
0x98,0x30,0x81,0x95,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,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,
0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,
0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,
0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,
0x6e,0x67,0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
0x01,0x01,0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,
0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x16,0x30,0x14,0x30,0x12,
0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,
0x02,0x01,0x01,0x31,0x37,0x30,0x35,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,0x00 }

Definition at line 455 of file message.c.

Referenced by test_verify_message_signature().

◆ signedWithCertWithValidPubKeyContent

const BYTE signedWithCertWithValidPubKeyContent[]
static
Initial value:
= {
0x30,0x82,0x01,0x89,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
0xa0,0x82,0x01,0x7a,0x30,0x82,0x01,0x76,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,
0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,
0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,
0x02,0x03,0x04,0xa0,0x81,0xd2,0x30,0x81,0xcf,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,0x30,0x22,0x18,0x0f,0x31,0x36,
0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,
0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,
0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,
0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x5c,0x30,0x0d,0x06,0x09,0x2a,
0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x4b,0x00,0x30,0x48,
0x02,0x41,0x00,0xe2,0x54,0x3a,0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb,0xb4,
0x53,0xe6,0x1f,0xe7,0x5d,0xf1,0x21,0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb,
0x65,0x97,0x03,0x86,0x60,0xde,0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc,
0x62,0x17,0xa9,0xcd,0x79,0x3f,0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30,
0x18,0x10,0x6b,0xd0,0x1c,0x10,0x79,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,
0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,
0x01,0x01,0xff,0x02,0x01,0x01,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,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,
0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,
0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,
0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,
0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }

Definition at line 473 of file message.c.

Referenced by test_verify_message_signature().

◆ v1CertWithValidPubKey

const BYTE v1CertWithValidPubKey[]
static
Initial value:
= {
0x30,0x81,0xcf,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,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,
0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,
0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,
0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
0x67,0x00,0x30,0x5c,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
0x01,0x01,0x05,0x00,0x03,0x4b,0x00,0x30,0x48,0x02,0x41,0x00,0xe2,0x54,0x3a,
0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb,0xb4,0x53,0xe6,0x1f,0xe7,0x5d,0xf1,
0x21,0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb,0x65,0x97,0x03,0x86,0x60,0xde,
0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc,0x62,0x17,0xa9,0xcd,0x79,0x3f,
0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30,0x18,0x10,0x6b,0xd0,0x1c,0x10,
0x79,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,
0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }

Definition at line 323 of file message.c.

Referenced by msg_get_signer_callback().