ReactOS 0.4.16-dev-197-g92996da
str.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 str.c:

Go to the source code of this file.

Classes

struct  _CertRDNAttrEncoding
 
struct  _CertRDNAttrEncodingW
 
struct  StrToNameA
 
struct  StrToNameW
 

Typedefs

typedef struct _CertRDNAttrEncoding CertRDNAttrEncoding
 
typedef struct _CertRDNAttrEncodingPCertRDNAttrEncoding
 
typedef struct _CertRDNAttrEncodingW CertRDNAttrEncodingW
 
typedef struct _CertRDNAttrEncodingWPCertRDNAttrEncodingW
 

Functions

static DWORD (WINAPI *pCertNameToStrA)(DWORD
 
static BOOL (WINAPI *pCertStrToNameA)(DWORD dwCertEncodingType
 
static void test_CertRDNValueToStrA (void)
 
static void test_CertRDNValueToStrW (void)
 
static void test_NameToStrConversionA (PCERT_NAME_BLOB pName, DWORD dwStrType, LPCSTR expected, BOOL todo)
 
static void test_CertNameToStrA (void)
 
static void test_NameToStrConversionW (PCERT_NAME_BLOB pName, DWORD dwStrType, LPCWSTR expected, BOOL todo)
 
static void test_CertNameToStrW (void)
 
static void test_CertStrToNameA (void)
 
static void test_CertStrToNameW (void)
 
static void test_CertGetNameStringA (void)
 
 START_TEST (str)
 

Variables

static BYTE bin1 [] = { 0x55, 0x53 }
 
static BYTE bin2 []
 
static BYTE bin3 []
 
static BYTE bin4 []
 
static BYTE bin5 []
 
static BYTE bin6 []
 
static BYTE bin7 []
 
static BYTE bin8 []
 
static BYTE bin9 [] = { 0x61, 0x62, 0x63, 0x22, 0x64, 0x65, 0x66 }
 
static BYTE bin10 [] = { 0x61, 0x62, 0x63, 0x27, 0x64, 0x65, 0x66 }
 
static BYTE bin11 [] = { 0x61, 0x62, 0x63, 0x2c, 0x20, 0x64, 0x65, 0x66 }
 
static BYTE bin12 [] = { 0x20, 0x61, 0x62, 0x63, 0x20 }
 
static BYTE bin13 [] = { 0x22, 0x64, 0x65, 0x66, 0x22 }
 
static BYTE bin14 [] = { 0x31, 0x3b, 0x33 }
 
static const BYTE cert []
 
static char issuerStr []
 
static char issuerStrSemicolon []
 
static char issuerStrCRLF []
 
static char subjectStr []
 
static char subjectStrSemicolon []
 
static char subjectStrCRLF []
 
static char x500SubjectStr [] = "C=US, S=Minnesota, L=Minneapolis, O=CodeWeavers, OU=Wine Development, CN=localhost, E=aric@codeweavers.com"
 
static char x500SubjectStrSemicolonReverse [] = "E=aric@codeweavers.com; CN=localhost; OU=Wine Development; O=CodeWeavers; L=Minneapolis; S=Minnesota; C=US"
 
static WCHAR issuerStrW []
 
static WCHAR issuerStrSemicolonW []
 
static WCHAR issuerStrCRLFW []
 
static WCHAR subjectStrW []
 
static WCHAR subjectStrSemicolonW []
 
static WCHAR subjectStrCRLFW []
 
static WCHAR x500SubjectStrSemicolonReverseW []
 
static HMODULE dll
 
static LPVOID
 
static DWORD
 
static LPSTR
 
static LPWSTR
 
static PCERT_RDN_VALUE_BLOB
 
static LPCSTR pszX500
 
static LPCSTR DWORD dwStrType
 
static LPCSTR DWORD voidpvReserved
 
static LPCSTR DWORD void BYTEpbEncoded
 
static LPCSTR DWORD void BYTE DWORDpcbEncoded
 
static LPCSTR DWORD void BYTE DWORD LPCSTRppszError
 
static DWORD type
 
static DWORD DWORD flags
 
static DWORD DWORD voidtypePara
 
static DWORD DWORD void LPSTR str
 
static DWORD DWORD void LPSTR DWORD cch
 
static BYTE encodedSimpleCN []
 
static BYTE encodedSingleQuotedCN []
 
static BYTE encodedSpacedCN []
 
static BYTE encodedQuotedCN []
 
static BYTE encodedMultipleAttrCN []
 
static BYTE encodedCommaCN []
 
static BYTE encodedEqualCN []
 
static BYTE encodedLessThanCN []
 
static BYTE encodedGreaterThanCN []
 
static BYTE encodedHashCN []
 
static BYTE encodedSemiCN []
 
static BYTE encodedNewlineCN []
 
static BYTE encodedDummyCN []
 
static BYTE encodedFields []
 
static const WCHAR simpleCN_W [] = { 'C','N','=','1',0 }
 
static const WCHAR singledQuotedCN_W [] = { 'C','N','=','\'','1','\'',0 }
 
static const WCHAR simpleSingleQuotedCN_W [] = { '\'','1','\'',0 }
 
static const WCHAR spacedCN_W [] = { 'C','N','=','"',' ','1',' ','"',0 }
 
static const WCHAR simpleSpacedCN_W [] = { '"',' ','1',' ','"',0 }
 
static const WCHAR quotedCN_W [] = { 'C','N','=','"','"','"','1','"','"','"',0 }
 
static const WCHAR simpleQuotedCN_W [] = { '"','"','"','1','"','"','"',0 }
 
static const WCHAR multipleAttrCN_W [] = { 'C','N','=','"','1','+','2','"',0 }
 
static const WCHAR simpleMultipleAttrCN_W [] = { '"','1','+','2','"',0 }
 
static const WCHAR commaCN_W [] = { 'C','N','=','"','a',',','b','"',0 }
 
static const WCHAR simpleCommaCN_W [] = { '"','a',',','b','"',0 }
 
static const WCHAR equalCN_W [] = { 'C','N','=','"','a','=','b','"',0 }
 
static const WCHAR simpleEqualCN_W [] = { '"','a','=','b','"',0 }
 
static const WCHAR lessThanCN_W [] = { 'C','N','=','"','<','"',0 }
 
static const WCHAR simpleLessThanCN_W [] = { '"','<','"',0 }
 
static const WCHAR greaterThanCN_W [] = { 'C','N','=','"','>','"',0 }
 
static const WCHAR simpleGreaterThanCN_W [] = { '"','>','"',0 }
 
static const WCHAR hashCN_W [] = { 'C','N','=','"','#','"',0 }
 
static const WCHAR simpleHashCN_W [] = { '"','#','"',0 }
 
static const WCHAR semiCN_W [] = { 'C','N','=','"',';','"',0 }
 
static const WCHAR simpleSemiCN_W [] = { '"',';','"',0 }
 
static const WCHAR newlineCN_W [] = { 'C','N','=','"','a','\n','b','"',0 }
 
static const WCHAR simpleNewlineCN_W [] = { '"','a','\n','b','"',0 }
 
static const struct StrToNameA namesA []
 
static const WCHAR badlyQuotedCN_W [] = { 'C','N','=','"','"','1','"','"',0 }
 
static const WCHAR simpleCN2_W [] = { 'C','N','=','"','1','"',0 }
 
static const WCHAR simpleCN3_W [] = { 'C','N',' ','=',' ','"','1','"',0 }
 
static const WCHAR japaneseCN_W [] = { 'C','N','=',0x226f,0x575b,0 }
 
static const WCHAR dummyCN_W [] = { 'C','N','=','d','u','m','m','y',',','T','=','t','e','s','t',0 }
 
static const WCHAR encodedFields_W []
 
static const BYTE encodedJapaneseCN []
 
static const struct StrToNameW namesW []
 

Typedef Documentation

◆ CertRDNAttrEncoding

◆ CertRDNAttrEncodingW

◆ PCertRDNAttrEncoding

◆ PCertRDNAttrEncodingW

Function Documentation

◆ BOOL()

static BOOL ( WINAPI pCertStrToNameA)
static

◆ DWORD()

static DWORD ( WINAPI pCertNameToStrA)
static

◆ START_TEST()

START_TEST ( str  )

Definition at line 1060 of file str.c.

1061{
1062 dll = GetModuleHandleA("Crypt32.dll");
1063
1064 pCertNameToStrA = (void*)GetProcAddress(dll,"CertNameToStrA");
1065 pCertNameToStrW = (void*)GetProcAddress(dll,"CertNameToStrW");
1066 pCertRDNValueToStrA = (void*)GetProcAddress(dll, "CertRDNValueToStrA");
1067 pCertRDNValueToStrW = (void*)GetProcAddress(dll, "CertRDNValueToStrW");
1068 pCertStrToNameA = (void*)GetProcAddress(dll,"CertStrToNameA");
1069 pCertStrToNameW = (void*)GetProcAddress(dll,"CertStrToNameW");
1070 pCertGetNameStringA = (void*)GetProcAddress(dll, "CertGetNameStringA");
1071
1079}
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
static void test_CertGetNameStringA(void)
Definition: str.c:904
static void test_CertRDNValueToStrW(void)
Definition: str.c:275
static void test_CertNameToStrW(void)
Definition: str.c:584
static void test_CertStrToNameA(void)
Definition: str.c:730
static void test_CertRDNValueToStrA(void)
Definition: str.c:205
static void test_CertStrToNameW(void)
Definition: str.c:847
static HMODULE dll
Definition: str.c:188
static void test_CertNameToStrA(void)
Definition: str.c:431

◆ test_CertGetNameStringA()

static void test_CertGetNameStringA ( void  )
static

Definition at line 904 of file str.c.

905{
907
908 if (!pCertGetNameStringA)
909 {
910 win_skip("CertGetNameStringA is not available\n");
911 return;
912 }
913
915 sizeof(cert));
916 ok(context != NULL, "CertCreateCertificateContext failed: %08x\n",
917 GetLastError());
918 if (context)
919 {
920 static const char aric[] = "aric@codeweavers.com";
921 static const char localhost[] = "localhost";
922 DWORD len, type;
923 LPSTR str;
924
925 /* Bad string types/types missing from the cert */
926 len = pCertGetNameStringA(NULL, 0, 0, NULL, NULL, 0);
927 ok(len == 1, "expected 1, got %d\n", len);
928 len = pCertGetNameStringA(context, 0, 0, NULL, NULL, 0);
929 ok(len == 1, "expected 1, got %d\n", len);
930 len = pCertGetNameStringA(context, CERT_NAME_URL_TYPE, 0, NULL, NULL,
931 0);
932 ok(len == 1, "expected 1, got %d\n", len);
933
934 len = pCertGetNameStringA(context, CERT_NAME_EMAIL_TYPE, 0, NULL, NULL,
935 0);
936 ok(len == strlen(aric) + 1, "unexpected length %d\n", len);
938 if (str)
939 {
940 len = pCertGetNameStringA(context, CERT_NAME_EMAIL_TYPE, 0, NULL,
941 str, len);
942 ok(!strcmp(str, aric), "unexpected value %s\n", str);
944 }
945
946 len = pCertGetNameStringA(context, CERT_NAME_RDN_TYPE, 0, NULL, NULL,
947 0);
948 ok(len == strlen(issuerStr) + 1, "unexpected length %d\n", len);
950 if (str)
951 {
952 len = pCertGetNameStringA(context, CERT_NAME_RDN_TYPE, 0, NULL,
953 str, len);
954 ok(!strcmp(str, issuerStr), "unexpected value %s\n", str);
956 }
957 type = 0;
958 len = pCertGetNameStringA(context, CERT_NAME_RDN_TYPE, 0, &type, NULL,
959 0);
960 ok(len == strlen(issuerStr) + 1, "unexpected length %d\n", len);
962 if (str)
963 {
964 len = pCertGetNameStringA(context, CERT_NAME_RDN_TYPE, 0, &type,
965 str, len);
966 ok(!strcmp(str, issuerStr), "unexpected value %s\n", str);
968 }
970 len = pCertGetNameStringA(context, CERT_NAME_RDN_TYPE, 0, &type, NULL,
971 0);
972 ok(len == strlen(subjectStr) + 1, "unexpected length %d\n", len);
974 if (str)
975 {
976 len = pCertGetNameStringA(context, CERT_NAME_RDN_TYPE, 0, &type,
977 str, len);
978 ok(!strcmp(str, subjectStr), "unexpected value %s\n", str);
980 }
981
982 len = pCertGetNameStringA(context, CERT_NAME_ATTR_TYPE, 0, NULL, NULL,
983 0);
984 ok(len == strlen(aric) + 1, "unexpected length %d\n", len);
986 if (str)
987 {
988 len = pCertGetNameStringA(context, CERT_NAME_ATTR_TYPE, 0, NULL,
989 str, len);
990 ok(!strcmp(str, aric), "unexpected value %s\n", str);
992 }
993 len = pCertGetNameStringA(context, CERT_NAME_ATTR_TYPE, 0,
994 (void *)szOID_RSA_emailAddr, NULL, 0);
995 ok(len == strlen(aric) + 1, "unexpected length %d\n", len);
997 if (str)
998 {
999 len = pCertGetNameStringA(context, CERT_NAME_ATTR_TYPE, 0,
1000 (void *)szOID_RSA_emailAddr, str, len);
1001 ok(!strcmp(str, aric), "unexpected value %s\n", str);
1003 }
1004 len = pCertGetNameStringA(context, CERT_NAME_ATTR_TYPE, 0,
1005 (void *)szOID_COMMON_NAME, NULL, 0);
1006 ok(len == strlen(localhost) + 1, "unexpected length %d\n", len);
1008 if (str)
1009 {
1010 len = pCertGetNameStringA(context, CERT_NAME_ATTR_TYPE, 0,
1011 (void *)szOID_COMMON_NAME, str, len);
1012 ok(!strcmp(str, localhost), "unexpected value %s\n", str);
1014 }
1015
1016 len = pCertGetNameStringA(context, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0,
1017 NULL, NULL, 0);
1018 ok(len == strlen(localhost) + 1, "unexpected length %d\n", len);
1020 if (str)
1021 {
1022 len = pCertGetNameStringA(context, CERT_NAME_SIMPLE_DISPLAY_TYPE,
1023 0, NULL, str, len);
1024 ok(!strcmp(str, localhost), "unexpected value %s\n", str);
1026 }
1027
1028 len = pCertGetNameStringA(context, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0,
1029 NULL, NULL, 0);
1030 ok(len == strlen(localhost) + 1, "unexpected length %d\n", len);
1032 if (str)
1033 {
1034 len = pCertGetNameStringA(context, CERT_NAME_FRIENDLY_DISPLAY_TYPE,
1035 0, NULL, str, len);
1036 ok(!strcmp(str, localhost), "unexpected value %s\n", str);
1038 }
1039
1040 len = pCertGetNameStringA(context, CERT_NAME_DNS_TYPE, 0, NULL, NULL,
1041 0);
1042 ok(len == strlen(localhost) + 1 || broken(len == 1) /* NT4 */,
1043 "unexpected length %d\n", len);
1044 if (len > 1)
1045 {
1047 if (str)
1048 {
1049 len = pCertGetNameStringA(context, CERT_NAME_DNS_TYPE, 0, NULL,
1050 str, len);
1051 ok(!strcmp(str, localhost), "unexpected value %s\n", str);
1053 }
1054 }
1055
1057 }
1058}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define ok(value,...)
Definition: atltest.h:57
#define broken(x)
Definition: atltest.h:178
#define NULL
Definition: types.h:112
BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
Definition: cert.c:371
PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded)
Definition: cert.c:316
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLenum GLsizei len
Definition: glext.h:6722
static const BYTE aric[]
Definition: encode.c:700
static const BYTE localhost[]
Definition: encode.c:1442
static BYTE cert[]
Definition: msg.c:1437
static char subjectStr[]
Definition: str.c:124
static char issuerStr[]
Definition: str.c:118
const WCHAR * str
#define win_skip
Definition: test.h:163
Definition: http.c:7252
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define CERT_NAME_SIMPLE_DISPLAY_TYPE
Definition: wincrypt.h:3500
#define CERT_NAME_EMAIL_TYPE
Definition: wincrypt.h:3497
#define X509_ASN_ENCODING
Definition: wincrypt.h:2297
#define szOID_RSA_emailAddr
Definition: wincrypt.h:3035
#define CERT_NAME_DNS_TYPE
Definition: wincrypt.h:3502
#define CERT_NAME_RDN_TYPE
Definition: wincrypt.h:3498
#define CERT_NAME_ATTR_TYPE
Definition: wincrypt.h:3499
#define CERT_NAME_URL_TYPE
Definition: wincrypt.h:3503
#define szOID_COMMON_NAME
Definition: wincrypt.h:3134
#define CERT_OID_NAME_STR
Definition: wincrypt.h:3485
#define CERT_NAME_FRIENDLY_DISPLAY_TYPE
Definition: wincrypt.h:3501
char * LPSTR
Definition: xmlstorage.h:182

