Line data Source code
1 : /* Generated from /builds/eaglegai/samba/third_party/heimdal/lib/asn1/pkcs9.asn1 */
2 : /* Do not edit */
3 :
4 : #if defined(_WIN32) && !defined(ASN1_LIB)
5 : # error "ASN1_LIB must be defined"
6 : #endif
7 : #include <stdio.h>
8 : #include <stdlib.h>
9 : #include <time.h>
10 : #include <string.h>
11 : #include <errno.h>
12 : #include <limits.h>
13 : #include <krb5-types.h>
14 : #include "pkcs9_asn1.h"
15 : #include "pkcs9_asn1-priv.h"
16 : #include <asn1_err.h>
17 : #include <der.h>
18 : #include <asn1-template.h>
19 :
20 : #include <parse_units.h>
21 :
22 : static unsigned oid_id_pkcs_9_variable_num[6] = { 1, 2, 840, 113549, 1, 9};
23 : const heim_oid asn1_oid_id_pkcs_9 = { 6, oid_id_pkcs_9_variable_num };
24 :
25 : static unsigned oid_id_pkcs9_emailAddress_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 1};
26 : const heim_oid asn1_oid_id_pkcs9_emailAddress = { 7, oid_id_pkcs9_emailAddress_variable_num };
27 :
28 : static unsigned oid_id_pkcs9_contentType_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 3};
29 : const heim_oid asn1_oid_id_pkcs9_contentType = { 7, oid_id_pkcs9_contentType_variable_num };
30 :
31 : static unsigned oid_id_pkcs9_messageDigest_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 4};
32 : const heim_oid asn1_oid_id_pkcs9_messageDigest = { 7, oid_id_pkcs9_messageDigest_variable_num };
33 :
34 : static unsigned oid_id_pkcs9_signingTime_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 5};
35 : const heim_oid asn1_oid_id_pkcs9_signingTime = { 7, oid_id_pkcs9_signingTime_variable_num };
36 :
37 : static unsigned oid_id_pkcs9_countersignature_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 6};
38 : const heim_oid asn1_oid_id_pkcs9_countersignature = { 7, oid_id_pkcs9_countersignature_variable_num };
39 :
40 : static unsigned oid_id_pkcs9_extReq_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 14};
41 : const heim_oid asn1_oid_id_pkcs9_extReq = { 7, oid_id_pkcs9_extReq_variable_num };
42 :
43 : static unsigned oid_id_pkcs_9_at_friendlyName_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 20};
44 : const heim_oid asn1_oid_id_pkcs_9_at_friendlyName = { 7, oid_id_pkcs_9_at_friendlyName_variable_num };
45 :
46 : static unsigned oid_id_pkcs_9_at_localKeyId_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 21};
47 : const heim_oid asn1_oid_id_pkcs_9_at_localKeyId = { 7, oid_id_pkcs_9_at_localKeyId_variable_num };
48 :
49 : static unsigned oid_id_pkcs_9_at_certTypes_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 22};
50 : const heim_oid asn1_oid_id_pkcs_9_at_certTypes = { 7, oid_id_pkcs_9_at_certTypes_variable_num };
51 :
52 : static unsigned oid_id_pkcs_9_at_certTypes_x509_variable_num[8] = { 1, 2, 840, 113549, 1, 9, 22, 1};
53 : const heim_oid asn1_oid_id_pkcs_9_at_certTypes_x509 = { 8, oid_id_pkcs_9_at_certTypes_x509_variable_num };
54 :
55 : extern const struct asn1_template asn1_PKCS9_BMPString[];
56 : extern const struct asn1_template asn1_PKCS9_BMPString[];
57 : extern const struct asn1_template asn1_PKCS9_friendlyName[];
58 : /* template_members: PKCS9_BMPString exp exp */
59 : /* generate_template_type: PKCS9_BMPString_tag__0 */
60 : const struct asn1_template asn1_PKCS9_BMPString_tag__0[] = {
61 : /* 0 */ { 0, sizeof(heim_bmp_string), ((void *)(uintptr_t)1) },
62 : /* 1 */ { A1_PARSE_T(A1T_BMP_STRING), 0, NULL }
63 : };
64 : /* generate_template_type: PKCS9_BMPString */
65 : const struct asn1_template asn1_PKCS9_BMPString[] = {
66 : /* 0 */ { 0, sizeof(PKCS9_BMPString), ((void *)(uintptr_t)1) },
67 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_BMPString), 0, asn1_PKCS9_BMPString_tag__0 }
68 : };
69 :
70 : int ASN1CALL
71 0 : decode_PKCS9_BMPString(const unsigned char *p, size_t len, PKCS9_BMPString *data, size_t *size)
72 : {
73 0 : memset(data, 0, sizeof(*data));
74 0 : return _asn1_decode_top(asn1_PKCS9_BMPString, 0|0, p, len, data, size);
75 : }
76 :
77 :
78 : int ASN1CALL
79 0 : encode_PKCS9_BMPString(unsigned char *p, size_t len, const PKCS9_BMPString *data, size_t *size)
80 : {
81 0 : return _asn1_encode(asn1_PKCS9_BMPString, p, len, data, size);
82 : }
83 :
84 :
85 : size_t ASN1CALL
86 0 : length_PKCS9_BMPString(const PKCS9_BMPString *data)
87 : {
88 0 : return _asn1_length(asn1_PKCS9_BMPString, data);
89 : }
90 :
91 :
92 : void ASN1CALL
93 0 : free_PKCS9_BMPString(PKCS9_BMPString *data)
94 : {
95 0 : _asn1_free_top(asn1_PKCS9_BMPString, data);
96 0 : }
97 :
98 :
99 : int ASN1CALL
100 0 : copy_PKCS9_BMPString(const PKCS9_BMPString *from, PKCS9_BMPString *to)
101 : {
102 0 : return _asn1_copy_top(asn1_PKCS9_BMPString, from, to);
103 : }
104 :
105 :
106 : char * ASN1CALL
107 0 : print_PKCS9_BMPString(const PKCS9_BMPString *data, int flags)
108 : {
109 0 : return _asn1_print_top(asn1_PKCS9_BMPString, flags, data);
110 : }
111 :
112 : /* template_members: PKCS9_friendlyName exp exp */
113 : /* generate_template_type: PKCS9_BMPString_seofTstruct_0 */
114 : const struct asn1_template asn1_PKCS9_BMPString_seofTstruct_0[] = {
115 : /* 0 */ { 0, sizeof(PKCS9_BMPString), ((void *)(uintptr_t)1) },
116 : /* 1 */ { A1_OP_TYPE , 0, asn1_PKCS9_BMPString }
117 : };
118 : /* generate_template_type: PKCS9_friendlyName_tag__1 */
119 : const struct asn1_template asn1_PKCS9_friendlyName_tag__1[] = {
120 : /* 0 */ { 0, sizeof(PKCS9_BMPString), ((void *)(uintptr_t)1) },
121 : /* 1 */ { A1_OP_SETOF, 0, asn1_PKCS9_BMPString_seofTstruct_0 }
122 : };
123 : /* generate_template_type: PKCS9_friendlyName */
124 : const struct asn1_template asn1_PKCS9_friendlyName[] = {
125 : /* 0 */ { 0, sizeof(PKCS9_friendlyName), ((void *)(uintptr_t)1) },
126 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_PKCS9_friendlyName_tag__1 }
127 : };
128 :
129 : int ASN1CALL
130 0 : decode_PKCS9_friendlyName(const unsigned char *p, size_t len, PKCS9_friendlyName *data, size_t *size)
131 : {
132 0 : memset(data, 0, sizeof(*data));
133 0 : return _asn1_decode_top(asn1_PKCS9_friendlyName, 0|0, p, len, data, size);
134 : }
135 :
136 :
137 : int ASN1CALL
138 0 : encode_PKCS9_friendlyName(unsigned char *p, size_t len, const PKCS9_friendlyName *data, size_t *size)
139 : {
140 0 : return _asn1_encode(asn1_PKCS9_friendlyName, p, len, data, size);
141 : }
142 :
143 :
144 : size_t ASN1CALL
145 0 : length_PKCS9_friendlyName(const PKCS9_friendlyName *data)
146 : {
147 0 : return _asn1_length(asn1_PKCS9_friendlyName, data);
148 : }
149 :
150 :
151 : void ASN1CALL
152 0 : free_PKCS9_friendlyName(PKCS9_friendlyName *data)
153 : {
154 0 : _asn1_free_top(asn1_PKCS9_friendlyName, data);
155 0 : }
156 :
157 :
158 : int ASN1CALL
159 0 : copy_PKCS9_friendlyName(const PKCS9_friendlyName *from, PKCS9_friendlyName *to)
160 : {
161 0 : return _asn1_copy_top(asn1_PKCS9_friendlyName, from, to);
162 : }
163 :
164 :
165 : char * ASN1CALL
166 0 : print_PKCS9_friendlyName(const PKCS9_friendlyName *data, int flags)
167 : {
168 0 : return _asn1_print_top(asn1_PKCS9_friendlyName, flags, data);
169 : }
170 :
|