783{
787
788 if (!cbEncoded)
789 {
792 }
795 {
796 static const WCHAR numFmt[] = {
'%',
'd',0 };
797 DWORD charsNeeded = 1;
799 DWORD headingSepLen, sepLen;
800 WCHAR policyNum[11], policyQualifierNum[11];
801 LPWSTR certPolicy, policyId, policyQualifierInfo, policyQualifierId;
803 DWORD certPolicyLen, policyIdLen, policyQualifierInfoLen;
804 DWORD policyQualifierIdLen, cpsLen, userNoticeLen, qualifierLen;
807
811 0);
815 (
LPWSTR)&policyQualifierId, 0);
822 {
825 }
826 else
827 {
830 }
832 headingSepLen =
lstrlenW(headingSep);
833
835 {
839
840 charsNeeded += 1;
841 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
845 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
846 {
849 }
850 charsNeeded += 1;
851 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
853 charsNeeded += certPolicyLen;
854 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
855 {
857 str += certPolicyLen;
858 }
859 charsNeeded += headingSepLen;
860 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
861 {
863 str += headingSepLen;
864 }
866 {
868 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
869 {
872 }
873 }
874 charsNeeded += policyIdLen;
875 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
876 {
879 }
881 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
882 {
886 }
887 charsNeeded += sepLen;
888 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
889 {
892 }
893 for (
j = 0;
j <
policy->cPolicyQualifier;
j++)
894 {
898
900 {
902 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
903 {
906 }
907 }
908 charsNeeded += 1;
909 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
912 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
913 {
916 }
917 charsNeeded += 1;
918 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
920 swprintf(policyQualifierNum, numFmt,
j + 1);
921 charsNeeded +=
lstrlenW(policyQualifierNum);
922 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
923 {
926 }
927 charsNeeded += 1;
928 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
930 charsNeeded += policyQualifierInfoLen;
931 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
932 {
934 policyQualifierInfoLen *
sizeof(
WCHAR));
935 str += policyQualifierInfoLen;
936 }
937 charsNeeded += headingSepLen;
938 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
939 {
941 str += headingSepLen;
942 }
944 {
946 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
947 {
952 }
953 }
954 charsNeeded += policyQualifierIdLen;
955 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
956 {
958 policyQualifierIdLen *
sizeof(
WCHAR));
959 str += policyQualifierIdLen;
960 }
963 {
964 charsNeeded += cpsLen;
965 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
966 {
969 }
970 }
973 {
974 charsNeeded += userNoticeLen;
975 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
976 {
978 str += userNoticeLen;
979 }
980 }
981 else
982 {
984 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
985 {
989 }
990 }
991 charsNeeded += sepLen;
992 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
993 {
996 }
998 {
1000 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
1001 {
1006 }
1007 }
1008 charsNeeded += qualifierLen;
1009 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
1010 {
1012 str += qualifierLen;
1013 }
1014 charsNeeded += headingSepLen;
1015 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
1016 {
1018 str += headingSepLen;
1019 }
1020
1021
1022
1023
1026 {
1027 if (!
str || *pcbFormat < charsNeeded *
sizeof(
WCHAR))
1028 {
1029
1034 charsNeeded +=
size - 1;
1035 }
1036 else
1037 {
1038 sizeRemaining = *pcbFormat /
sizeof(
WCHAR);
1039 sizeRemaining -=
str - (
LPWSTR)pbFormat;
1044 {
1045 charsNeeded += sizeRemaining - 1;
1046 str += sizeRemaining - 1;
1047 }
1048 }
1049 }
1052 {
1053 if (!
str || *pcbFormat < charsNeeded *
sizeof(
WCHAR))
1054 {
1055
1060 charsNeeded +=
size - 1;
1061 }
1062 else
1063 {
1064 sizeRemaining = *pcbFormat /
sizeof(
WCHAR);
1065 sizeRemaining -=
str - (
LPWSTR)pbFormat;
1070 {
1071 charsNeeded += sizeRemaining - 1;
1072 str += sizeRemaining - 1;
1073 }
1074 }
1075 }
1076 else
1077 {
1078 if (!
str || *pcbFormat < charsNeeded *
sizeof(
WCHAR))
1079 {
1080
1085 charsNeeded +=
size - 1;
1086 }
1087 else
1088 {
1089 sizeRemaining = *pcbFormat /
sizeof(
WCHAR);
1090 sizeRemaining -=
str - (
LPWSTR)pbFormat;
1095 {
1096 charsNeeded += sizeRemaining - 1;
1097 str += sizeRemaining - 1;
1098 }
1099 }
1100 }
1101 }
1102 }
1105 {
1106 if (!pbFormat)
1107 *pcbFormat = charsNeeded *
sizeof(
WCHAR);
1108 else if (*pcbFormat < charsNeeded *
sizeof(
WCHAR))
1109 {
1110 *pcbFormat = charsNeeded *
sizeof(
WCHAR);
1113 }
1114 else
1115 *pcbFormat = charsNeeded *
sizeof(
WCHAR);
1116 }
1117 }
1119}
int strcmp(const char *String1, const char *String2)
WINBASEAPI _Check_return_ _Out_ AppPolicyProcessTerminationMethod * policy
#define IDS_POLICY_QUALIFIER_INFO
#define IDS_POLICY_QUALIFIER_ID
static BOOL CRYPT_FormatCPS(DWORD dwCertEncodingType, DWORD dwFormatStrType, const BYTE *pbEncoded, DWORD cbEncoded, WCHAR *str, DWORD *pcchStr)
static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType, DWORD dwFormatStrType, const BYTE *pbEncoded, DWORD cbEncoded, WCHAR *str, DWORD *pcchStr)
static BOOL CRYPT_FormatHexString(const BYTE *pbEncoded, DWORD cbEncoded, WCHAR *str, DWORD *pcchStr)
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 GLint GLint j
static APTTYPEQUALIFIER * qualifier
CERT_POLICY_INFO * rgPolicyInfo
CRYPT_OBJID_BLOB Qualifier
LPSTR pszPolicyQualifierId
#define szOID_PKIX_POLICY_QUALIFIER_CPS
#define X509_CERT_POLICIES
#define szOID_PKIX_POLICY_QUALIFIER_USERNOTICE