| RSA BSAFE Cert-C |
Certificate Components for C |
| Crypto-C 6.2.1 Developer's Guide | ||
| Search |
00001 /* $Id: aglobal.h,v 1.9 2004/12/02 02:11:31 tdo Exp $ */
00002 /*
00003 * Copyright (C) 1998-2004 RSA Security Inc. All rights reserved.
00004 *
00005 * This work contains proprietary information of RSA Security.
00006 * Distribution is limited to authorized licensees of RSA
00007 * Security. Any unauthorized reproduction, distribution or
00008 * modification of this work is strictly prohibited.
00009 */
00010
00015 #ifndef _AGLOBAL_H_
00016 #define _AGLOBAL_H_ 1
00017
00018 #include "bsfmacro.h"
00019 #include "bsfplatf.h"
00020
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024
00025 /* Defines a generic pointer type */
00027 typedef unsigned char *POINTER;
00028
00029 /* Defines a two-Byte word */
00031 typedef unsigned short int UINT2;
00032
00036 typedef struct {
00037 unsigned char *data;
00038 unsigned int len;
00039 } ITEM;
00040
00059 typedef struct {
00060 int (RSA_CALLING_CONV *Surrender) PROTO_LIST ((POINTER));
00061 POINTER handle;
00062 POINTER reserved;
00063 } A_SURRENDER_CTX;
00064
00065 /* Defines a four-Byte word */
00066 #if RSA_REGISTER_SIZE == RSA_16_BIT_REGISTER || \
00067 RSA_REGISTER_SIZE == RSA_32_BIT_REGISTER
00068
00069 typedef unsigned long int UINT4;
00070 #endif
00071 #if RSA_REGISTER_SIZE == RSA_64_BIT_REGISTER
00072 typedef unsigned int UINT4;
00073 #ifndef NULL_PTR
00074 #define NULL_PTR ((POINTER)0L)
00075 #endif
00076 #ifndef SIGNED_NULL_PTR
00077 #define SIGNED_NULL_PTR ((char*)0L)
00078 #endif
00079 #ifdef __cplusplus
00080 #define NULL_FUNCTION_PTR (0L)
00081 #else
00082 #define NULL_FUNCTION_PTR ((void *)0L)
00083 #endif
00084 #else
00085 #ifndef NULL_PTR
00086 #define NULL_PTR ((POINTER)0)
00087 #endif
00088 #ifndef SIGNED_NULL_PTR
00089 #define SIGNED_NULL_PTR ((char*)0)
00090 #endif
00091 #ifdef __cplusplus
00092 #define NULL_FUNCTION_PTR (0)
00093 #else
00094 #define NULL_FUNCTION_PTR ((void *)0)
00095 #endif
00096 #endif
00097
00098 #define UNUSED_ARG(x) x = *(&x);
00099
00100 #if RSA_TIME_TYPE == RSA_32_BIT_TIME
00101 typedef UINT4 RSA_TIME_T;
00102 #endif
00103
00104 /* Token flags (see B_KEY_ATTRIBUTES)
00105 */
00106 #define TF_RESIDE_ON_TOKEN 0x0001
00107 #define TF_PRIVATE 0x0002
00108
00109 /* Key usage flags: used by both Crypto-C and Cert-C
00110 */
00111 #define CF_DIGITAL_SIGNATURE 0x0100
00112 #define CF_NON_REPUDIATION 0x0080
00113 #define CF_KEY_ENCIPHERMENT 0x0040
00114 #define CF_DATA_ENCIPHERMENT 0x0020
00115 #define CF_KEY_AGREEMENT 0x0010
00116 #define CF_KEY_CERT_SIGN 0x0008
00117 #define CF_CRL_SIGN 0x0004
00118 #define CF_ENCIPHER_ONLY 0x0002
00119 #define CF_DECIPHER_ONLY 0x0001
00120
00121 #ifdef __cplusplus
00122 }
00123 #endif
00124
00125 #endif /* end _AGLOBAL_H_ */