Referenced by START_TEST().

◆ test_CertNameToStrA()

static void test_CertNameToStrA ( void  )
static

Definition at line 431 of file str.c.

432{
435
436 if (!pCertNameToStrA)
437 {
438 win_skip("CertNameToStrA is not available\n");
439 return;
440 }
441
443 sizeof(cert));
444 ok(context != NULL, "CertCreateCertificateContext failed: %08x\n",
445 GetLastError());
446 if (context)
447 {
448 DWORD ret;
449
450 /* This crashes
451 ret = pCertNameToStrA(0, NULL, 0, NULL, 0);
452 */
453 /* Test with a bogus encoding type */
454 SetLastError(0xdeadbeef);
455 ret = pCertNameToStrA(0, &context->pCertInfo->Issuer, 0, NULL, 0);
457 "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %d - %08x\n",
458 ret, GetLastError());
459 SetLastError(0xdeadbeef);
460 ret = pCertNameToStrA(X509_ASN_ENCODING, &context->pCertInfo->Issuer,
461 0, NULL, 0);
463 "Expected positive return and ERROR_SUCCESS, got %d - %08x\n",
464 ret, GetLastError());
465
466 test_NameToStrConversionA(&context->pCertInfo->Issuer,
468 test_NameToStrConversionA(&context->pCertInfo->Issuer,
471 test_NameToStrConversionA(&context->pCertInfo->Issuer,
474 test_NameToStrConversionA(&context->pCertInfo->Subject,
476 test_NameToStrConversionA(&context->pCertInfo->Subject,
479 test_NameToStrConversionA(&context->pCertInfo->Subject,
482 test_NameToStrConversionA(&context->pCertInfo->Subject,
484 test_NameToStrConversionA(&context->pCertInfo->Subject,
487
489 }
490 blob.pbData = encodedSimpleCN;
491 blob.cbData = sizeof(encodedSimpleCN);
494 blob.cbData = sizeof(encodedSingleQuotedCN);
497 blob.pbData = encodedSpacedCN;
498 blob.cbData = sizeof(encodedSpacedCN);
501 blob.pbData = encodedQuotedCN;
502 blob.cbData = sizeof(encodedQuotedCN);
504 FALSE);
506 FALSE);
508 blob.cbData = sizeof(encodedMultipleAttrCN);
511 blob.pbData = encodedCommaCN;
512 blob.cbData = sizeof(encodedCommaCN);
515 blob.pbData = encodedEqualCN;
516 blob.cbData = sizeof(encodedEqualCN);
519 blob.pbData = encodedLessThanCN;
520 blob.cbData = sizeof(encodedLessThanCN);
523 blob.pbData = encodedGreaterThanCN;
524 blob.cbData = sizeof(encodedGreaterThanCN);
527 blob.pbData = encodedHashCN;
528 blob.cbData = sizeof(encodedHashCN);
531 blob.pbData = encodedSemiCN;
532 blob.cbData = sizeof(encodedSemiCN);
535 blob.pbData = encodedNewlineCN;
536 blob.cbData = sizeof(encodedNewlineCN);
539}
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FALSE
Definition: types.h:117
#define SetLastError(x)
Definition: compat.h:752
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
static BYTE encodedQuotedCN[]
Definition: str.c:396
static BYTE encodedLessThanCN[]
Definition: str.c:406
static BYTE encodedSpacedCN[]
Definition: str.c:394
static char x500SubjectStr[]
Definition: str.c:130
static void test_NameToStrConversionA(PCERT_NAME_BLOB pName, DWORD dwStrType, LPCSTR expected, BOOL todo)
Definition: str.c:370
static char issuerStrSemicolon[]
Definition: str.c:120
static BYTE encodedEqualCN[]
Definition: str.c:403
static BYTE encodedSimpleCN[]
Definition: str.c:390
static BYTE encodedGreaterThanCN[]
Definition: str.c:409
static BYTE encodedNewlineCN[]
Definition: str.c:418
static BYTE encodedSemiCN[]
Definition: str.c:415
static char x500SubjectStrSemicolonReverse[]
Definition: str.c:131
static BYTE encodedCommaCN[]
Definition: str.c:400
static BYTE encodedMultipleAttrCN[]
Definition: str.c:398
static char subjectStrCRLF[]
Definition: str.c:128
static BYTE encodedSingleQuotedCN[]
Definition: str.c:392
static char subjectStrSemicolon[]
Definition: str.c:126
static BYTE encodedHashCN[]
Definition: str.c:412
static char issuerStrCRLF[]
Definition: str.c:122
Definition: image.c:134
int ret
#define CERT_X500_NAME_STR
Definition: wincrypt.h:3486
#define CERT_NAME_STR_SEMICOLON_FLAG
Definition: wincrypt.h:3487
#define CERT_SIMPLE_NAME_STR
Definition: wincrypt.h:3484
#define CERT_NAME_STR_CRLF_FLAG
Definition: wincrypt.h:3490
#define CERT_NAME_STR_REVERSE_FLAG
Definition: wincrypt.h:3492

Referenced by START_TEST().

◆ test_CertNameToStrW()

static void test_CertNameToStrW ( void  )
static

Definition at line 584 of file str.c.

585{
588
589 if (!pCertNameToStrW)
590 {
591 win_skip("CertNameToStrW is not available\n");
592 return;
593 }
594
596 sizeof(cert));
597 ok(context != NULL, "CertCreateCertificateContext failed: %08x\n",
598 GetLastError());
599 if (context)
600 {
601 DWORD ret;
602
603 /* This crashes
604 ret = pCertNameToStrW(0, NULL, 0, NULL, 0);
605 */
606 /* Test with a bogus encoding type */
607 SetLastError(0xdeadbeef);
608 ret = pCertNameToStrW(0, &context->pCertInfo->Issuer, 0, NULL, 0);
610 "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %d - %08x\n",
611 ret, GetLastError());
612 SetLastError(0xdeadbeef);
613 ret = pCertNameToStrW(X509_ASN_ENCODING, &context->pCertInfo->Issuer,
614 0, NULL, 0);
616 "Expected positive return and ERROR_SUCCESS, got %d - %08x\n",
617 ret, GetLastError());
618
619 test_NameToStrConversionW(&context->pCertInfo->Issuer,
621 test_NameToStrConversionW(&context->pCertInfo->Issuer,
624 test_NameToStrConversionW(&context->pCertInfo->Issuer,
627 test_NameToStrConversionW(&context->pCertInfo->Subject,
629 test_NameToStrConversionW(&context->pCertInfo->Subject,
632 test_NameToStrConversionW(&context->pCertInfo->Subject,
635 test_NameToStrConversionW(&context->pCertInfo->Subject,
638
640 }
641 blob.pbData = encodedSimpleCN;
642 blob.cbData = sizeof(encodedSimpleCN);
645 blob.cbData = sizeof(encodedSingleQuotedCN);
647 FALSE);
650 blob.pbData = encodedSpacedCN;
651 blob.cbData = sizeof(encodedSpacedCN);
654 FALSE);
655 blob.pbData = encodedQuotedCN;
656 blob.cbData = sizeof(encodedQuotedCN);
658 FALSE);
660 FALSE);
662 blob.cbData = sizeof(encodedMultipleAttrCN);
664 FALSE);
667 blob.pbData = encodedCommaCN;
668 blob.cbData = sizeof(encodedCommaCN);
671 FALSE);
672 blob.pbData = encodedEqualCN;
673 blob.cbData = sizeof(encodedEqualCN);
676 FALSE);
677 blob.pbData = encodedLessThanCN;
678 blob.cbData = sizeof(encodedLessThanCN);
681 FALSE);
682 blob.pbData = encodedGreaterThanCN;
683 blob.cbData = sizeof(encodedGreaterThanCN);
685 FALSE);
688 blob.pbData = encodedHashCN;
689 blob.cbData = sizeof(encodedHashCN);
692 FALSE);
693 blob.pbData = encodedSemiCN;
694 blob.cbData = sizeof(encodedSemiCN);
697 FALSE);
698 blob.pbData = encodedNewlineCN;
699 blob.cbData = sizeof(encodedNewlineCN);
702 FALSE);
703}
static const WCHAR simpleLessThanCN_W[]
Definition: str.c:574
static const WCHAR multipleAttrCN_W[]
Definition: str.c:567
static WCHAR subjectStrW[]
Definition: str.c:150
static const WCHAR hashCN_W[]
Definition: str.c:577
static const WCHAR newlineCN_W[]
Definition: str.c:581
static const WCHAR simpleSingleQuotedCN_W[]
Definition: str.c:562
static WCHAR issuerStrCRLFW[]
Definition: str.c:144
static const WCHAR spacedCN_W[]
Definition: str.c:563
static const WCHAR simpleQuotedCN_W[]
Definition: str.c:566
static const WCHAR simpleSpacedCN_W[]
Definition: str.c:564
static void test_NameToStrConversionW(PCERT_NAME_BLOB pName, DWORD dwStrType, LPCWSTR expected, BOOL todo)
Definition: str.c:541
static const WCHAR simpleMultipleAttrCN_W[]
Definition: str.c:568
static const WCHAR equalCN_W[]
Definition: str.c:571
static const WCHAR simpleSemiCN_W[]
Definition: str.c:580
static const WCHAR simpleHashCN_W[]
Definition: str.c:578
static const WCHAR lessThanCN_W[]
Definition: str.c:573
static WCHAR issuerStrSemicolonW[]
Definition: str.c:138
static const WCHAR singledQuotedCN_W[]
Definition: str.c:561
static const WCHAR commaCN_W[]
Definition: str.c:569
static const WCHAR semiCN_W[]
Definition: str.c:579
static WCHAR subjectStrSemicolonW[]
Definition: str.c:160
static const WCHAR quotedCN_W[]
Definition: str.c:565
static const WCHAR simpleEqualCN_W[]
Definition: str.c:572
static const WCHAR simpleCN_W[]
Definition: str.c:560
static const WCHAR simpleGreaterThanCN_W[]
Definition: str.c:576
static const WCHAR simpleCommaCN_W[]
Definition: str.c:570
static WCHAR x500SubjectStrSemicolonReverseW[]
Definition: str.c:180
static const WCHAR simpleNewlineCN_W[]
Definition: str.c:582
static const WCHAR greaterThanCN_W[]
Definition: str.c:575
static WCHAR issuerStrW[]
Definition: str.c:132
static WCHAR subjectStrCRLFW[]
Definition: str.c:170

