49
50 /*
51 * Multi-platform definitions
52 */
53 #ifdef __linux__
54 #define B_FALSE FALSE
55 #define B_TRUE TRUE
56 typedef unsigned char uint8_t;
57 typedef unsigned long ulong_t;
58 typedef enum { B_FALSE, B_TRUE } boolean_t;
59 #endif /* __linux__ */
60
61 #ifdef _ALLBSD_SOURCE
62 #include <stdint.h>
63 #define B_FALSE FALSE
64 #define B_TRUE TRUE
65 typedef unsigned long ulong_t;
66 typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
67 #endif /* _ALLBSD_SOURCE */
68
69 #ifdef _WIN32
70 typedef unsigned char uint8_t;
71 typedef unsigned long ulong_t;
72 typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
73 #define strdup _strdup /* Replace POSIX name with ISO C++ name */
74 #endif /* _WIN32 */
75
76 #ifndef _KERNEL
77 #include <stdlib.h>
78 #endif /* _KERNEL */
79
80 #define EC_MAX_DIGEST_LEN 1024 /* max digest that can be signed */
81 #define EC_MAX_POINT_LEN 145 /* max len of DER encoded Q */
82 #define EC_MAX_VALUE_LEN 72 /* max len of ANSI X9.62 private value d */
83 #define EC_MAX_SIG_LEN 144 /* max signature len for supported curves */
84 #define EC_MIN_KEY_LEN 112 /* min key length in bits */
85 #define EC_MAX_KEY_LEN 571 /* max key length in bits */
86 #define EC_MAX_OID_LEN 10 /* max length of OID buffer */
87
88 /*
|
49
50 /*
51 * Multi-platform definitions
52 */
53 #ifdef __linux__
54 #define B_FALSE FALSE
55 #define B_TRUE TRUE
56 typedef unsigned char uint8_t;
57 typedef unsigned long ulong_t;
58 typedef enum { B_FALSE, B_TRUE } boolean_t;
59 #endif /* __linux__ */
60
61 #ifdef _ALLBSD_SOURCE
62 #include <stdint.h>
63 #define B_FALSE FALSE
64 #define B_TRUE TRUE
65 typedef unsigned long ulong_t;
66 typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
67 #endif /* _ALLBSD_SOURCE */
68
69 #ifdef AIX
70 #define B_FALSE FALSE
71 #define B_TRUE TRUE
72 typedef unsigned char uint8_t;
73 typedef unsigned long ulong_t;
74 #endif /* AIX */
75
76 #ifdef _WIN32
77 typedef unsigned char uint8_t;
78 typedef unsigned long ulong_t;
79 typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
80 #define strdup _strdup /* Replace POSIX name with ISO C++ name */
81 #endif /* _WIN32 */
82
83 #ifndef _KERNEL
84 #include <stdlib.h>
85 #endif /* _KERNEL */
86
87 #define EC_MAX_DIGEST_LEN 1024 /* max digest that can be signed */
88 #define EC_MAX_POINT_LEN 145 /* max len of DER encoded Q */
89 #define EC_MAX_VALUE_LEN 72 /* max len of ANSI X9.62 private value d */
90 #define EC_MAX_SIG_LEN 144 /* max signature len for supported curves */
91 #define EC_MIN_KEY_LEN 112 /* min key length in bits */
92 #define EC_MAX_KEY_LEN 571 /* max key length in bits */
93 #define EC_MAX_OID_LEN 10 /* max length of OID buffer */
94
95 /*
|