crypt32/tests: Write-strings warnings fix.
This commit is contained in:
parent
911af4dce9
commit
a0f208755e
|
@ -31,8 +31,9 @@ static void test_findAttribute(void)
|
||||||
{
|
{
|
||||||
PCRYPT_ATTRIBUTE ret;
|
PCRYPT_ATTRIBUTE ret;
|
||||||
BYTE blobbin[] = {0x02,0x01,0x01};
|
BYTE blobbin[] = {0x02,0x01,0x01};
|
||||||
|
static CHAR oid[] = "1.2.3";
|
||||||
CRYPT_ATTR_BLOB blobs[] = { { sizeof blobbin, blobbin }, };
|
CRYPT_ATTR_BLOB blobs[] = { { sizeof blobbin, blobbin }, };
|
||||||
CRYPT_ATTRIBUTE attr = { "1.2.3", sizeof(blobs) / sizeof(blobs[0]), blobs };
|
CRYPT_ATTRIBUTE attr = { oid, sizeof(blobs) / sizeof(blobs[0]), blobs };
|
||||||
|
|
||||||
/* returns NULL, last error not set */
|
/* returns NULL, last error not set */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
|
@ -71,8 +72,9 @@ static void test_findAttribute(void)
|
||||||
static void test_findExtension(void)
|
static void test_findExtension(void)
|
||||||
{
|
{
|
||||||
PCERT_EXTENSION ret;
|
PCERT_EXTENSION ret;
|
||||||
|
static CHAR oid[] = "1.2.3";
|
||||||
BYTE blobbin[] = {0x02,0x01,0x01};
|
BYTE blobbin[] = {0x02,0x01,0x01};
|
||||||
CERT_EXTENSION ext = { "1.2.3", TRUE, { sizeof blobbin, blobbin } };
|
CERT_EXTENSION ext = { oid, TRUE, { sizeof blobbin, blobbin } };
|
||||||
|
|
||||||
/* returns NULL, last error not set */
|
/* returns NULL, last error not set */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
|
@ -111,9 +113,10 @@ static void test_findExtension(void)
|
||||||
static void test_findRDNAttr(void)
|
static void test_findRDNAttr(void)
|
||||||
{
|
{
|
||||||
PCERT_RDN_ATTR ret;
|
PCERT_RDN_ATTR ret;
|
||||||
|
static CHAR oid[] = "1.2.3";
|
||||||
BYTE bin[] = { 0x16,0x09,'J','u','a','n',' ','L','a','n','g' };
|
BYTE bin[] = { 0x16,0x09,'J','u','a','n',' ','L','a','n','g' };
|
||||||
CERT_RDN_ATTR attrs[] = {
|
CERT_RDN_ATTR attrs[] = {
|
||||||
{ "1.2.3", CERT_RDN_IA5_STRING, { sizeof bin, bin } },
|
{ oid, CERT_RDN_IA5_STRING, { sizeof bin, bin } },
|
||||||
};
|
};
|
||||||
CERT_RDN rdns[] = {
|
CERT_RDN rdns[] = {
|
||||||
{ sizeof(attrs) / sizeof(attrs[0]), attrs },
|
{ sizeof(attrs) / sizeof(attrs[0]), attrs },
|
||||||
|
|
Loading…
Reference in New Issue