Referenced by START_TEST().

◆ test_CertRDNValueToStrA()

static void test_CertRDNValueToStrA ( void  )
static

Definition at line 205 of file str.c.

206{
207 CertRDNAttrEncoding attrs[] = {
208 { "2.5.4.6", CERT_RDN_PRINTABLE_STRING,
209 { sizeof(bin1), bin1 }, "US", FALSE },
210 { "2.5.4.8", CERT_RDN_PRINTABLE_STRING,
211 { sizeof(bin2), bin2 }, "Minnesota", FALSE },
212 { "2.5.4.7", CERT_RDN_PRINTABLE_STRING,
213 { sizeof(bin3), bin3 }, "Minneapolis", FALSE },
214 { "2.5.4.10", CERT_RDN_PRINTABLE_STRING,
215 { sizeof(bin4), bin4 }, "CodeWeavers", FALSE },
216 { "2.5.4.11", CERT_RDN_PRINTABLE_STRING,
217 { sizeof(bin5), bin5 }, "Wine Development", FALSE },
218 { "2.5.4.3", CERT_RDN_PRINTABLE_STRING,
219 { sizeof(bin6), bin6 }, "localhost", FALSE },
220 { "1.2.840.113549.1.9.1", CERT_RDN_IA5_STRING,
221 { sizeof(bin7), bin7 }, "aric@codeweavers.com", FALSE },
223 { sizeof(bin9), bin9 }, "abc\"def", FALSE },
225 { sizeof(bin10), bin10 }, "abc'def", FALSE },
227 { sizeof(bin11), bin11 }, "abc, def", FALSE },
229 { sizeof(bin12), bin12 }, " abc ", FALSE },
231 { sizeof(bin13), bin13 }, "\"def\"", FALSE },
233 { sizeof(bin14), bin14 }, "1;3", FALSE },
234 };
235 DWORD i, ret;
236 char buffer[2000];
238 static const char ePKI[] = "ePKI Root Certification Authority";
239
240 if (!pCertRDNValueToStrA) return;
241
242 /* This crashes
243 ret = pCertRDNValueToStrA(0, NULL, NULL, 0);
244 */
245 /* With empty input, it generates the empty string */
246 SetLastError(0xdeadbeef);
247 ret = pCertRDNValueToStrA(0, &blob, NULL, 0);
248 ok(ret == 1 && GetLastError() == 0xdeadbeef, "Expected empty string\n");
249 ret = pCertRDNValueToStrA(0, &blob, buffer, sizeof(buffer));
250 ok(ret == 1 && GetLastError() == 0xdeadbeef, "Expected empty string\n");
251 ok(!buffer[0], "Expected empty string\n");
252
253 for (i = 0; i < ARRAY_SIZE(attrs); i++)
254 {
255 ret = pCertRDNValueToStrA(attrs[i].dwValueType, &attrs[i].Value,
256 buffer, sizeof(buffer));
257 todo_wine_if (attrs[i].todo)
258 {
259 ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got %d\n",
260 lstrlenA(attrs[i].str) + 1, ret);
261 ok(!strcmp(buffer, attrs[i].str), "Expected %s, got %s\n",
262 attrs[i].str, buffer);
263 }
264 }
265 blob.pbData = bin8;
266 blob.cbData = sizeof(bin8);
267 ret = pCertRDNValueToStrA(CERT_RDN_UTF8_STRING, &blob, buffer,
268 sizeof(buffer));
269 ok(ret == strlen(ePKI) + 1 || broken(ret != strlen(ePKI) + 1),
270 "Expected length %d, got %d\n", lstrlenA(ePKI), ret);
271 if (ret == strlen(ePKI) + 1)
272 ok(!strcmp(buffer, ePKI), "Expected %s, got %s\n", ePKI, buffer);
273}
#define ARRAY_SIZE(A)
Definition: main.h:20
GLuint buffer
Definition: glext.h:5915
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
BOOL todo
Definition: filedlg.c:313
static BYTE bin7[]
Definition: str.c:56
static BYTE bin5[]
Definition: str.c:52
static BYTE bin11[]
Definition: str.c:66
static BYTE bin2[]
Definition: str.c:46
static BYTE bin13[]
Definition: str.c:68
static BYTE bin10[]
Definition: str.c:65
static BYTE bin3[]
Definition: str.c:48
static BYTE bin12[]
Definition: str.c:67
static BYTE bin14[]
Definition: str.c:69
static BYTE bin1[]
Definition: str.c:45
static BYTE bin4[]
Definition: str.c:50
static BYTE bin6[]
Definition: str.c:54
static BYTE bin8[]
Definition: str.c:58
static BYTE bin9[]
Definition: str.c:64
#define todo_wine_if(is_todo)
Definition: custom.c:86
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
#define CERT_RDN_UTF8_STRING
Definition: wincrypt.h:2793
#define CERT_RDN_IA5_STRING
Definition: wincrypt.h:2784
#define CERT_RDN_PRINTABLE_STRING
Definition: wincrypt.h:2780

Referenced by START_TEST().

◆ test_CertRDNValueToStrW()

static void test_CertRDNValueToStrW ( void  )
static

Definition at line 275 of file str.c.

