| 1 |
/* Generated from ./pkcs9.asn1 */ |
| 2 |
/* Do not edit */ |
| 3 |
|
| 4 |
#ifndef __pkcs9_asn1_h__ |
| 5 |
#define __pkcs9_asn1_h__ |
| 6 |
|
| 7 |
#include <stddef.h> |
| 8 |
#include <time.h> |
| 9 |
|
| 10 |
#ifndef __asn1_common_definitions__ |
| 11 |
#define __asn1_common_definitions__ |
| 12 |
|
| 13 |
#ifndef __HEIM_BASE_DATA__ |
| 14 |
#define __HEIM_BASE_DATA__ 1 |
| 15 |
struct heim_base_data { |
| 16 |
size_t length; |
| 17 |
void *data; |
| 18 |
}; |
| 19 |
typedef struct heim_base_data heim_octet_string; |
| 20 |
#endif |
| 21 |
|
| 22 |
typedef struct heim_integer { |
| 23 |
size_t length; |
| 24 |
void *data; |
| 25 |
int negative; |
| 26 |
} heim_integer; |
| 27 |
|
| 28 |
typedef char *heim_general_string; |
| 29 |
|
| 30 |
typedef char *heim_utf8_string; |
| 31 |
|
| 32 |
typedef struct heim_base_data heim_printable_string; |
| 33 |
|
| 34 |
typedef struct heim_base_data heim_ia5_string; |
| 35 |
|
| 36 |
typedef struct heim_bmp_string { |
| 37 |
size_t length; |
| 38 |
uint16_t *data; |
| 39 |
} heim_bmp_string; |
| 40 |
|
| 41 |
typedef struct heim_universal_string { |
| 42 |
size_t length; |
| 43 |
uint32_t *data; |
| 44 |
} heim_universal_string; |
| 45 |
|
| 46 |
typedef char *heim_visible_string; |
| 47 |
|
| 48 |
typedef struct heim_oid { |
| 49 |
size_t length; |
| 50 |
unsigned *components; |
| 51 |
} heim_oid; |
| 52 |
|
| 53 |
typedef struct heim_bit_string { |
| 54 |
size_t length; |
| 55 |
void *data; |
| 56 |
} heim_bit_string; |
| 57 |
|
| 58 |
typedef struct heim_base_data heim_any; |
| 59 |
typedef struct heim_base_data heim_any_set; |
| 60 |
|
| 61 |
#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \ |
| 62 |
do { \ |
| 63 |
(BL) = length_##T((S)); \ |
| 64 |
(B) = malloc((BL)); \ |
| 65 |
if((B) == NULL) { \ |
| 66 |
(R) = ENOMEM; \ |
| 67 |
} else { \ |
| 68 |
(R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \ |
| 69 |
(S), (L)); \ |
| 70 |
if((R) != 0) { \ |
| 71 |
free((B)); \ |
| 72 |
(B) = NULL; \ |
| 73 |
} \ |
| 74 |
} \ |
| 75 |
} while (0) |
| 76 |
|
| 77 |
#ifdef _WIN32 |
| 78 |
#ifndef ASN1_LIB |
| 79 |
#define ASN1EXP __declspec(dllimport) |
| 80 |
#else |
| 81 |
#define ASN1EXP |
| 82 |
#endif |
| 83 |
#define ASN1CALL __stdcall |
| 84 |
#else |
| 85 |
#define ASN1EXP |
| 86 |
#define ASN1CALL |
| 87 |
#endif |
| 88 |
struct units; |
| 89 |
|
| 90 |
#endif |
| 91 |
|
| 92 |
/* OBJECT IDENTIFIER id-pkcs-9 ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) } */ |
| 93 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs_9; |
| 94 |
#define ASN1_OID_ID_PKCS_9 (&asn1_oid_id_pkcs_9) |
| 95 |
|
| 96 |
/* OBJECT IDENTIFIER id-pkcs9-emailAddress ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) label-less(1) } */ |
| 97 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs9_emailAddress; |
| 98 |
#define ASN1_OID_ID_PKCS9_EMAILADDRESS (&asn1_oid_id_pkcs9_emailAddress) |
| 99 |
|
| 100 |
/* OBJECT IDENTIFIER id-pkcs9-contentType ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) label-less(3) } */ |
| 101 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs9_contentType; |
| 102 |
#define ASN1_OID_ID_PKCS9_CONTENTTYPE (&asn1_oid_id_pkcs9_contentType) |
| 103 |
|
| 104 |
/* OBJECT IDENTIFIER id-pkcs9-messageDigest ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) label-less(4) } */ |
| 105 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs9_messageDigest; |
| 106 |
#define ASN1_OID_ID_PKCS9_MESSAGEDIGEST (&asn1_oid_id_pkcs9_messageDigest) |
| 107 |
|
| 108 |
/* OBJECT IDENTIFIER id-pkcs9-signingTime ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) label-less(5) } */ |
| 109 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs9_signingTime; |
| 110 |
#define ASN1_OID_ID_PKCS9_SIGNINGTIME (&asn1_oid_id_pkcs9_signingTime) |
| 111 |
|
| 112 |
/* OBJECT IDENTIFIER id-pkcs9-countersignature ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) label-less(6) } */ |
| 113 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs9_countersignature; |
| 114 |
#define ASN1_OID_ID_PKCS9_COUNTERSIGNATURE (&asn1_oid_id_pkcs9_countersignature) |
| 115 |
|
| 116 |
/* OBJECT IDENTIFIER id-pkcs-9-at-friendlyName ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) label-less(20) } */ |
| 117 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs_9_at_friendlyName; |
| 118 |
#define ASN1_OID_ID_PKCS_9_AT_FRIENDLYNAME (&asn1_oid_id_pkcs_9_at_friendlyName) |
| 119 |
|
| 120 |
/* OBJECT IDENTIFIER id-pkcs-9-at-localKeyId ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) label-less(21) } */ |
| 121 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs_9_at_localKeyId; |
| 122 |
#define ASN1_OID_ID_PKCS_9_AT_LOCALKEYID (&asn1_oid_id_pkcs_9_at_localKeyId) |
| 123 |
|
| 124 |
/* OBJECT IDENTIFIER id-pkcs-9-at-certTypes ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) label-less(22) } */ |
| 125 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs_9_at_certTypes; |
| 126 |
#define ASN1_OID_ID_PKCS_9_AT_CERTTYPES (&asn1_oid_id_pkcs_9_at_certTypes) |
| 127 |
|
| 128 |
/* OBJECT IDENTIFIER id-pkcs-9-at-certTypes-x509 ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) label-less(22) label-less(1) } */ |
| 129 |
extern ASN1EXP const heim_oid asn1_oid_id_pkcs_9_at_certTypes_x509; |
| 130 |
#define ASN1_OID_ID_PKCS_9_AT_CERTTYPES_X509 (&asn1_oid_id_pkcs_9_at_certTypes_x509) |
| 131 |
|
| 132 |
/* |
| 133 |
PKCS9-BMPString ::= BMPString |
| 134 |
*/ |
| 135 |
|
| 136 |
typedef heim_bmp_string PKCS9_BMPString; |
| 137 |
|
| 138 |
ASN1EXP int ASN1CALL decode_PKCS9_BMPString(const unsigned char *, size_t, PKCS9_BMPString *, size_t *); |
| 139 |
ASN1EXP int ASN1CALL encode_PKCS9_BMPString(unsigned char *, size_t, const PKCS9_BMPString *, size_t *); |
| 140 |
ASN1EXP size_t ASN1CALL length_PKCS9_BMPString(const PKCS9_BMPString *); |
| 141 |
ASN1EXP int ASN1CALL copy_PKCS9_BMPString (const PKCS9_BMPString *, PKCS9_BMPString *); |
| 142 |
ASN1EXP void ASN1CALL free_PKCS9_BMPString (PKCS9_BMPString *); |
| 143 |
|
| 144 |
|
| 145 |
/* |
| 146 |
PKCS9-friendlyName ::= SET OF PKCS9-BMPString |
| 147 |
*/ |
| 148 |
|
| 149 |
typedef struct PKCS9_friendlyName { |
| 150 |
unsigned int len; |
| 151 |
PKCS9_BMPString *val; |
| 152 |
} PKCS9_friendlyName; |
| 153 |
|
| 154 |
ASN1EXP int ASN1CALL decode_PKCS9_friendlyName(const unsigned char *, size_t, PKCS9_friendlyName *, size_t *); |
| 155 |
ASN1EXP int ASN1CALL encode_PKCS9_friendlyName(unsigned char *, size_t, const PKCS9_friendlyName *, size_t *); |
| 156 |
ASN1EXP size_t ASN1CALL length_PKCS9_friendlyName(const PKCS9_friendlyName *); |
| 157 |
ASN1EXP int ASN1CALL copy_PKCS9_friendlyName (const PKCS9_friendlyName *, PKCS9_friendlyName *); |
| 158 |
ASN1EXP void ASN1CALL free_PKCS9_friendlyName (PKCS9_friendlyName *); |
| 159 |
|
| 160 |
|
| 161 |
#endif /* __pkcs9_asn1_h__ */ |