1 /* This is a generated file */
2 #ifndef __hx509_private_h__
3 #define __hx509_private_h__
7 #if !defined(__GNUC__) && !defined(__attribute__)
8 #define __attribute__(x)
12 _hx509_AlgorithmIdentifier_cmp (
13 const AlgorithmIdentifier */
*p*/
,
14 const AlgorithmIdentifier */
*q*/
);
17 _hx509_Certificate_cmp (
18 const Certificate */
*p*/
,
19 const Certificate */
*q*/
);
22 _hx509_Name_to_string (
27 _hx509_Time2time_t (const Time */
*t*/
);
33 __attribute__ ((noreturn
, format (printf
, 1, 2)));
36 _hx509_calculate_path (
37 hx509_context
/*context*/,
40 hx509_certs
/*anchors*/,
41 unsigned int /*max_depth*/,
44 hx509_path */
*path*/
);
47 _hx509_cert_assign_key (
49 hx509_private_key
/*private_key*/);
53 hx509_context
/*context*/,
58 _hx509_cert_get_keyusage (
59 hx509_context
/*context*/,
64 _hx509_cert_get_version (const Certificate */
*t*/
);
67 _hx509_cert_is_parent_cmp (
68 const Certificate */
*subject*/
,
69 const Certificate */
*issuer*/
,
70 int /*allow_self_signed*/);
73 _hx509_cert_private_decrypt (
74 hx509_context
/*context*/,
75 const heim_octet_string */
*ciphertext*/
,
76 const heim_oid */
*encryption_oid*/
,
78 heim_octet_string */
*cleartext*/
);
81 _hx509_cert_private_key (hx509_cert
/*p*/);
84 _hx509_cert_private_key_exportable (hx509_cert
/*p*/);
87 _hx509_cert_public_encrypt (
88 hx509_context
/*context*/,
89 const heim_octet_string */
*cleartext*/
,
90 const hx509_cert
/*p*/,
91 heim_oid */
*encryption_oid*/
,
92 heim_octet_string */
*ciphertext*/
);
95 _hx509_cert_set_release (
97 _hx509_cert_release_func
/*release*/,
101 _hx509_certs_keys_add (
102 hx509_context
/*context*/,
103 hx509_certs
/*certs*/,
104 hx509_private_key
/*key*/);
107 _hx509_certs_keys_free (
108 hx509_context
/*context*/,
109 hx509_private_key */
*keys*/
);
112 _hx509_certs_keys_get (
113 hx509_context
/*context*/,
114 hx509_certs
/*certs*/,
115 hx509_private_key
**/
*keys*/
);
118 _hx509_certs_ref (hx509_certs
/*certs*/);
121 _hx509_check_key_usage (
122 hx509_context
/*context*/,
125 int /*req_present*/);
128 _hx509_collector_alloc (
129 hx509_context
/*context*/,
131 struct hx509_collector
**/
*collector*/
);
134 _hx509_collector_certs_add (
135 hx509_context
/*context*/,
136 struct hx509_collector */
*c*/
,
137 hx509_cert
/*cert*/);
140 _hx509_collector_collect_certs (
141 hx509_context
/*context*/,
142 struct hx509_collector */
*c*/
,
143 hx509_certs */
*ret_certs*/
);
146 _hx509_collector_collect_private_keys (
147 hx509_context
/*context*/,
148 struct hx509_collector */
*c*/
,
149 hx509_private_key
**/
*keys*/
);
152 _hx509_collector_free (struct hx509_collector */
*c*/
);
155 _hx509_collector_get_lock (struct hx509_collector */
*c*/
);
158 _hx509_collector_private_key_add (
159 hx509_context
/*context*/,
160 struct hx509_collector */
*c*/
,
161 const AlgorithmIdentifier */
*alg*/
,
162 hx509_private_key
/*private_key*/,
163 const heim_octet_string */
*key_data*/
,
164 const heim_octet_string */
*localKeyId*/
);
167 _hx509_create_signature (
168 hx509_context
/*context*/,
169 const hx509_private_key
/*signer*/,
170 const AlgorithmIdentifier */
*alg*/
,
171 const heim_octet_string */
*data*/
,
172 AlgorithmIdentifier */
*signatureAlgorithm*/
,
173 heim_octet_string */
*sig*/
);
176 _hx509_create_signature_bitstring (
177 hx509_context
/*context*/,
178 const hx509_private_key
/*signer*/,
179 const AlgorithmIdentifier */
*alg*/
,
180 const heim_octet_string */
*data*/
,
181 AlgorithmIdentifier */
*signatureAlgorithm*/
,
182 heim_bit_string */
*sig*/
);
185 _hx509_find_extension_subject_key_id (
186 const Certificate */
*issuer*/
,
187 SubjectKeyIdentifier */
*si*/
);
190 _hx509_generate_private_key (
191 hx509_context
/*context*/,
192 struct hx509_generate_private_context */
*ctx*/
,
193 hx509_private_key */
*private_key*/
);
196 _hx509_generate_private_key_bits (
197 hx509_context
/*context*/,
198 struct hx509_generate_private_context */
*ctx*/
,
199 unsigned long /*bits*/);
202 _hx509_generate_private_key_free (struct hx509_generate_private_context
**/
*ctx*/
);
205 _hx509_generate_private_key_init (
206 hx509_context
/*context*/,
207 const heim_oid */
*oid*/
,
208 struct hx509_generate_private_context
**/
*ctx*/
);
211 _hx509_generate_private_key_is_ca (
212 hx509_context
/*context*/,
213 struct hx509_generate_private_context */
*ctx*/
);
216 _hx509_get_cert (hx509_cert
/*cert*/);
219 _hx509_ks_dir_register (hx509_context
/*context*/);
222 _hx509_ks_file_register (hx509_context
/*context*/);
225 _hx509_ks_keychain_register (hx509_context
/*context*/);
228 _hx509_ks_mem_register (hx509_context
/*context*/);
231 _hx509_ks_null_register (hx509_context
/*context*/);
234 _hx509_ks_pkcs11_register (hx509_context
/*context*/);
237 _hx509_ks_pkcs12_register (hx509_context
/*context*/);
241 hx509_context
/*context*/,
242 struct hx509_keyset_ops */
*ops*/
);
245 _hx509_lock_find_cert (
247 const hx509_query */
*q*/
,
250 const struct _hx509_password
*
251 _hx509_lock_get_passwords (hx509_lock
/*lock*/);
254 _hx509_lock_unlock_certs (hx509_lock
/*lock*/);
261 struct stat */
*rsb*/
);
266 heim_octet_string */
*os*/
,
267 struct stat */
*rsb*/
);
272 hx509_private_key
/*private_key*/);
281 const DirectoryString */
*ds1*/
,
282 const DirectoryString */
*ds2*/
);
285 _hx509_name_from_Name (
287 hx509_name */
*name*/
);
291 hx509_context
/*context*/,
294 const heim_oid */
*oid*/
,
295 const char */
*str*/
);
298 _hx509_parse_private_key (
299 hx509_context
/*context*/,
300 const heim_oid */
*key_oid*/
,
301 const void */
*data*/
,
303 hx509_private_key */
*private_key*/
);
307 hx509_context
/*context*/,
308 hx509_path */
*path*/
,
309 hx509_cert
/*cert*/);
312 _hx509_path_free (hx509_path */
*path*/
);
316 hx509_context
/*context*/,
318 const AlgorithmIdentifier */
*ai*/
,
319 const heim_octet_string */
*econtent*/
,
320 heim_octet_string */
*content*/
);
324 hx509_context
/*context*/,
326 const AlgorithmIdentifier */
*ai*/
,
327 const heim_octet_string */
*content*/
,
328 heim_octet_string */
*econtent*/
);
332 int (*/
*func*/
)(void *, const char *),
338 _hx509_private_key2SPKI (
339 hx509_context
/*context*/,
340 hx509_private_key
/*private_key*/,
341 SubjectPublicKeyInfo */
*spki*/
);
344 _hx509_private_key_assign_rsa (
345 hx509_private_key
/*key*/,
349 _hx509_private_key_export (
350 hx509_context
/*context*/,
351 const hx509_private_key
/*key*/,
352 heim_octet_string */
*data*/
);
355 _hx509_private_key_exportable (hx509_private_key
/*key*/);
358 _hx509_private_key_free (hx509_private_key */
*key*/
);
361 _hx509_private_key_get_internal (
362 hx509_context
/*context*/,
363 hx509_private_key
/*key*/,
364 const char */
*type*/
);
367 _hx509_private_key_init (
368 hx509_private_key */
*key*/
,
369 hx509_private_key_ops */
*ops*/
,
373 _hx509_private_key_oid (
374 hx509_context
/*context*/,
375 const hx509_private_key
/*key*/,
379 _hx509_private_key_private_decrypt (
380 hx509_context
/*context*/,
381 const heim_octet_string */
*ciphertext*/
,
382 const heim_oid */
*encryption_oid*/
,
383 hx509_private_key
/*p*/,
384 heim_octet_string */
*cleartext*/
);
387 _hx509_private_key_ref (hx509_private_key
/*key*/);
390 _hx509_private_pem_name (hx509_private_key
/*key*/);
393 _hx509_public_encrypt (
394 hx509_context
/*context*/,
395 const heim_octet_string */
*cleartext*/
,
396 const Certificate */
*cert*/
,
397 heim_oid */
*encryption_oid*/
,
398 heim_octet_string */
*ciphertext*/
);
401 _hx509_query_clear (hx509_query */
*q*/
);
404 _hx509_query_match_cert (
405 hx509_context
/*context*/,
406 const hx509_query */
*q*/
,
407 hx509_cert
/*cert*/);
410 _hx509_query_statistic (
411 hx509_context
/*context*/,
413 const hx509_query */
*q*/
);
416 _hx509_request_add_dns_name (
417 hx509_context
/*context*/,
418 hx509_request
/*req*/,
419 const char */
*hostname*/
);
422 _hx509_request_add_eku (
423 hx509_context
/*context*/,
424 hx509_request
/*req*/,
425 const heim_oid */
*oid*/
);
428 _hx509_request_add_email (
429 hx509_context
/*context*/,
430 hx509_request
/*req*/,
431 const char */
*email*/
);
434 _hx509_request_free (hx509_request */
*req*/
);
437 _hx509_request_get_SubjectPublicKeyInfo (
438 hx509_context
/*context*/,
439 hx509_request
/*req*/,
440 SubjectPublicKeyInfo */
*key*/
);
443 _hx509_request_get_name (
444 hx509_context
/*context*/,
445 hx509_request
/*req*/,
446 hx509_name */
*name*/
);
449 _hx509_request_init (
450 hx509_context
/*context*/,
451 hx509_request */
*req*/
);
454 _hx509_request_parse (
455 hx509_context
/*context*/,
456 const char */
*path*/
,
457 hx509_request */
*req*/
);
460 _hx509_request_print (
461 hx509_context
/*context*/,
462 hx509_request
/*req*/,
466 _hx509_request_set_SubjectPublicKeyInfo (
467 hx509_context
/*context*/,
468 hx509_request
/*req*/,
469 const SubjectPublicKeyInfo */
*key*/
);
472 _hx509_request_set_name (
473 hx509_context
/*context*/,
474 hx509_request
/*req*/,
475 hx509_name
/*name*/);
478 _hx509_request_to_pkcs10 (
479 hx509_context
/*context*/,
480 const hx509_request
/*req*/,
481 const hx509_private_key
/*signer*/,
482 heim_octet_string */
*request*/
);
485 _hx509_revoke_ref (hx509_revoke_ctx
/*ctx*/);
488 _hx509_set_cert_attribute (
489 hx509_context
/*context*/,
491 const heim_oid */
*oid*/
,
492 const heim_octet_string */
*attr*/
);
500 _hx509_unmap_file_os (heim_octet_string */
*os*/
);
503 _hx509_unparse_Name (
504 const Name */
*aname*/
,
508 _hx509_verify_signature (
509 hx509_context
/*context*/,
510 const Certificate */
*signer*/
,
511 const AlgorithmIdentifier */
*alg*/
,
512 const heim_octet_string */
*data*/
,
513 const heim_octet_string */
*sig*/
);
516 _hx509_verify_signature_bitstring (
517 hx509_context
/*context*/,
518 const Certificate */
*signer*/
,
519 const AlgorithmIdentifier */
*alg*/
,
520 const heim_octet_string */
*data*/
,
521 const heim_bit_string */
*sig*/
);
526 const void */
*data*/
,
529 #endif /* __hx509_private_h__ */