276{
277 static const WCHAR usW[] = { 'U','S',0 };
278 static const WCHAR minnesotaW[] = { 'M','i','n','n','e','s','o','t','a',0 };
279 static const WCHAR minneapolisW[] = { 'M','i','n','n','e','a','p','o','l',
280 'i','s',0 };
281 static const WCHAR codeweaversW[] = { 'C','o','d','e','W','e','a','v','e',
282 'r','s',0 };
283 static const WCHAR wineDevW[] = { 'W','i','n','e',' ','D','e','v','e','l',
284 'o','p','m','e','n','t',0 };
285 static const WCHAR localhostW[] = { 'l','o','c','a','l','h','o','s','t',0 };
286 static const WCHAR aricW[] = { 'a','r','i','c','@','c','o','d','e','w','e',
287 'a','v','e','r','s','.','c','o','m',0 };
288 static const WCHAR ePKIW[] = { 'e','P','K','I',' ','R','o','o','t',' ',
289 'C','e','r','t','i','f','i','c','a','t','i','o','n',' ','A','u','t','h',
290 'o','r','i','t','y',0 };
291 static const WCHAR embeddedDoubleQuoteW[] = { 'a','b','c','"','d','e','f',
292 0 };
293 static const WCHAR embeddedSingleQuoteW[] = { 'a','b','c','\'','d','e','f',
294 0 };
295 static const WCHAR embeddedCommaW[] = { 'a','b','c',',',' ','d','e','f',0 };
296 static const WCHAR trailingAndEndingSpaceW[] = { ' ','a','b','c',' ',0 };
297 static const WCHAR enclosingQuotesW[] = { '"','d','e','f','"',0 };
298 static const WCHAR embeddedSemiW[] = { '1',';','3',0 };
299 CertRDNAttrEncodingW attrs[] = {
300 { "2.5.4.6", CERT_RDN_PRINTABLE_STRING,
301 { sizeof(bin1), bin1 }, usW, FALSE },
302 { "2.5.4.8", CERT_RDN_PRINTABLE_STRING,
303 { sizeof(bin2), bin2 }, minnesotaW, FALSE },
304 { "2.5.4.7", CERT_RDN_PRINTABLE_STRING,
305 { sizeof(bin3), bin3 }, minneapolisW, FALSE },
306 { "2.5.4.10", CERT_RDN_PRINTABLE_STRING,
307 { sizeof(bin4), bin4 }, codeweaversW, FALSE },
308 { "2.5.4.11", CERT_RDN_PRINTABLE_STRING,
309 { sizeof(bin5), bin5 }, wineDevW, FALSE },
310 { "2.5.4.3", CERT_RDN_PRINTABLE_STRING,
311 { sizeof(bin6), bin6 }, localhostW, FALSE },
312 { "1.2.840.113549.1.9.1", CERT_RDN_IA5_STRING,
313 { sizeof(bin7), bin7 }, aricW, FALSE },
315 { sizeof(bin9), bin9 }, embeddedDoubleQuoteW, FALSE },
317 { sizeof(bin10), bin10 }, embeddedSingleQuoteW, FALSE },
319 { sizeof(bin11), bin11 }, embeddedCommaW, FALSE },
321 { sizeof(bin12), bin12 }, trailingAndEndingSpaceW, FALSE },
323 { sizeof(bin13), bin13 }, enclosingQuotesW, FALSE },
325 { sizeof(bin14), bin14 }, embeddedSemiW, FALSE },
326 };
327 DWORD i, ret;
328 WCHAR buffer[2000];
330
331 if (!pCertRDNValueToStrW)
332 {
333 win_skip("CertRDNValueToStrW is not available\n");
334 return;
335 }
336
337 /* This crashes
338 ret = pCertRDNValueToStrW(0, NULL, NULL, 0);
339 */
340 /* With empty input, it generates the empty string */
341 SetLastError(0xdeadbeef);
342 ret = pCertRDNValueToStrW(0, &blob, NULL, 0);
343 ok(ret == 1 && GetLastError() == 0xdeadbeef, "Expected empty string\n");
344 ret = pCertRDNValueToStrW(0, &blob, buffer, ARRAY_SIZE(buffer));
345 ok(ret == 1 && GetLastError() == 0xdeadbeef, "Expected empty string\n");
346 ok(!buffer[0], "Expected empty string\n");
347
348 for (i = 0; i < ARRAY_SIZE(attrs); i++)
349 {
350 ret = pCertRDNValueToStrW(attrs[i].dwValueType, &attrs[i].Value, buffer, ARRAY_SIZE(buffer));
351 todo_wine_if (attrs[i].todo)
352 {
353 ok(ret == lstrlenW(attrs[i].str) + 1,
354 "Expected length %d, got %d\n", lstrlenW(attrs[i].str) + 1, ret);
355 ok(!lstrcmpW(buffer, attrs[i].str), "Expected %s, got %s\n",
357 }
358 }
359 blob.pbData = bin8;
360 blob.cbData = sizeof(bin8);
361 ret = pCertRDNValueToStrW(CERT_RDN_UTF8_STRING, &blob, buffer,
362 sizeof(buffer));
363 ok(ret == lstrlenW(ePKIW) + 1 || broken(ret != lstrlenW(ePKIW) + 1),
364 "Expected length %d, got %d\n", lstrlenW(ePKIW), ret);
365 if (ret == lstrlenW(ePKIW) + 1)
366 ok(!lstrcmpW(buffer, ePKIW), "Expected %s, got %s\n",
368}
#define lstrlenW
Definition: compat.h:750
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4243
#define wine_dbgstr_w
Definition: kernel32.h:34
static const WCHAR localhostW[]
Definition: notification.c:35
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by START_TEST().

◆ test_CertStrToNameA()

static void test_CertStrToNameA ( void  )
static

Definition at line 730 of file str.c.

731{
732 BOOL ret;
733 DWORD size, i;
734 BYTE buf[100];
735
736 if (!pCertStrToNameA)
737 {
738 win_skip("CertStrToNameA is not available\n");
739 return;
740 }
741
742 /* Crash
743 ret = pCertStrToNameA(0, NULL, 0, NULL, NULL, NULL, NULL);
744 */
745 ret = pCertStrToNameA(0, NULL, 0, NULL, NULL, &size, NULL);
746 ok(!ret, "Expected failure\n");
747 ret = pCertStrToNameA(0, "bogus", 0, NULL, NULL, &size, NULL);
749 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
750 ret = pCertStrToNameA(0, "foo=1", 0, NULL, NULL, &size, NULL);
752 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
753 ret = pCertStrToNameA(0, "CN=1", 0, NULL, NULL, &size, NULL);
755 "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
756 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1", 0, NULL, NULL, &size, NULL);
757 ok(ret, "CertStrToNameA failed: %08x\n", GetLastError());
758 size = sizeof(buf);
759 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=\"\"1\"\"", 0, NULL, buf, &size,
760 NULL);
762 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
763 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1+2", 0, NULL, buf,
764 &size, NULL);
766 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
767 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1+2", CERT_NAME_STR_NO_PLUS_FLAG, NULL, buf,
768 &size, NULL);
770 "Expected ERROR_SUCCESS, got %08x\n", GetLastError());
771 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1,2", CERT_NAME_STR_NO_QUOTING_FLAG, NULL, buf,
772 &size, NULL);
774 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
775 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=\"1,2;3,4\"", CERT_NAME_STR_NO_QUOTING_FLAG, NULL, buf,
776 &size, NULL);
778 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
779 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=abc", 0, NULL, buf,
780 &size, NULL);
782 "Expected ERROR_SUCCESS, got %08x\n", GetLastError());
783 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=abc", CERT_NAME_STR_NO_QUOTING_FLAG, NULL, buf,
784 &size, NULL);
786 "Expected ERROR_SUCCESS, got %08x\n", GetLastError());
787 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=\"abc\"", 0, NULL, buf,
788 &size, NULL);
790 "Expected ERROR_SUCCESS, got %08x\n", GetLastError());
791 ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=\"abc\"", CERT_NAME_STR_NO_QUOTING_FLAG, NULL, buf,
792 &size, NULL);
794 "Expected ERROR_MORE_DATA, got %08x\n", GetLastError());
795 for (i = 0; i < ARRAY_SIZE(namesA); i++)
796 {
797 size = sizeof(buf);
798 ret = pCertStrToNameA(X509_ASN_ENCODING, namesA[i].x500, 0, NULL, buf,
799 &size, NULL);
800 ok(ret, "CertStrToNameA failed on string %s: %08x\n", namesA[i].x500,
801 GetLastError());
802 ok(size == namesA[i].encodedSize,
803 "Expected size %d, got %d\n", namesA[i].encodedSize, size);
804 if (ret)
805 ok(!memcmp(buf, namesA[i].encoded, namesA[i].encodedSize),
806 "Unexpected value for string %s\n", namesA[i].x500);
807 }
808}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define ERROR_MORE_DATA
Definition: dderror.h:13
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizeiptr size
Definition: glext.h:5919
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static const struct StrToNameA namesA[]
Definition: str.c:712
#define CERT_NAME_STR_NO_QUOTING_FLAG
Definition: wincrypt.h:3489
#define CERT_NAME_STR_NO_PLUS_FLAG
Definition: wincrypt.h:3488
#define CRYPT_E_INVALID_X500_STRING
Definition: winerror.h:3027
unsigned char BYTE
Definition: xxhash.c:193

Referenced by START_TEST().

◆ test_CertStrToNameW()

static void test_CertStrToNameW ( void  )
static

Definition at line 847 of file str.c.

848{
849 static const WCHAR bogusW[] = { 'b','o','g','u','s',0 };
850 static const WCHAR fooW[] = { 'f','o','o','=','1',0 };
851 BOOL ret;
852 DWORD size, i;
853 LPCWSTR errorPtr;
854 BYTE buf[100];
855
856 if (!pCertStrToNameW)
857 {
858 win_skip("CertStrToNameW is not available\n");
859 return;
860 }
861
862 /* Crash
863 ret = pCertStrToNameW(0, NULL, 0, NULL, NULL, NULL, NULL);
864 */
865 ret = pCertStrToNameW(0, NULL, 0, NULL, NULL, &size, NULL);
866 ok(!ret, "Expected failure\n");
867 ret = pCertStrToNameW(0, bogusW, 0, NULL, NULL, &size, NULL);
869 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
870 ret = pCertStrToNameW(0, fooW, 0, NULL, NULL, &size, NULL);
872 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
873 ret = pCertStrToNameW(0, simpleCN_W, 0, NULL, NULL, &size, NULL);
875 "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
876 ret = pCertStrToNameW(X509_ASN_ENCODING, simpleCN_W, 0, NULL, NULL, &size,
877 NULL);
878 ok(ret, "CertStrToNameW failed: %08x\n", GetLastError());
879 size = sizeof(buf);
880 ret = pCertStrToNameW(X509_ASN_ENCODING, badlyQuotedCN_W, 0, NULL, buf,
881 &size, NULL);
883 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
884 ret = pCertStrToNameW(X509_ASN_ENCODING, badlyQuotedCN_W, 0, NULL, buf,
885 &size, &errorPtr);
887 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError());
888 ok(errorPtr && *errorPtr == '1', "Expected first error character was 1\n");
889 for (i = 0; i < ARRAY_SIZE(namesW); i++)
890 {
891 size = sizeof(buf);
892 ret = pCertStrToNameW(X509_ASN_ENCODING, namesW[i].x500, 0, NULL, buf,
893 &size, NULL);
894 ok(ret, "Index %d: CertStrToNameW failed: %08x\n", i, GetLastError());
895 ok(size == namesW[i].encodedSize,
896 "Index %d: expected size %d, got %d\n", i, namesW[i].encodedSize,
897 size);
898 if (ret)
899 ok(!memcmp(buf, namesW[i].encoded, size),
900 "Index %d: unexpected value for string %s\n", i, wine_dbgstr_w(namesW[i].x500));
901 }
902}
static const WCHAR badlyQuotedCN_W[]
Definition: str.c:817
static const struct StrToNameW namesW[]
Definition: str.c:828
static const WCHAR fooW[]
Definition: locale.c:44
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by START_TEST().

◆ test_NameToStrConversionA()

static void test_NameToStrConversionA ( PCERT_NAME_BLOB  pName,
DWORD  dwStrType,
LPCSTR  expected,
BOOL  todo 
)
static

Definition at line 370 of file str.c.

372{
373 char buffer[2000] = { 0 };
374 DWORD i;
375
376 i = pCertNameToStrA(X509_ASN_ENCODING, pName, dwStrType, NULL, 0);
378 ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n",
379 lstrlenA(expected) + 1, i);
380 i = pCertNameToStrA(X509_ASN_ENCODING,pName, dwStrType, buffer,
381 sizeof(buffer));
383 ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n",
384 lstrlenA(expected) + 1, i);
386 ok(!strcmp(buffer, expected), "Expected %s, got %s\n", expected,
387 buffer);
388}
static LPSTR pName
Definition: security.c:75
BOOL expected
Definition: store.c:2063
static LPCSTR DWORD dwStrType
Definition: str.c:196

Referenced by test_CertNameToStrA().

◆ test_NameToStrConversionW()

static void test_NameToStrConversionW ( PCERT_NAME_BLOB  pName,
DWORD  dwStrType,
LPCWSTR  expected,
BOOL  todo 
)
static

Definition at line 541 of file str.c.

543{
544 WCHAR buffer[2000] = { 0 };
545 DWORD i;
546
547 i = pCertNameToStrW(X509_ASN_ENCODING,pName, dwStrType, NULL, 0);
549 ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %d\n",
550 lstrlenW(expected) + 1, i);
553 ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %d\n",
554 lstrlenW(expected) + 1, i);
556 ok(!lstrcmpW(buffer, expected), "Expected %s, got %s\n",
558}

Referenced by test_CertNameToStrW().

Variable Documentation

◆ badlyQuotedCN_W

const WCHAR badlyQuotedCN_W[] = { 'C','N','=','"','"','1','"','"',0 }
static

Definition at line 817 of file str.c.

Referenced by test_CertStrToNameW().

◆ bin1

BYTE bin1[] = { 0x55, 0x53 }
static

Definition at line 45 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin10

BYTE bin10[] = { 0x61, 0x62, 0x63, 0x27, 0x64, 0x65, 0x66 }
static

