759{
763
764 if (!cbEncoded)
765 {
768 }
771 {
772 DWORD charsNeeded = 1;
774 DWORD headingSepLen, sepLen;
775 WCHAR policyNum[11], policyQualifierNum[11];
776 LPWSTR certPolicy, policyId, policyQualifierInfo, policyQualifierId;
778 DWORD certPolicyLen, policyIdLen, policyQualifierInfoLen;
779 DWORD policyQualifierIdLen, cpsLen, userNoticeLen, qualifierLen;
782
786 0);
790 (
LPWSTR)&policyQualifierId, 0);
797 {
798 headingSep =
L":\r\n";
800 }
801 else
802 {
805 }
807 headingSepLen =
lstrlenW(headingSep);
808
810 {
814
815 charsNeeded += 1;
816 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
820 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
821 {
824 }
825 charsNeeded += 1;
826 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
828 charsNeeded += certPolicyLen;
829 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
830 {
832 str += certPolicyLen;
833 }
834 charsNeeded += headingSepLen;
835 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
836 {
838 str += headingSepLen;
839 }
841 {
843 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
844 {
847 }
848 }
849 charsNeeded += policyIdLen;
850 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
851 {
854 }
856 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
857 {
861 }
862 charsNeeded += sepLen;
863 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
864 {
867 }
868 for (
j = 0;
j <
policy->cPolicyQualifier;
j++)
869 {
873
875 {
877 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
878 {
881 }
882 }
883 charsNeeded += 1;
884 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
887 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
888 {
891 }
892 charsNeeded += 1;
893 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
896 charsNeeded +=
lstrlenW(policyQualifierNum);
897 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
898 {
901 }
902 charsNeeded += 1;
903 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
905 charsNeeded += policyQualifierInfoLen;
906 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
907 {
909 policyQualifierInfoLen *
sizeof(
WCHAR));
910 str += policyQualifierInfoLen;
911 }
912 charsNeeded += headingSepLen;
913 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
914 {
916 str += headingSepLen;
917 }
919 {
921 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
922 {
927 }
928 }
929 charsNeeded += policyQualifierIdLen;
930 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
931 {
933 policyQualifierIdLen *
sizeof(
WCHAR));
934 str += policyQualifierIdLen;
935 }
938 {
939 charsNeeded += cpsLen;
940 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
941 {
944 }
945 }
948 {
949 charsNeeded += userNoticeLen;
950 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
951 {
953 str += userNoticeLen;
954 }
955 }
956 else
957 {
959 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
960 {
964 }
965 }
966 charsNeeded += sepLen;
967 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
968 {
971 }
973 {
975 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
976 {
981 }
982 }
983 charsNeeded += qualifierLen;
984 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
985 {
988 }
989 charsNeeded += headingSepLen;
990 if (
str && *pcbFormat >= charsNeeded *
sizeof(
WCHAR))
991 {
993 str += headingSepLen;
994 }
995
996
997
998
1001 {
1002 if (!
str || *pcbFormat < charsNeeded *
sizeof(
WCHAR))
1003 {
1004
1009 charsNeeded +=
size - 1;
1010 }
1011 else
1012 {
1013 sizeRemaining = *pcbFormat /
sizeof(
WCHAR);
1014 sizeRemaining -=
str - (
LPWSTR)pbFormat;
1019 {
1020 charsNeeded += sizeRemaining - 1;
1021 str += sizeRemaining - 1;
1022 }
1023 }
1024 }
1027 {
1028 if (!
str || *pcbFormat < charsNeeded *
sizeof(
WCHAR))
1029 {
1030
1035 charsNeeded +=
size - 1;
1036 }
1037 else
1038 {
1039 sizeRemaining = *pcbFormat /
sizeof(
WCHAR);
1040 sizeRemaining -=
str - (
LPWSTR)pbFormat;
1045 {
1046 charsNeeded += sizeRemaining - 1;
1047 str += sizeRemaining - 1;
1048 }
1049 }
1050 }
1051 else
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 }
1077 }
1080 {
1081 if (!pbFormat)
1082 *pcbFormat = charsNeeded *
sizeof(
WCHAR);
1083 else if (*pcbFormat < charsNeeded *
sizeof(
WCHAR))
1084 {
1085 *pcbFormat = charsNeeded *
sizeof(
WCHAR);
1088 }
1089 else
1090 *pcbFormat = charsNeeded *
sizeof(
WCHAR);
1091 }
1092 }
1094}
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)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
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