143 #define CMP_VERSION 2
144 #ifdef USE_CMP_TRANSPORT
153 #define CMP_NONCE_SIZE 16
154 #define CMP_PW_ITERATIONS_CLIB 500
155 #define CMP_PW_ITERATIONS_OTHER 2000
156 #define CMP_MAX_PW_ITERATIONS 10000
160 #define CMP_CONTENT_TYPE "application/pkixcmp"
161 #define CMP_CONTENT_TYPE_LEN 19
166 #define CMP_HMAC_KEYSIZE 20
175 #define CMP_PFLAG_NONE 0x00
176 #define CMP_PFLAG_RETAINCONNECTION 0x01
177 #define CMP_PFLAG_CLIBIDSENT 0x02
178 #define CMP_PFLAG_USERIDSENT 0x04
179 #define CMP_PFLAG_CERTIDSENT 0x08
180 #define CMP_PFLAG_MACINFOSENT 0x10
181 #define CMP_PFLAG_PNPPKI 0x20
229 #define CMPFAILINFO_NONE 0x00000000L
230 #define CMPFAILINFO_OK 0x00000000L
231 #define CMPFAILINFO_BADALG 0x00000001L
232 #define CMPFAILINFO_BADMESSAGECHECK 0x00000002L
233 #define CMPFAILINFO_BADREQUEST 0x00000004L
234 #define CMPFAILINFO_BADTIME 0x00000008L
235 #define CMPFAILINFO_BADCERTID 0x00000010L
236 #define CMPFAILINFO_BADDATAFORMAT 0x00000020L
237 #define CMPFAILINFO_WRONGAUTHORITY 0x00000040L
238 #define CMPFAILINFO_INCORRECTDATA 0x00000080L
239 #define CMPFAILINFO_MISSINGTIMESTAMP 0x00000100L
240 #define CMPFAILINFO_BADPOP 0x00000200L
241 #define CMPFAILINFO_CERTREVOKED 0x00000400L
242 #define CMPFAILINFO_CERTCONFIRMED 0x00000800L
243 #define CMPFAILINFO_WRONGINTEGRITY 0x00001000L
244 #define CMPFAILINFO_BADRECIPIENTNONCE 0x00002000L
245 #define CMPFAILINFO_TIMENOTAVAILABLE 0x00004000L
246 #define CMPFAILINFO_UNACCEPTEDPOLICY 0x00008000L
247 #define CMPFAILINFO_UNACCEPTEDEXTENSION 0x00010000L
248 #define CMPFAILINFO_ADDINFONOTAVAILABLE 0x00020000L
249 #define CMPFAILINFO_BADSENDERNONCE 0x00040000L
250 #define CMPFAILINFO_BADCERTTEMPLATE 0x00080000L
251 #define CMPFAILINFO_SIGNERNOTTRUSTED 0x00100000L
252 #define CMPFAILINFO_TRANSACTIONIDINUSE 0x00200000L
253 #define CMPFAILINFO_UNSUPPORTEDVERSION 0x00400000L
254 #define CMPFAILINFO_NOTAUTHORIZED 0x00800000L
255 #define CMPFAILINFO_SYSTEMUNAVAIL 0x01000000L
256 #define CMPFAILINFO_SYSTEMFAILURE 0x02000000L
257 #define CMPFAILINFO_DUPLICATECERTREQ 0x04000000L
258 #define CMPFAILINFO_LAST 0x08000000L
262 #define CMP_INIT_FLAG_NONE 0x00
263 #define CMP_INIT_FLAG_USERID 0x01
264 #define CMP_INIT_FLAG_TRANSID 0x02
265 #define CMP_INIT_FLAG_MACINFO 0x04
266 #define CMP_INIT_FLAG_MACCTX 0x08
267 #define CMP_INIT_FLAG_ALL ( CMP_INIT_FLAG_USERID | \
268 CMP_INIT_FLAG_TRANSID | \
269 CMP_INIT_FLAG_MACINFO | \
270 CMP_INIT_FLAG_MACCTX )
271 #define CMP_INIT_FLAG_MAX 0x0F
275 #define OID_ENTRUST_MAC MKOID( "\x06\x09\x2A\x86\x48\x86\xF6\x7D\x07\x42\x0D" )
291 #define objSize( length ) ( ( int ) sizeofObject( length ) )
297 #if defined( __WIN32__ ) && !defined( NDEBUG )
298 #define DEBUG_DUMP_CMP( type, level, sessionInfo ) \
299 debugDumpCMP( type, level, sessionInfo )
306 #define DEBUG_DUMP_CMP( type, level, sessionInfo )
364 int userIDsize, transIDsize, certIDsize, senderNonceSize, recipNonceSize;
483 void initCMPserverProcessing(
SESSION_INFO *sessionInfoPtr );
485 void initCMPclientProcessing(
SESSION_INFO *sessionInfoPtr );
503 IN_BUFFER( passwordLength )
const void *password,
524 IN_BUFFER( messageLength )
const void *message,
534 IN_BUFFER( messageLength )
const void *message,
549 IN_ENUM_OPT( CMPFAILINFO )
const long pkiFailureInfo );
553 IN_ENUM_OPT( CMPFAILINFO )
const long pkiFailureInfo );