Definition at line 65 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin11

BYTE bin11[] = { 0x61, 0x62, 0x63, 0x2c, 0x20, 0x64, 0x65, 0x66 }
static

Definition at line 66 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin12

BYTE bin12[] = { 0x20, 0x61, 0x62, 0x63, 0x20 }
static

Definition at line 67 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin13

BYTE bin13[] = { 0x22, 0x64, 0x65, 0x66, 0x22 }
static

Definition at line 68 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin14

BYTE bin14[] = { 0x31, 0x3b, 0x33 }
static

Definition at line 69 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin2

BYTE bin2[]
static
Initial value:
= { 0x4d, 0x69, 0x6e, 0x6e, 0x65, 0x73, 0x6f, 0x74,
0x61 }

Definition at line 46 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin3

BYTE bin3[]
static
Initial value:
= { 0x4d, 0x69, 0x6e, 0x6e, 0x65, 0x61, 0x70, 0x6f,
0x6c, 0x69, 0x73 }

Definition at line 48 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin4

BYTE bin4[]
static
Initial value:
= { 0x43, 0x6f, 0x64, 0x65, 0x57, 0x65, 0x61, 0x76,
0x65, 0x72, 0x73 }

Definition at line 50 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin5

BYTE bin5[]
static
Initial value:
= { 0x57, 0x69, 0x6e, 0x65, 0x20, 0x44, 0x65, 0x76,
0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74 }

Definition at line 52 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin6

BYTE bin6[]
static
Initial value:
= { 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
0x74 }

Definition at line 54 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin7

BYTE bin7[]
static
Initial value:
= { 0x61, 0x72, 0x69, 0x63, 0x40, 0x63, 0x6f, 0x64,
0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d }

Definition at line 56 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin8

BYTE bin8[]
static
Initial value:
= {
0x65,0x00,0x50,0x00,0x4b,0x00,0x49,0x00,0x20,0x00,0x52,0x00,0x6f,0x00,0x6f,
0x00,0x74,0x00,0x20,0x00,0x43,0x00,0x65,0x00,0x72,0x00,0x74,0x00,0x69,0x00,
0x66,0x00,0x69,0x00,0x63,0x00,0x61,0x00,0x74,0x00,0x69,0x00,0x6f,0x00,0x6e,
0x00,0x20,0x00,0x41,0x00,0x75,0x00,0x74,0x00,0x68,0x00,0x6f,0x00,0x72,0x00,
0x69,0x00,0x74,0x00,0x79,0x00 }

Definition at line 58 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ bin9

BYTE bin9[] = { 0x61, 0x62, 0x63, 0x22, 0x64, 0x65, 0x66 }
static

Definition at line 64 of file str.c.

Referenced by test_CertRDNValueToStrA(), and test_CertRDNValueToStrW().

◆ cch

Definition at line 202 of file str.c.

Referenced by _LocalGetPrintServerHandleData(), CMruShortList::_SlotString(), CMruLongList::_SlotString(), CCicLibMenu::AddMenuItem(), AllocLine(), anonymous_namespace{activex.cpp}::AllocLpsz(), AllocStrCat(), ApplyParameterStringsToMessage(), BIDI_ReorderL2vLevel(), BIDI_ReorderV2lLevel(), CertGetNameStringW(), CmdTrace(), ConPagerWorker(), DeleteDirectoryTree(), DeviceCapabilitiesA(), DIALOG_GoTo(), DocumentPropertiesA(), DoesMatch(), DoValidateShortcutName(), DrawShadowText(), CMyDocsDropHandler::Drop(), DropPrefix(), DumpString(), EnumPrintersA(), ErrMsg(), ExpandEnvStrings(), ExpandTab(), ExpandTabLength(), ExtractAndInstallThread(), ExtractFilesFromZip(), ExtTextOutA(), FindExecutableW(), FindNextLine(), CRegistryFolder::FormatValueData(), CicProfile::GetCodePageA(), GetEventMessage(), GetNextLine(), GetPredefinedClipboardFormatName(), GetPrinterA(), GetPrinterDataExA(), GetPrinterDriverA(), GetPrintProcessorDirectoryA(), GetProgramPath(), GetRegString(), CTipbarThread::GetTextSize(), Imm32WideFromAnsi(), ImmEscapeA(), ImmEscapeW(), ImmGetDescriptionA(), ImmGetDescriptionW(), ImmGetIMEFileNameA(), ImmGetIMEFileNameW(), CUIFMenuItem::Init(), CCicLibMenuItem::Init(), CZZWStr::Initialize(), InsertAtSelection_InsertTextAtSelection(), IntTranslateKbdMessage(), IsBlankLine(), ITextDocument2Old_fnCheckTextLimit(), LogFontAnsiToWide(), LogFontWideToAnsi(), anonymous_namespace{activex.cpp}::LpszToBstr(), makestringfile(), mmioRead(), mmioWrite(), MorePagerLine(), CAutoComplete::OnEditKeyDown(), CFontsDialog::OnFontName(), CFontsDialog::OnFontSize(), CAutoComplete::OnListSelChange(), OpenPrinterA(), ParseLines(), ParseMoreVariable(), PathMakeAbsoluteW(), PathWordBreakProc(), PropVariantToString(), PSStringFromPropertyKey(), read_text_callback(), RegenerateUserEnvironment(), resolveLines(), resolveParagraphs(), resolveWhitespace(), RetrieveClipboardFormatName(), reverse(), SetClipboardFromString(), SetDefaultPrinterA(), SetPrinterDataExA(), CUIFButton::SetText(), CUIFBalloonWindow::SetText(), SHELL_ErrorBoxHelper(), CDesktopFolder::ShellUrlParseDisplayName(), StartDocPrinterA(), CFindFolder::StartSearch(), SuggestKeys(), SZZ_GetSize(), TEST_AssocQueryStringA(), TEST_AssocQueryStringW(), test_get_profiles_dir(), test_IACLCustomMRU_TypedURLs(), test_pack_MENUITEMINFOA(), test_pack_MENUITEMINFOW(), test_PSStringFromPropertyKey(), UnicodeToAnsiInPlace(), User32DoImeHelp(), WhereFindByDirs(), WhereGetVariable(), WhereSearchFiles(), WhereSearchGeneric(), and CRegPropertyBag::Write().

◆ cert

const BYTE cert[]
static

Definition at line 71 of file str.c.

◆ commaCN_W

const WCHAR commaCN_W[] = { 'C','N','=','"','a',',','b','"',0 }
static

Definition at line 569 of file str.c.

Referenced by test_CertNameToStrW().

◆ dll

◆ dummyCN_W

const WCHAR dummyCN_W[] = { 'C','N','=','d','u','m','m','y',',','T','=','t','e','s','t',0 }
static

Definition at line 821 of file str.c.

◆ DWORD

Definition at line 189 of file str.c.

◆ dwStrType

◆ encodedCommaCN

BYTE encodedCommaCN[]
static
Initial value:
= {
0x30,0x0e,0x31,0x0c,0x30,0x0a,0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x61,0x2c,
0x62 }

Definition at line 400 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedDummyCN

BYTE encodedDummyCN[]
static
Initial value:
= {
0x30,0x1F,0x31,0x0E,0x30,0x0C,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x64,0x75,
0x6D,0x6D,0x79,0x31,0x0D,0x30,0x0B,0x06,0x03,0x55,0x04,0x0C,0x13,0x04,0x74,
0x65,0x73,0x74 }

Definition at line 421 of file str.c.

◆ encodedEqualCN

BYTE encodedEqualCN[]
static
Initial value:
= {
0x30,0x0e,0x31,0x0c,0x30,0x0a,0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x61,0x3d,
0x62 }

Definition at line 403 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedFields

BYTE encodedFields[]
static
Initial value:
= {
0x30,0x2F,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x57,0x69,
0x6E,0x65,0x20,0x54,0x65,0x73,0x74,0x31,0x0C,0x30,0x0A,0x06,0x03,0x55,0x04,
0x0C,0x13,0x03,0x31,0x32,0x33,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,
0x13,0x02,0x42,0x52 }

Definition at line 425 of file str.c.

◆ encodedFields_W

const WCHAR encodedFields_W[]
static
Initial value:
= { ' ','C','N',' ','=',' ',' ',' ','W','i','n','e',' ','T',
'e','s','t',',','T',' ','=',' ','1','2','3',',',' ','C',
' ','=',' ','B','R',0 }

Definition at line 822 of file str.c.

◆ encodedGreaterThanCN

BYTE encodedGreaterThanCN[]
static
Initial value:
= {
0x30,0x0d,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x03,0x1e,0x02,0x00,0x3e
}

Definition at line 409 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedHashCN

BYTE encodedHashCN[]
static
Initial value:
= {
0x30,0x0d,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x03,0x1e,0x02,0x00,0x23
}

Definition at line 412 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedJapaneseCN

const BYTE encodedJapaneseCN[]
static
Initial value:
= { 0x30,0x0f,0x31,0x0d,0x30,0x0b,0x06,
0x03,0x55,0x04,0x03,0x1e,0x04,0x22,0x6f,0x57,0x5b }

Definition at line 825 of file str.c.

◆ encodedLessThanCN

BYTE encodedLessThanCN[]
static
Initial value:
= {
0x30,0x0d,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x03,0x1e,0x02,0x00,0x3c
}

Definition at line 406 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedMultipleAttrCN

BYTE encodedMultipleAttrCN[]
static
Initial value:
= { 0x30,0x0e,0x31,0x0c,0x30,0x0a,
0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x31,0x2b,0x32 }

Definition at line 398 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedNewlineCN

BYTE encodedNewlineCN[]
static
Initial value:
= {
0x30,0x11,0x31,0x0f,0x30,0x0d,0x06,0x03,0x55,0x04,0x03,0x1e,0x06,0x00,0x61,
0x00,0x0a,0x00,0x62 }

Definition at line 418 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedQuotedCN

BYTE encodedQuotedCN[]
static
Initial value:
= { 0x30,0x11,0x31,0x0f,0x30,0x0d,0x06,0x03,
0x55, 0x04,0x03,0x1e,0x06,0x00,0x22,0x00,0x31,0x00,0x22, }

Definition at line 396 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedSemiCN

BYTE encodedSemiCN[]
static
Initial value:
= {
0x30,0x0d,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x03,0x1e,0x02,0x00,0x3b
}

Definition at line 415 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedSimpleCN

BYTE encodedSimpleCN[]
static
Initial value:
= {
0x30,0x0c,0x31,0x0a,0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x31 }

Definition at line 390 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedSingleQuotedCN

BYTE encodedSingleQuotedCN[]
static
Initial value:
= { 0x30,0x0e,0x31,0x0c,0x30,0x0a,
0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x27,0x31,0x27 }

Definition at line 392 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ encodedSpacedCN

BYTE encodedSpacedCN[]
static
Initial value:
= { 0x30,0x0e,0x31,0x0c,0x30,0x0a,0x06,0x03,
0x55,0x04,0x03,0x13,0x03,0x20,0x31,0x20 }

Definition at line 394 of file str.c.

Referenced by test_CertNameToStrA(), and test_CertNameToStrW().

◆ equalCN_W

const WCHAR equalCN_W[] = { 'C','N','=','"','a','=','b','"',0 }
static

Definition at line 571 of file str.c.

Referenced by test_CertNameToStrW().

◆ flags

Definition at line 202 of file str.c.

◆ greaterThanCN_W

const WCHAR greaterThanCN_W[] = { 'C','N','=','"','>','"',0 }
static

Definition at line 575 of file str.c.

Referenced by test_CertNameToStrW().

◆ hashCN_W

const WCHAR hashCN_W[] = { 'C','N','=','"','#','"',0 }
static

Definition at line 577 of file str.c.

