52 #include <openssl/objects.h>
53 #include <openssl/obj_mac.h>
64 const char *EAC_OBJ_nid2ln(
int n);
65 const char *EAC_OBJ_nid2sn(
int n);
66 int EAC_OBJ_obj2nid(
const ASN1_OBJECT *o);
67 ASN1_OBJECT *EAC_OBJ_txt2obj(
const char *s,
int no_name);
68 int EAC_OBJ_txt2nid(
const char *s);
69 int EAC_OBJ_ln2nid(
const char *s);
70 int EAC_OBJ_sn2nid(
const char *s);
72 #ifdef NID_id_PACE_ECDH_GM_AES_CBC_CMAC_128
73 #define HAVE_PATCHED_OPENSSL 1
79 #define OBJ_bsi_de 0L,4L,0L,127L,0L,7L
81 #define SN_standardizedDomainParameters "standardizedDomainParameters"
82 extern int NID_standardizedDomainParameters;
83 #define OBJ_standardizedDomainParameters OBJ_bsi_de,1L,2L
85 #define OBJ_id_PK OBJ_bsi_de,2L,2L,1L
87 #define SN_id_PK_DH "id-PK-DH"
88 extern int NID_id_PK_DH;
89 #define OBJ_id_PK_DH OBJ_id_PK,1L
91 #define SN_id_PK_ECDH "id-PK-ECDH"
92 extern int NID_id_PK_ECDH;
93 #define OBJ_id_PK_ECDH OBJ_id_PK,2L
95 #define SN_id_TA "id-TA"
97 #define OBJ_id_TA OBJ_bsi_de,2L,2L,2L
99 #define SN_id_TA_RSA "id-TA-RSA"
100 extern int NID_id_TA_RSA;
101 #define OBJ_id_TA_RSA OBJ_id_TA,1L
103 #define SN_id_TA_RSA_v1_5_SHA_1 "id-TA-RSA-v1-5-SHA-1"
104 extern int NID_id_TA_RSA_v1_5_SHA_1;
105 #define OBJ_id_TA_RSA_v1_5_SHA_1 OBJ_id_TA_RSA,1L
107 #define SN_id_TA_RSA_v1_5_SHA_256 "id-TA-RSA-v1-5-SHA-256"
108 extern int NID_id_TA_RSA_v1_5_SHA_256;
109 #define OBJ_id_TA_RSA_v1_5_SHA_256 OBJ_id_TA_RSA,2L
111 #define SN_id_TA_RSA_PSS_SHA_1 "id-TA-RSA-PSS-SHA-1"
112 extern int NID_id_TA_RSA_PSS_SHA_1;
113 #define OBJ_id_TA_RSA_PSS_SHA_1 OBJ_id_TA_RSA,3L
115 #define SN_id_TA_RSA_PSS_SHA_256 "id-TA-RSA-PSS-SHA-256"
116 extern int NID_id_TA_RSA_PSS_SHA_256;
117 #define OBJ_id_TA_RSA_PSS_SHA_256 OBJ_id_TA_RSA,4L
119 #define SN_id_TA_RSA_v1_5_SHA_512 "id-TA-RSA-v1-5-SHA-512"
120 extern int NID_id_TA_RSA_v1_5_SHA_512;
121 #define OBJ_id_TA_RSA_v1_5_SHA_512 OBJ_id_TA_RSA,5L
123 #define SN_id_TA_RSA_PSS_SHA_512 "id-TA-RSA-PSS-SHA-512"
124 extern int NID_id_TA_RSA_PSS_SHA_512;
125 #define OBJ_id_TA_RSA_PSS_SHA_512 OBJ_id_TA_RSA,6L
127 #define SN_id_TA_ECDSA "id-TA-ECDSA"
128 extern int NID_id_TA_ECDSA;
129 #define OBJ_id_TA_ECDSA OBJ_id_TA,2L
131 #define SN_id_TA_ECDSA_SHA_1 "id-TA-ECDSA-SHA-1"
132 extern int NID_id_TA_ECDSA_SHA_1;
133 #define OBJ_id_TA_ECDSA_SHA_1 OBJ_id_TA_ECDSA,1L
135 #define SN_id_TA_ECDSA_SHA_224 "id-TA-ECDSA-SHA-224"
136 extern int NID_id_TA_ECDSA_SHA_224;
137 #define OBJ_id_TA_ECDSA_SHA_224 OBJ_id_TA_ECDSA,2L
139 #define SN_id_TA_ECDSA_SHA_256 "id-TA-ECDSA-SHA-256"
140 extern int NID_id_TA_ECDSA_SHA_256;
141 #define OBJ_id_TA_ECDSA_SHA_256 OBJ_id_TA_ECDSA,3L
143 #define SN_id_TA_ECDSA_SHA_384 "id-TA-ECDSA-SHA-384"
144 extern int NID_id_TA_ECDSA_SHA_384;
145 #define OBJ_id_TA_ECDSA_SHA_384 OBJ_id_TA_ECDSA,4L
147 #define SN_id_TA_ECDSA_SHA_512 "id-TA-ECDSA-SHA-512"
148 extern int NID_id_TA_ECDSA_SHA_512;
149 #define OBJ_id_TA_ECDSA_SHA_512 OBJ_id_TA_ECDSA,5L
151 #define OBJ_id_CA OBJ_bsi_de,2L,2L,3L
153 #define SN_id_CA_DH "id-CA-DH"
154 extern int NID_id_CA_DH;
155 #define OBJ_id_CA_DH OBJ_id_CA,1L
157 #define SN_id_CA_DH_3DES_CBC_CBC "id-CA-DH-3DES-CBC-CBC"
158 extern int NID_id_CA_DH_3DES_CBC_CBC;
159 #define OBJ_id_CA_DH_3DES_CBC_CBC OBJ_id_CA_DH,1L
161 #define SN_id_CA_DH_AES_CBC_CMAC_128 "id-CA-DH-AES-CBC-CMAC-128"
162 extern int NID_id_CA_DH_AES_CBC_CMAC_128;
163 #define OBJ_id_CA_DH_AES_CBC_CMAC_128 OBJ_id_CA_DH,2L
165 #define SN_id_CA_DH_AES_CBC_CMAC_192 "id-CA-DH-AES-CBC-CMAC-192"
166 extern int NID_id_CA_DH_AES_CBC_CMAC_192;
167 #define OBJ_id_CA_DH_AES_CBC_CMAC_192 OBJ_id_CA_DH,3L
169 #define SN_id_CA_DH_AES_CBC_CMAC_256 "id-CA-DH-AES-CBC-CMAC-256"
170 extern int NID_id_CA_DH_AES_CBC_CMAC_256;
171 #define OBJ_id_CA_DH_AES_CBC_CMAC_256 OBJ_id_CA_DH,4L
173 #define SN_id_CA_ECDH "id-CA-ECDH"
174 extern int NID_id_CA_ECDH;
175 #define OBJ_id_CA_ECDH OBJ_id_CA,2L
177 #define SN_id_CA_ECDH_3DES_CBC_CBC "id-CA-ECDH-3DES-CBC-CBC"
178 extern int NID_id_CA_ECDH_3DES_CBC_CBC;
179 #define OBJ_id_CA_ECDH_3DES_CBC_CBC OBJ_id_CA_ECDH,1L
181 #define SN_id_CA_ECDH_AES_CBC_CMAC_128 "id-CA-ECDH-AES-CBC-CMAC-128"
182 extern int NID_id_CA_ECDH_AES_CBC_CMAC_128;
183 #define OBJ_id_CA_ECDH_AES_CBC_CMAC_128 OBJ_id_CA_ECDH,2L
185 #define SN_id_CA_ECDH_AES_CBC_CMAC_192 "id-CA-ECDH-AES-CBC-CMAC-192"
186 extern int NID_id_CA_ECDH_AES_CBC_CMAC_192;
187 #define OBJ_id_CA_ECDH_AES_CBC_CMAC_192 OBJ_id_CA_ECDH,3L
189 #define SN_id_CA_ECDH_AES_CBC_CMAC_256 "id-CA-ECDH-AES-CBC-CMAC-256"
190 extern int NID_id_CA_ECDH_AES_CBC_CMAC_256;
191 #define OBJ_id_CA_ECDH_AES_CBC_CMAC_256 OBJ_id_CA_ECDH,4L
193 #define OBJ_id_PACE OBJ_bsi_de,2L,2L,4L
195 #define SN_id_PACE_DH_GM "id-PACE-DH-GM"
196 extern int NID_id_PACE_DH_GM;
197 #define OBJ_id_PACE_DH_GM OBJ_id_PACE,1L
199 #define SN_id_PACE_DH_GM_3DES_CBC_CBC "id-PACE-DH-GM-3DES-CBC-CBC"
200 extern int NID_id_PACE_DH_GM_3DES_CBC_CBC;
201 #define OBJ_id_PACE_DH_GM_3DES_CBC_CBC OBJ_id_PACE_DH_GM,1L
203 #define SN_id_PACE_DH_GM_AES_CBC_CMAC_128 "id-PACE-DH-GM-AES-CBC-CMAC-128"
204 extern int NID_id_PACE_DH_GM_AES_CBC_CMAC_128;
205 #define OBJ_id_PACE_DH_GM_AES_CBC_CMAC_128 OBJ_id_PACE_DH_GM,2L
207 #define SN_id_PACE_DH_GM_AES_CBC_CMAC_192 "id-PACE-DH-GM-AES-CBC-CMAC-192"
208 extern int NID_id_PACE_DH_GM_AES_CBC_CMAC_192;
209 #define OBJ_id_PACE_DH_GM_AES_CBC_CMAC_192 OBJ_id_PACE_DH_GM,3L
211 #define SN_id_PACE_DH_GM_AES_CBC_CMAC_256 "id-PACE-DH-GM-AES-CBC-CMAC-256"
212 extern int NID_id_PACE_DH_GM_AES_CBC_CMAC_256;
213 #define OBJ_id_PACE_DH_GM_AES_CBC_CMAC_256 OBJ_id_PACE_DH_GM,4L
215 #define SN_id_PACE_ECDH_GM "id-PACE-ECDH-GM"
216 extern int NID_id_PACE_ECDH_GM;
217 #define OBJ_id_PACE_ECDH_GM OBJ_id_PACE,2L
219 #define SN_id_PACE_ECDH_GM_3DES_CBC_CBC "id-PACE-ECDH-GM-3DES-CBC-CBC"
220 extern int NID_id_PACE_ECDH_GM_3DES_CBC_CBC;
221 #define OBJ_id_PACE_ECDH_GM_3DES_CBC_CBC OBJ_id_PACE_ECDH_GM,1L
223 #define SN_id_PACE_ECDH_GM_AES_CBC_CMAC_128 "id-PACE-ECDH-GM-AES-CBC-CMAC-128"
224 extern int NID_id_PACE_ECDH_GM_AES_CBC_CMAC_128;
225 #define OBJ_id_PACE_ECDH_GM_AES_CBC_CMAC_128 OBJ_id_PACE_ECDH_GM,2L
227 #define SN_id_PACE_ECDH_GM_AES_CBC_CMAC_192 "id-PACE-ECDH-GM-AES-CBC-CMAC-192"
228 extern int NID_id_PACE_ECDH_GM_AES_CBC_CMAC_192;
229 #define OBJ_id_PACE_ECDH_GM_AES_CBC_CMAC_192 OBJ_id_PACE_ECDH_GM,3L
231 #define SN_id_PACE_ECDH_GM_AES_CBC_CMAC_256 "id-PACE-ECDH-GM-AES-CBC-CMAC-256"
232 extern int NID_id_PACE_ECDH_GM_AES_CBC_CMAC_256;
233 #define OBJ_id_PACE_ECDH_GM_AES_CBC_CMAC_256 OBJ_id_PACE_ECDH_GM,4L
235 #define SN_id_PACE_DH_IM "id-PACE-DH-IM"
236 extern int NID_id_PACE_DH_IM;
237 #define OBJ_id_PACE_DH_IM OBJ_id_PACE,3L
239 #define SN_id_PACE_DH_IM_3DES_CBC_CBC "id-PACE-DH-IM-3DES-CBC-CBC"
240 extern int NID_id_PACE_DH_IM_3DES_CBC_CBC;
241 #define OBJ_id_PACE_DH_IM_3DES_CBC_CBC OBJ_id_PACE_DH_IM,1L
243 #define SN_id_PACE_DH_IM_AES_CBC_CMAC_128 "id-PACE-DH-IM-AES-CBC-CMAC-128"
244 extern int NID_id_PACE_DH_IM_AES_CBC_CMAC_128;
245 #define OBJ_id_PACE_DH_IM_AES_CBC_CMAC_128 OBJ_id_PACE_DH_IM,2L
247 #define SN_id_PACE_DH_IM_AES_CBC_CMAC_192 "id-PACE-DH-IM-AES-CBC-CMAC-192"
248 extern int NID_id_PACE_DH_IM_AES_CBC_CMAC_192;
249 #define OBJ_id_PACE_DH_IM_AES_CBC_CMAC_192 OBJ_id_PACE_DH_IM,3L
251 #define SN_id_PACE_DH_IM_AES_CBC_CMAC_256 "id-PACE-DH-IM-AES-CBC-CMAC-256"
252 extern int NID_id_PACE_DH_IM_AES_CBC_CMAC_256;
253 #define OBJ_id_PACE_DH_IM_AES_CBC_CMAC_256 OBJ_id_PACE_DH_IM,4L
255 #define SN_id_PACE_ECDH_IM "id-PACE-ECDH-IM"
256 extern int NID_id_PACE_ECDH_IM;
257 #define OBJ_id_PACE_ECDH_IM OBJ_id_PACE,4L
259 #define SN_id_PACE_ECDH_IM_3DES_CBC_CBC "id-PACE-ECDH-IM-3DES-CBC-CBC"
260 extern int NID_id_PACE_ECDH_IM_3DES_CBC_CBC;
261 #define OBJ_id_PACE_ECDH_IM_3DES_CBC_CBC OBJ_id_PACE_ECDH_IM,1L
263 #define SN_id_PACE_ECDH_IM_AES_CBC_CMAC_128 "id-PACE-ECDH-IM-AES-CBC-CMAC-128"
264 extern int NID_id_PACE_ECDH_IM_AES_CBC_CMAC_128;
265 #define OBJ_id_PACE_ECDH_IM_AES_CBC_CMAC_128 OBJ_id_PACE_ECDH_IM,2L
267 #define SN_id_PACE_ECDH_IM_AES_CBC_CMAC_192 "id-PACE-ECDH-IM-AES-CBC-CMAC-192"
268 extern int NID_id_PACE_ECDH_IM_AES_CBC_CMAC_192;
269 #define OBJ_id_PACE_ECDH_IM_AES_CBC_CMAC_192 OBJ_id_PACE_ECDH_IM,3L
271 #define SN_id_PACE_ECDH_IM_AES_CBC_CMAC_256 "id-PACE-ECDH-IM-AES-CBC-CMAC-256"
272 extern int NID_id_PACE_ECDH_IM_AES_CBC_CMAC_256;
273 #define OBJ_id_PACE_ECDH_IM_AES_CBC_CMAC_256 OBJ_id_PACE_ECDH_IM,4L
275 #define OBJ_id_RI OBJ_bsi_de,2L,2L,5L
277 #define SN_id_RI_DH "id-RI-DH"
278 extern int NID_id_RI_DH;
279 #define OBJ_id_RI_DH OBJ_id_RI,1L
281 #define SN_id_RI_DH_SHA_1 "id-RI-DH-SHA-1"
282 extern int NID_id_RI_DH_SHA_1;
283 #define OBJ_id_RI_DH_SHA_1 OBJ_id_RI_DH,1L
285 #define SN_id_RI_DH_SHA_224 "id-RI-DH-SHA-224"
286 extern int NID_id_RI_DH_SHA_224;
287 #define OBJ_id_RI_DH_SHA_224 OBJ_id_RI_DH,2L
289 #define SN_id_RI_DH_SHA_256 "id-RI-DH-SHA-256"
290 extern int NID_id_RI_DH_SHA_256;
291 #define OBJ_id_RI_DH_SHA_256 OBJ_id_RI_DH,3L
293 #define SN_id_RI_DH_SHA_384 "id-RI-DH-SHA-384"
294 extern int NID_id_RI_DH_SHA_384;
295 #define OBJ_id_RI_DH_SHA_384 OBJ_id_RI_DH,4L
297 #define SN_id_RI_DH_SHA_512 "id-RI-DH-SHA-512"
298 extern int NID_id_RI_DH_SHA_512;
299 #define OBJ_id_RI_DH_SHA_512 OBJ_id_RI_DH,5L
301 #define SN_id_RI_ECDH "id-RI-ECDH"
302 extern int NID_id_RI_ECDH;
303 #define OBJ_id_RI_ECDH OBJ_id_RI,2L
305 #define SN_id_RI_ECDH_SHA_1 "id-RI-ECDH-SHA-1"
306 extern int NID_id_RI_ECDH_SHA_1;
307 #define OBJ_id_RI_ECDH_SHA_1 OBJ_id_RI_ECDH,1L
309 #define SN_id_RI_ECDH_SHA_224 "id-RI-ECDH-SHA-224"
310 extern int NID_id_RI_ECDH_SHA_224;
311 #define OBJ_id_RI_ECDH_SHA_224 OBJ_id_RI_ECDH,2L
313 #define SN_id_RI_ECDH_SHA_256 "id-RI-ECDH-SHA-256"
314 extern int NID_id_RI_ECDH_SHA_256;
315 #define OBJ_id_RI_ECDH_SHA_256 OBJ_id_RI_ECDH,3L
317 #define SN_id_RI_ECDH_SHA_384 "id-RI-ECDH-SHA-384"
318 extern int NID_id_RI_ECDH_SHA_384;
319 #define OBJ_id_RI_ECDH_SHA_384 OBJ_id_RI_ECDH,4L
321 #define SN_id_RI_ECDH_SHA_512 "id-RI-ECDH-SHA-512"
322 extern int NID_id_RI_ECDH_SHA_512;
323 #define OBJ_id_RI_ECDH_SHA_512 OBJ_id_RI_ECDH,5L
325 #define SN_id_CI "id-CI"
326 extern int NID_id_CI;
327 #define OBJ_id_CI OBJ_bsi_de,2L,2L,6L
329 #define SN_id_eIDSecurity "id-eIDSecurity"
330 extern int NID_id_eIDSecurity;
331 #define OBJ_id_eIDSecurity OBJ_bsi_de,2L,2L,7L
333 #define SN_id_PT "id-PT"
334 extern int NID_id_PT;
335 #define OBJ_id_PT OBJ_bsi_de,2L,2L,8L
337 #define OBJ_id_ecc OBJ_bsi_de,1L,1L
339 #define OBJ_ecka_dh OBJ_id_ecc,5L,2L
341 #define SN_ecka_dh_SessionKDF "ecka-dh-SessionKDF"
342 extern int NID_ecka_dh_SessionKDF;
343 #define OBJ_ecka_dh_SessionKDF OBJ_ecka_dh,2L
345 #define SN_ecka_dh_SessionKDF_DES3 "ecka-dh-SessionKDF-DES3"
346 extern int NID_ecka_dh_SessionKDF_DES3;
347 #define OBJ_ecka_dh_SessionKDF_DES3 OBJ_ecka_dh,2L,1L
349 #define SN_ecka_dh_SessionKDF_AES128 "ecka-dh-SessionKDF-AES128"
350 extern int NID_ecka_dh_SessionKDF_AES128;
351 #define OBJ_ecka_dh_SessionKDF_AES128 OBJ_ecka_dh,2L,2L
353 #define SN_ecka_dh_SessionKDF_AES192 "ecka-dh-SessionKDF-AES192"
354 extern int NID_ecka_dh_SessionKDF_AES192;
355 #define OBJ_ecka_dh_SessionKDF_AES192 OBJ_ecka_dh,2L,3L
357 #define SN_ecka_dh_SessionKDF_AES256 "ecka-dh-SessionKDF-AES256"
358 extern int NID_ecka_dh_SessionKDF_AES256;
359 #define OBJ_ecka_dh_SessionKDF_AES256 OBJ_ecka_dh,2L,4L
361 #define OBJ_id_roles OBJ_bsi_de,3L,1L,2L
363 #define SN_id_IS "id-IS"
364 extern int NID_id_IS;
365 #define OBJ_id_IS OBJ_id_roles,1L
367 #define SN_id_AT "id-AT"
368 extern int NID_id_AT;
369 #define OBJ_id_AT OBJ_id_roles,2L
371 #define SN_id_ST "id-ST"
372 extern int NID_id_ST;
373 #define OBJ_id_ST OBJ_id_roles,3L
375 #define OBJ_id_extensions OBJ_bsi_de,3L,1L,3L
377 #define SN_id_description "id-description"
378 extern int NID_id_description;
379 #define OBJ_id_description OBJ_id_extensions,1L
381 #define SN_id_plainFormat "id-plainFormat"
382 extern int NID_id_plainFormat;
383 #define OBJ_id_plainFormat OBJ_id_description,1L
385 #define SN_id_htmlFormat "id-htmlFormat"
386 extern int NID_id_htmlFormat;
387 #define OBJ_id_htmlFormat OBJ_id_description,2L
389 #define SN_id_pdfFormat "id-pdfFormat"
390 extern int NID_id_pdfFormat;
391 #define OBJ_id_pdfFormat OBJ_id_description,3L
393 #define SN_id_sector "id-sector"
394 extern int NID_id_sector;
395 #define OBJ_id_sector OBJ_id_extensions,2L
397 #define OBJ_id_eID OBJ_bsi_de,3L,2L
399 #define SN_id_SecurityObject "id-SecurityObject"
400 extern int NID_id_SecurityObject;
401 #define OBJ_id_SecurityObject OBJ_id_eID,1L
403 #define OBJ_id_AuxiliaryData OBJ_bsi_de,3L,1L,4L
405 #define SN_id_DateOfBirth "id-DateOfBirth"
406 extern int NID_id_DateOfBirth;
407 #define OBJ_id_DateOfBirth OBJ_id_AuxiliaryData,1L
409 #define SN_id_DateOfExpiry "id-DateOfExpiry"
410 extern int NID_id_DateOfExpiry;
411 #define OBJ_id_DateOfExpiry OBJ_id_AuxiliaryData,2L
413 #define SN_id_CommunityID "id-CommunityID"
414 extern int NID_id_CommunityID;
415 #define OBJ_id_CommunityID OBJ_id_AuxiliaryData,3L