Referenced by test_CertNameToStrW().

◆ issuerStr

char issuerStr[]
static
Initial value:
=
"US, Minnesota, Minneapolis, CodeWeavers, Wine Development, localhost, aric@codeweavers.com"

Definition at line 118 of file str.c.

Referenced by test_CertGetNameStringA(), and test_CertNameToStrA().

◆ issuerStrCRLF

char issuerStrCRLF[]
static
Initial value:
=
"US\r\nMinnesota\r\nMinneapolis\r\nCodeWeavers\r\nWine Development\r\nlocalhost\r\naric@codeweavers.com"

Definition at line 122 of file str.c.

Referenced by test_CertNameToStrA().

◆ issuerStrCRLFW

WCHAR issuerStrCRLFW[]
static
Initial value:
= {
'U','S','\r','\n','M','i','n','n','e','s','o','t','a','\r','\n','M','i','n',
'n','e','a','p','o','l','i','s','\r','\n','C','o','d','e','W','e','a','v','e',
'r','s','\r','\n','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n',
't','\r','\n','l','o','c','a','l','h','o','s','t','\r','\n','a','r','i','c',
'@','c','o','d','e','w','e','a','v','e','r','s','.','c','o','m',0 }

Definition at line 144 of file str.c.

Referenced by test_CertNameToStrW().

◆ issuerStrSemicolon

char issuerStrSemicolon[]
static
Initial value:
=
"US; Minnesota; Minneapolis; CodeWeavers; Wine Development; localhost; aric@codeweavers.com"

Definition at line 120 of file str.c.

Referenced by test_CertNameToStrA().

◆ issuerStrSemicolonW

WCHAR issuerStrSemicolonW[]
static
Initial value:
= {
'U','S',';',' ','M','i','n','n','e','s','o','t','a',';',' ','M','i','n','n',
'e','a','p','o','l','i','s',';',' ','C','o','d','e','W','e','a','v','e','r',
's',';',' ','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n','t',
';',' ','l','o','c','a','l','h','o','s','t',';',' ','a','r','i','c','@','c',
'o','d','e','w','e','a','v','e','r','s','.','c','o','m',0 }

Definition at line 138 of file str.c.

Referenced by test_CertNameToStrW().

◆ issuerStrW

WCHAR issuerStrW[]
static
Initial value:
= {
'U','S',',',' ','M','i','n','n','e','s','o','t','a',',',' ','M','i','n','n',
'e','a','p','o','l','i','s',',',' ','C','o','d','e','W','e','a','v','e','r',
's',',',' ','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n','t',
',',' ','l','o','c','a','l','h','o','s','t',',',' ','a','r','i','c','@','c',
'o','d','e','w','e','a','v','e','r','s','.','c','o','m',0 }

Definition at line 132 of file str.c.

Referenced by test_CertNameToStrW().

◆ japaneseCN_W

const WCHAR japaneseCN_W[] = { 'C','N','=',0x226f,0x575b,0 }
static

Definition at line 820 of file str.c.

◆ lessThanCN_W

const WCHAR lessThanCN_W[] = { 'C','N','=','"','<','"',0 }
static

Definition at line 573 of file str.c.

Referenced by test_CertNameToStrW().

◆ LPSTR

Definition at line 189 of file str.c.

◆ LPVOID

Definition at line 189 of file str.c.

◆ LPWSTR

Definition at line 190 of file str.c.

◆ multipleAttrCN_W

const WCHAR multipleAttrCN_W[] = { 'C','N','=','"','1','+','2','"',0 }
static

Definition at line 567 of file str.c.

Referenced by test_CertNameToStrW().

◆ namesA

const struct StrToNameA namesA[]
static
Initial value:
= {
{ "CN=1", sizeof(encodedSimpleCN), encodedSimpleCN },
{ "CN=\"1\"", sizeof(encodedSimpleCN), encodedSimpleCN },
{ "CN = \"1\"", sizeof(encodedSimpleCN), encodedSimpleCN },
{ "CN=\" 1 \"", sizeof(encodedSpacedCN), encodedSpacedCN },
{ "CN=\"\"\"1\"\"\"", sizeof(encodedQuotedCN), encodedQuotedCN },
{ "CN=\"1+2\"", sizeof(encodedMultipleAttrCN), encodedMultipleAttrCN },
{ "CN=\"a,b\"", sizeof(encodedCommaCN), encodedCommaCN },
{ "CN=\"a=b\"", sizeof(encodedEqualCN), encodedEqualCN },
{ "CN=\"<\"", sizeof(encodedLessThanCN), encodedLessThanCN },
{ "CN=\">\"", sizeof(encodedGreaterThanCN), encodedGreaterThanCN },
{ "CN=\"#\"", sizeof(encodedHashCN), encodedHashCN },
{ "CN=\";\"", sizeof(encodedSemiCN), encodedSemiCN },
{ "CN=dummy,T=test", sizeof(encodedDummyCN), encodedDummyCN },
{ " CN = Wine Test,T = 123, C = BR", sizeof(encodedFields), encodedFields },
}
static BYTE encodedDummyCN[]
Definition: str.c:421
static BYTE encodedFields[]
Definition: str.c:425

Definition at line 712 of file str.c.

Referenced by test_CertStrToNameA().

◆ namesW

const struct StrToNameW namesW[]
static
Initial value:
= {
}
static const BYTE encodedJapaneseCN[]
Definition: str.c:825
static const WCHAR simpleCN3_W[]
Definition: str.c:819
static const WCHAR encodedFields_W[]
Definition: str.c:822
static const WCHAR japaneseCN_W[]
Definition: str.c:820
static const WCHAR simpleCN2_W[]
Definition: str.c:818
static const WCHAR dummyCN_W[]
Definition: str.c:821

Definition at line 828 of file str.c.

Referenced by test_CertStrToNameW(), and test_StdRegProv().

◆ newlineCN_W

const WCHAR newlineCN_W[] = { 'C','N','=','"','a','\n','b','"',0 }
static

Definition at line 581 of file str.c.

Referenced by test_CertNameToStrW().

◆ pbEncoded

static LPCWSTR DWORD void BYTE * pbEncoded

Definition at line 196 of file str.c.

Referenced by CertCreateContext(), CertStrToNameA(), CertStrToNameW(), CRYPT_AsnDecodeAccessDescription(), CRYPT_AsnDecodeAlgorithmId(), CRYPT_AsnDecodeAltName(), CRYPT_AsnDecodeAltNameEntry(), CRYPT_AsnDecodeAltNameInternal(), CRYPT_AsnDecodeArray(), CRYPT_AsnDecodeAttributeTypeValue(), CRYPT_AsnDecodeAuthorityInfoAccess(), CRYPT_AsnDecodeAuthorityKeyId(), CRYPT_AsnDecodeAuthorityKeyId2(), CRYPT_AsnDecodeBasicConstraints(), CRYPT_AsnDecodeBasicConstraints2(), CRYPT_AsnDecodeBits(), CRYPT_AsnDecodeBitsInternal(), CRYPT_AsnDecodeBitsSwapBytes(), CRYPT_AsnDecodeBMPString(), CRYPT_AsnDecodeBool(), CRYPT_AsnDecodeCert(), CRYPT_AsnDecodeCertExtensions(), CRYPT_AsnDecodeCertExtensionsInternal(), CRYPT_AsnDecodeCertInfo(), CRYPT_AsnDecodeCertPolicies(), CRYPT_AsnDecodeCertPolicy(), CRYPT_AsnDecodeCertPolicyConstraints(), CRYPT_AsnDecodeCertPolicyMapping(), CRYPT_AsnDecodeCertPolicyMappings(), CRYPT_AsnDecodeCertSignedContent(), CRYPT_AsnDecodeCertVersion(), CRYPT_AsnDecodeChoiceOfTime(), CRYPT_AsnDecodeChoiceOfTimeInternal(), CRYPT_AsnDecodeCMSCertEncoded(), CRYPT_AsnDecodeCMSCrlEncoded(), CRYPT_AsnDecodeCMSSignedInfo(), CRYPT_AsnDecodeCMSSignerId(), CRYPT_AsnDecodeCMSSignerInfo(), CRYPT_AsnDecodeCMSSignerInfoInternal(), CRYPT_AsnDecodeCopyBytes(), CRYPT_AsnDecodeCRL(), CRYPT_AsnDecodeCRLDistPoints(), CRYPT_AsnDecodeCRLEntries(), CRYPT_AsnDecodeCRLEntry(), CRYPT_AsnDecodeCRLEntryExtensions(), CRYPT_AsnDecodeCRLExtensions(), CRYPT_AsnDecodeCRLExtensionsInternal(), CRYPT_AsnDecodeCRLInfo(), CRYPT_AsnDecodeCTL(), CRYPT_AsnDecodeCTLEntries(), CRYPT_AsnDecodeCTLEntry(), CRYPT_AsnDecodeCTLEntryAttributes(), CRYPT_AsnDecodeCTLExtensions(), CRYPT_AsnDecodeCTLExtensionsInternal(), CRYPT_AsnDecodeCTLUsage(), CRYPT_AsnDecodeDerBlob(), CRYPT_AsnDecodeDistPoint(), CRYPT_AsnDecodeDistPointName(), CRYPT_AsnDecodeEccSignature(), CRYPT_AsnDecodeEncryptedContentInfo(), CRYPT_AsnDecodeEnhancedKeyUsage(), CRYPT_AsnDecodeEnumerated(), CRYPT_AsnDecodeExcludedSubtree(), CRYPT_AsnDecodeExtension(), CRYPT_AsnDecodeExtensions(), CRYPT_AsnDecodeGeneralizedTime(), CRYPT_AsnDecodeIA5String(), CRYPT_AsnDecodeInhibitMapping(), CRYPT_AsnDecodeInt(), CRYPT_AsnDecodeInteger(), CRYPT_AsnDecodeIntegerInternal(), CRYPT_AsnDecodeIntInternal(), CRYPT_AsnDecodeIssuerSerialNumber(), CRYPT_AsnDecodeIssuingDistPoint(), CRYPT_AsnDecodeMaximum(), CRYPT_AsnDecodeName(), CRYPT_AsnDecodeNameConstraints(), CRYPT_AsnDecodeNameValue(), CRYPT_AsnDecodeNameValueInternal(), CRYPT_AsnDecodeNoticeNumbers(), CRYPT_AsnDecodeNoticeReference(), CRYPT_AsnDecodeObjectIdentifier(), CRYPT_AsnDecodeOctets(), CRYPT_AsnDecodeOctetString(), CRYPT_AsnDecodeOid(), CRYPT_AsnDecodeOidIgnoreTag(), CRYPT_AsnDecodeOidInternal(), CRYPT_AsnDecodePathLenConstraint(), CRYPT_AsnDecodePermittedSubtree(), CRYPT_AsnDecodePKCSAttribute(), CRYPT_AsnDecodePKCSAttributeInternal(), CRYPT_AsnDecodePKCSAttributes(), CRYPT_AsnDecodePKCSAttributesInternal(), CRYPT_AsnDecodePKCSAttributeValue(), CRYPT_AsnDecodePKCSContent(), CRYPT_AsnDecodePKCSContentInfo(), CRYPT_AsnDecodePKCSContentInfoInternal(), CRYPT_AsnDecodePKCSDigestedData(), CRYPT_AsnDecodePKCSEnvelopedData(), CRYPT_AsnDecodePKCSSignerInfo(), CRYPT_AsnDecodePKCSSignerInfoInternal(), CRYPT_AsnDecodePolicyQualifier(), CRYPT_AsnDecodePolicyQualifiers(), CRYPT_AsnDecodePolicyQualifierUserNotice(), CRYPT_AsnDecodePolicyQualifierUserNoticeInternal(), CRYPT_AsnDecodeProgramName(), CRYPT_AsnDecodePubKeyInfo(), CRYPT_AsnDecodePubKeyInfoInternal(), CRYPT_AsnDecodeRdn(), CRYPT_AsnDecodeRdnAttr(), CRYPT_AsnDecodeRecipientInfo(), CRYPT_AsnDecodeRequireExplicit(), CRYPT_AsnDecodeRsaPrivKey(), CRYPT_AsnDecodeRsaPubKey(), CRYPT_AsnDecodeSequence(), CRYPT_AsnDecodeSequenceItems(), CRYPT_AsnDecodeSequenceOfAny(), CRYPT_AsnDecodeSMIMECapabilities(), CRYPT_AsnDecodeSMIMECapability(), CRYPT_AsnDecodeSPCDigest(), CRYPT_AsnDecodeSPCLinkInternal(), CRYPT_AsnDecodeSPCLinkPointer(), CRYPT_AsnDecodeSubtree(), CRYPT_AsnDecodeSubtreeConstraints(), CRYPT_AsnDecodeTimeZone(), CRYPT_AsnDecodeUnicodeName(), CRYPT_AsnDecodeUnicodeNameValue(), CRYPT_AsnDecodeUnicodeNameValueInternal(), CRYPT_AsnDecodeUnicodeRdn(), CRYPT_AsnDecodeUnicodeRdnAttr(), CRYPT_AsnDecodeUnicodeString(), CRYPT_AsnDecodeUnsignedInteger(), CRYPT_AsnDecodeUnsignedIntegerInternal(), CRYPT_AsnDecodeUtcTime(), CRYPT_AsnDecodeUtcTimeInternal(), CRYPT_AsnDecodeValidity(), CRYPT_AsnEncodeAccessDescription(), CRYPT_AsnEncodeAlgorithmId(), CRYPT_AsnEncodeAlgorithmIdWithNullParams(), CRYPT_AsnEncodeAltName(), CRYPT_AsnEncodeAltNameEntry(), CRYPT_AsnEncodeAttributeTypeValue(), CRYPT_AsnEncodeAuthorityInfoAccess(), CRYPT_AsnEncodeAuthorityKeyId(), CRYPT_AsnEncodeAuthorityKeyId2(), CRYPT_AsnEncodeBasicConstraints(), CRYPT_AsnEncodeBasicConstraints2(), CRYPT_AsnEncodeBits(), CRYPT_AsnEncodeBitsSwapBytes(), CRYPT_AsnEncodeBMPString(), CRYPT_AsnEncodeBool(), CRYPT_AsnEncodeCert(), CRYPT_AsnEncodeCertInfo(), CRYPT_AsnEncodeCertPolicies(), CRYPT_AsnEncodeCertPolicy(), CRYPT_AsnEncodeCertPolicyConstraints(), CRYPT_AsnEncodeCertPolicyMapping(), CRYPT_AsnEncodeCertPolicyMappings(), CRYPT_AsnEncodeCertPolicyQualifiers(), CRYPT_AsnEncodeCertVersion(), CRYPT_AsnEncodeChoiceOfTime(), CRYPT_AsnEncodeCMSSignerInfo(), CRYPT_AsnEncodeConstructed(), CRYPT_AsnEncodeCRLDistPoints(), CRYPT_AsnEncodeCRLEntries(), CRYPT_AsnEncodeCRLEntry(), CRYPT_AsnEncodeCRLInfo(), CRYPT_AsnEncodeCRLVersion(), CRYPT_AsnEncodeCTL(), CRYPT_AsnEncodeCTLEntries(), CRYPT_AsnEncodeCTLEntry(), CRYPT_AsnEncodeCTLSubjectAlgorithm(), CRYPT_AsnEncodeCTLVersion(), CRYPT_AsnEncodeDistPoint(), CRYPT_AsnEncodeEncryptedContentInfo(), CRYPT_AsnEncodeEnhancedKeyUsage(), CRYPT_AsnEncodeEnumerated(), CRYPT_AsnEncodeExtension(), CRYPT_AsnEncodeExtensions(), CRYPT_AsnEncodeGeneralizedTime(), CRYPT_AsnEncodeGeneralSubtree(), CRYPT_AsnEncodeIA5String(), CRYPT_AsnEncodeInt(), CRYPT_AsnEncodeInteger(), CRYPT_AsnEncodeIssuerSerialNumber(), CRYPT_AsnEncodeIssuingDistPoint(), CRYPT_AsnEncodeName(), CRYPT_AsnEncodeNameConstraints(), CRYPT_AsnEncodeNameValue(), CRYPT_AsnEncodeNoticeNumbers(), CRYPT_AsnEncodeNoticeReference(), CRYPT_AsnEncodeNumericString(), CRYPT_AsnEncodeOctets(), CRYPT_AsnEncodeOid(), CRYPT_AsnEncodeOrCopyUnicodeNameValue(), CRYPT_AsnEncodePKCSAttribute(), CRYPT_AsnEncodePKCSAttributes(), CRYPT_AsnEncodePKCSContentInfo(), CRYPT_AsnEncodePKCSContentInfoInternal(), CRYPT_AsnEncodePKCSSignerInfo(), CRYPT_AsnEncodePolicyQualifierUserNotice(), CRYPT_AsnEncodePrintableString(), CRYPT_AsnEncodePubKeyInfo(), CRYPT_AsnEncodePubKeyInfoNoNull(), CRYPT_AsnEncodeRdn(), CRYPT_AsnEncodeRdnAttr(), CRYPT_AsnEncodeRecipientInfo(), CRYPT_AsnEncodeRsaPubKey(), CRYPT_AsnEncodeSequence(), CRYPT_AsnEncodeSequenceOfAny(), CRYPT_AsnEncodeSMIMECapabilities(), CRYPT_AsnEncodeSMIMECapability(), CRYPT_AsnEncodeSPCDigest(), CRYPT_AsnEncodeStringCoerce(), CRYPT_AsnEncodeSwapTag(), CRYPT_AsnEncodeUnicodeName(), CRYPT_AsnEncodeUnicodeNameValue(), CRYPT_AsnEncodeUnicodeStringCoerce(), CRYPT_AsnEncodeUniversalString(), CRYPT_AsnEncodeUnsignedInteger(), CRYPT_AsnEncodeUtcTime(), CRYPT_AsnEncodeUTF8String(), CRYPT_AsnEncodeValidity(), CRYPT_CopyEncodedBlob(), CRYPT_DecodeRecipientInfoArray(), CRYPT_DecodeSignerArray(), CRYPT_DEREncodeItemsAsSet(), CRYPT_DEREncodeSet(), CRYPT_EncodeContentLength(), CRYPT_EncodeEnsureSpace(), CRYPT_EncodeLen(), CRYPT_FindEncodedLen(), CRYPT_FormatAltName(), CRYPT_FormatAuthorityInfoAccess(), CRYPT_FormatAuthorityKeyId2(), CRYPT_FormatBasicConstraints2(), CRYPT_FormatCPS(), CRYPT_FormatCRLDistPoints(), CRYPT_FormatEnhancedKeyUsage(), CRYPT_FormatHexString(), CRYPT_FormatKeyUsage(), CRYPT_FormatNetscapeCertType(), CRYPT_FormatSpcFinancialCriteria(), CRYPT_FormatUnicodeString(), CRYPT_FormatUserNotice(), CRYPT_GetLen(), CRYPT_GetLengthIndefinite(), CryptDecodeObject(), CryptDecodeObjectEx(), CryptEncodeObject(), CryptFormatObject(), CryptHashCertificate(), CryptHashToBeSigned(), CryptMsgEncodeAndSignCTL(), CryptMsgSignCTL(), CryptSignAndEncodeCertificate(), CryptVerifyCertificateSignature(), FormatVerisignExtension(), test_format_object(), WVTAsn1CatMemberInfoDecode(), WVTAsn1CatMemberInfoEncode(), WVTAsn1CatNameValueDecode(), WVTAsn1CatNameValueEncode(), WVTAsn1SpcFinancialCriteriaInfoDecode(), WVTAsn1SpcFinancialCriteriaInfoEncode(), WVTAsn1SpcIndirectDataContentDecode(), WVTAsn1SpcIndirectDataContentEncode(), WVTAsn1SpcLinkDecode(), WVTAsn1SpcLinkEncode(), WVTAsn1SpcPeImageDataDecode(), WVTAsn1SpcPeImageDataEncode(), WVTAsn1SpcSpOpusInfoDecode(), and WVTAsn1SpcSpOpusInfoEncode().

◆ pcbEncoded

static LPCWSTR DWORD void BYTE DWORD * pcbEncoded

Definition at line 197 of file str.c.

Referenced by CertStrToNameA(), CertStrToNameW(), CRYPT_AsnEncodeAccessDescription(), CRYPT_AsnEncodeAlgorithmId(), CRYPT_AsnEncodeAlgorithmIdWithNullParams(), CRYPT_AsnEncodeAltName(), CRYPT_AsnEncodeAltNameEntry(), CRYPT_AsnEncodeAttributeTypeValue(), CRYPT_AsnEncodeAuthorityInfoAccess(), CRYPT_AsnEncodeAuthorityKeyId(), CRYPT_AsnEncodeAuthorityKeyId2(), CRYPT_AsnEncodeBasicConstraints(), CRYPT_AsnEncodeBasicConstraints2(), CRYPT_AsnEncodeBits(), CRYPT_AsnEncodeBitsSwapBytes(), CRYPT_AsnEncodeBMPString(), CRYPT_AsnEncodeBool(), CRYPT_AsnEncodeCert(), CRYPT_AsnEncodeCertInfo(), CRYPT_AsnEncodeCertPolicies(), CRYPT_AsnEncodeCertPolicy(), CRYPT_AsnEncodeCertPolicyConstraints(), CRYPT_AsnEncodeCertPolicyMapping(), CRYPT_AsnEncodeCertPolicyMappings(), CRYPT_AsnEncodeCertPolicyQualifiers(), CRYPT_AsnEncodeCertVersion(), CRYPT_AsnEncodeChoiceOfTime(), CRYPT_AsnEncodeCMSSignerInfo(), CRYPT_AsnEncodeConstructed(), CRYPT_AsnEncodeCRLDistPoints(), CRYPT_AsnEncodeCRLEntries(), CRYPT_AsnEncodeCRLEntry(), CRYPT_AsnEncodeCRLInfo(), CRYPT_AsnEncodeCRLVersion(), CRYPT_AsnEncodeCTL(), CRYPT_AsnEncodeCTLEntries(), CRYPT_AsnEncodeCTLEntry(), CRYPT_AsnEncodeCTLSubjectAlgorithm(), CRYPT_AsnEncodeCTLVersion(), CRYPT_AsnEncodeDistPoint(), CRYPT_AsnEncodeEncryptedContentInfo(), CRYPT_AsnEncodeEnhancedKeyUsage(), CRYPT_AsnEncodeEnumerated(), CRYPT_AsnEncodeExtension(), CRYPT_AsnEncodeExtensions(), CRYPT_AsnEncodeGeneralizedTime(), CRYPT_AsnEncodeGeneralSubtree(), CRYPT_AsnEncodeIA5String(), CRYPT_AsnEncodeInt(), CRYPT_AsnEncodeInteger(), CRYPT_AsnEncodeIssuerSerialNumber(), CRYPT_AsnEncodeIssuingDistPoint(), CRYPT_AsnEncodeName(), CRYPT_AsnEncodeNameConstraints(), CRYPT_AsnEncodeNameValue(), CRYPT_AsnEncodeNoticeNumbers(), CRYPT_AsnEncodeNoticeReference(), CRYPT_AsnEncodeNumericString(), CRYPT_AsnEncodeOctets(), CRYPT_AsnEncodeOid(), CRYPT_AsnEncodeOrCopyUnicodeNameValue(), CRYPT_AsnEncodePKCSAttribute(), CRYPT_AsnEncodePKCSAttributes(), CRYPT_AsnEncodePKCSContentInfo(), CRYPT_AsnEncodePKCSContentInfoInternal(), CRYPT_AsnEncodePKCSSignerInfo(), CRYPT_AsnEncodePolicyQualifierUserNotice(), CRYPT_AsnEncodePrintableString(), CRYPT_AsnEncodePubKeyInfo(), CRYPT_AsnEncodePubKeyInfoNoNull(), CRYPT_AsnEncodeRdn(), CRYPT_AsnEncodeRdnAttr(), CRYPT_AsnEncodeRecipientInfo(), CRYPT_AsnEncodeRsaPubKey(), CRYPT_AsnEncodeSequence(), CRYPT_AsnEncodeSequenceOfAny(), CRYPT_AsnEncodeSMIMECapabilities(), CRYPT_AsnEncodeSMIMECapability(), CRYPT_AsnEncodeSPCDigest(), CRYPT_AsnEncodeStringCoerce(), CRYPT_AsnEncodeSwapTag(), CRYPT_AsnEncodeUnicodeName(), CRYPT_AsnEncodeUnicodeNameValue(), CRYPT_AsnEncodeUnicodeStringCoerce(), CRYPT_AsnEncodeUniversalString(), CRYPT_AsnEncodeUnsignedInteger(), CRYPT_AsnEncodeUtcTime(), CRYPT_AsnEncodeUTF8String(), CRYPT_AsnEncodeValidity(), CRYPT_CopyEncodedBlob(), CRYPT_DEREncodeItemsAsSet(), CRYPT_DEREncodeSet(), CRYPT_EncodeContentLength(), CRYPT_EncodeEnsureSpace(), CRYPT_EncodeLen(), CryptEncodeObject(), CryptEncodeObjectEx(), CryptMsgEncodeAndSignCTL(), CryptMsgSignCTL(), CryptSignAndEncodeCertificate(), WVTAsn1CatMemberInfoEncode(), WVTAsn1CatNameValueEncode(), WVTAsn1SpcFinancialCriteriaInfoEncode(), WVTAsn1SpcIndirectDataContentEncode(), WVTAsn1SpcLinkEncode(), WVTAsn1SpcPeImageDataEncode(), and WVTAsn1SpcSpOpusInfoEncode().

◆ PCERT_RDN_VALUE_BLOB

Definition at line 191 of file str.c.

◆ ppszError

◆ pszX500

static LPCWSTR pszX500

Definition at line 196 of file str.c.

Referenced by CertStrToNameA(), and CertStrToNameW().

◆ pvReserved

◆ quotedCN_W

const WCHAR quotedCN_W[] = { 'C','N','=','"','"','"','1','"','"','"',0 }
static

Definition at line 565 of file str.c.

Referenced by test_CertNameToStrW().

◆ semiCN_W

const WCHAR semiCN_W[] = { 'C','N','=','"',';','"',0 }
static

Definition at line 579 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleCN2_W

const WCHAR simpleCN2_W[] = { 'C','N','=','"','1','"',0 }
static

Definition at line 818 of file str.c.

◆ simpleCN3_W

const WCHAR simpleCN3_W[] = { 'C','N',' ','=',' ','"','1','"',0 }
static

Definition at line 819 of file str.c.

◆ simpleCN_W

const WCHAR simpleCN_W[] = { 'C','N','=','1',0 }
static

Definition at line 560 of file str.c.

Referenced by test_CertNameToStrW(), and test_CertStrToNameW().

◆ simpleCommaCN_W

const WCHAR simpleCommaCN_W[] = { '"','a',',','b','"',0 }
static

Definition at line 570 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleEqualCN_W

const WCHAR simpleEqualCN_W[] = { '"','a','=','b','"',0 }
static

Definition at line 572 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleGreaterThanCN_W

const WCHAR simpleGreaterThanCN_W[] = { '"','>','"',0 }
static

Definition at line 576 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleHashCN_W

const WCHAR simpleHashCN_W[] = { '"','#','"',0 }
static

Definition at line 578 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleLessThanCN_W

const WCHAR simpleLessThanCN_W[] = { '"','<','"',0 }
static

Definition at line 574 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleMultipleAttrCN_W

const WCHAR simpleMultipleAttrCN_W[] = { '"','1','+','2','"',0 }
static

Definition at line 568 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleNewlineCN_W

const WCHAR simpleNewlineCN_W[] = { '"','a','\n','b','"',0 }
static

Definition at line 582 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleQuotedCN_W

const WCHAR simpleQuotedCN_W[] = { '"','"','"','1','"','"','"',0 }
static

Definition at line 566 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleSemiCN_W

const WCHAR simpleSemiCN_W[] = { '"',';','"',0 }
static

Definition at line 580 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleSingleQuotedCN_W

const WCHAR simpleSingleQuotedCN_W[] = { '\'','1','\'',0 }
static

Definition at line 562 of file str.c.

Referenced by test_CertNameToStrW().

◆ simpleSpacedCN_W

const WCHAR simpleSpacedCN_W[] = { '"',' ','1',' ','"',0 }
static

Definition at line 564 of file str.c.

Referenced by test_CertNameToStrW().

◆ singledQuotedCN_W

const WCHAR singledQuotedCN_W[] = { 'C','N','=','\'','1','\'',0 }
static

Definition at line 561 of file str.c.

Referenced by test_CertNameToStrW().

◆ spacedCN_W

const WCHAR spacedCN_W[] = { 'C','N','=','"',' ','1',' ','"',0 }
static

Definition at line 563 of file str.c.

Referenced by test_CertNameToStrW().

◆ str

Definition at line 202 of file str.c.

◆ subjectStr

char subjectStr[]
static
Initial value:
=
"2.5.4.6=US, 2.5.4.8=Minnesota, 2.5.4.7=Minneapolis, 2.5.4.10=CodeWeavers, 2.5.4.11=Wine Development, 2.5.4.3=localhost, 1.2.840.113549.1.9.1=aric@codeweavers.com"

Definition at line 124 of file str.c.

Referenced by test_CertGetNameStringA(), and test_CertNameToStrA().

◆ subjectStrCRLF

char subjectStrCRLF[]
static
Initial value:
=
"2.5.4.6=US\r\n2.5.4.8=Minnesota\r\n2.5.4.7=Minneapolis\r\n2.5.4.10=CodeWeavers\r\n2.5.4.11=Wine Development\r\n2.5.4.3=localhost\r\n1.2.840.113549.1.9.1=aric@codeweavers.com"

Definition at line 128 of file str.c.

Referenced by test_CertNameToStrA().

◆ subjectStrCRLFW

WCHAR subjectStrCRLFW[]
static
Initial value:
= {
'2','.','5','.','4','.','6','=','U','S','\r','\n','2','.','5','.','4','.','8',
'=','M','i','n','n','e','s','o','t','a','\r','\n','2','.','5','.','4','.','7',
'=','M','i','n','n','e','a','p','o','l','i','s','\r','\n','2','.','5','.','4',
'.','1','0','=','C','o','d','e','W','e','a','v','e','r','s','\r','\n','2','.',
'5','.','4','.','1','1','=','W','i','n','e',' ','D','e','v','e','l','o','p',
'm','e','n','t','\r','\n','2','.','5','.','4','.','3','=','l','o','c','a','l',
'h','o','s','t','\r','\n','1','.','2','.','8','4','0','.','1','1','3','5','4',
'9','.','1','.','9','.','1','=','a','r','i','c','@','c','o','d','e','w','e',
'a','v','e','r','s','.','c','o','m',0 }

Definition at line 170 of file str.c.

Referenced by test_CertNameToStrW().

◆ subjectStrSemicolon

char subjectStrSemicolon[]
static
Initial value:
=
"2.5.4.6=US; 2.5.4.8=Minnesota; 2.5.4.7=Minneapolis; 2.5.4.10=CodeWeavers; 2.5.4.11=Wine Development; 2.5.4.3=localhost; 1.2.840.113549.1.9.1=aric@codeweavers.com"

Definition at line 126 of file str.c.

Referenced by test_CertNameToStrA().

◆ subjectStrSemicolonW

WCHAR subjectStrSemicolonW[]
static
Initial value:
= {
'2','.','5','.','4','.','6','=','U','S',';',' ','2','.','5','.','4','.','8',
'=','M','i','n','n','e','s','o','t','a',';',' ','2','.','5','.','4','.','7',
'=','M','i','n','n','e','a','p','o','l','i','s',';',' ','2','.','5','.','4',
'.','1','0','=','C','o','d','e','W','e','a','v','e','r','s',';',' ','2','.',
'5','.','4','.','1','1','=','W','i','n','e',' ','D','e','v','e','l','o','p',
'm','e','n','t',';',' ','2','.','5','.','4','.','3','=','l','o','c','a','l',
'h','o','s','t',';',' ','1','.','2','.','8','4','0','.','1','1','3','5','4',
'9','.','1','.','9','.','1','=','a','r','i','c','@','c','o','d','e','w','e',
'a','v','e','r','s','.','c','o','m',0 }

Definition at line 160 of file str.c.

Referenced by test_CertNameToStrW().

◆ subjectStrW

WCHAR subjectStrW[]
static
Initial value:
= {
'2','.','5','.','4','.','6','=','U','S',',',' ','2','.','5','.','4','.','8',
'=','M','i','n','n','e','s','o','t','a',',',' ','2','.','5','.','4','.','7',
'=','M','i','n','n','e','a','p','o','l','i','s',',',' ','2','.','5','.','4',
'.','1','0','=','C','o','d','e','W','e','a','v','e','r','s',',',' ','2','.',
'5','.','4','.','1','1','=','W','i','n','e',' ','D','e','v','e','l','o','p',
'm','e','n','t',',',' ','2','.','5','.','4','.','3','=','l','o','c','a','l',
'h','o','s','t',',',' ','1','.','2','.','8','4','0','.','1','1','3','5','4',
'9','.','1','.','9','.','1','=','a','r','i','c','@','c','o','d','e','w','e',
'a','v','e','r','s','.','c','o','m',0 }

Definition at line 150 of file str.c.

Referenced by test_CertNameToStrW().

◆ type

Definition at line 201 of file str.c.

◆ typePara

DWORD DWORD void* typePara

Definition at line 202 of file str.c.

◆ x500SubjectStr

char x500SubjectStr[] = "C=US, S=Minnesota, L=Minneapolis, O=CodeWeavers, OU=Wine Development, CN=localhost, E=aric@codeweavers.com"
static

Definition at line 130 of file str.c.

Referenced by test_CertNameToStrA().

◆ x500SubjectStrSemicolonReverse

char x500SubjectStrSemicolonReverse[] = "E=aric@codeweavers.com; CN=localhost; OU=Wine Development; O=CodeWeavers; L=Minneapolis; S=Minnesota; C=US"
static

Definition at line 131 of file str.c.

Referenced by test_CertNameToStrA().

◆ x500SubjectStrSemicolonReverseW

WCHAR x500SubjectStrSemicolonReverseW[]
static
Initial value:
= {
'E','=','a','r','i','c','@','c','o','d','e','w','e','a','v','e','r','s','.','c',
'o','m',';',' ','C','N','=','l','o','c','a','l','h','o','s','t',';',' ','O','U',
'=','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n','t',';',' ','O',
'=','C','o','d','e','W','e','a','v','e','r','s',';',' ','L','=','M','i','n','n',
'e','a','p','o','l','i','s',';',' ','S','=','M','i','n','n','e','s','o','t','a',
';',' ','C','=','U','S',0 }

Definition at line 180 of file str.c.

Referenced by test_CertNameToStrW().