1 #ifndef EAGINE_SSL_API_C_API_HPP
9 #define EAGINE_SSL_API_C_API_HPP
16 #ifndef EAGINE_SSL_STATIC_FUNC
18 #define EAGINE_SSL_STATIC_FUNC(NAME) &::NAME
20 #define EAGINE_SSL_STATIC_FUNC(NAME) nullptr
24 namespace eagine::sslp {
26 template <
typename Traits>
27 struct basic_ssl_c_api {
29 using this_api = basic_ssl_c_api;
30 using api_traits = Traits;
32 static constexpr
bool has_api = ssl_types::has_api;
33 using ui_method_type = ssl_types::ui_method_type;
34 using engine_type = ssl_types::engine_type;
35 using bio_method_type = ssl_types::bio_method_type;
36 using bio_type = ssl_types::bio_type;
37 using evp_pkey_ctx_type = ssl_types::evp_pkey_ctx_type;
38 using evp_pkey_type = ssl_types::evp_pkey_type;
39 using evp_cipher_ctx_type = ssl_types::evp_cipher_ctx_type;
40 using evp_cipher_type = ssl_types::evp_cipher_type;
41 using evp_md_ctx_type = ssl_types::evp_md_ctx_type;
42 using evp_md_type = ssl_types::evp_md_type;
43 using x509_lookup_method_type = ssl_types::x509_lookup_method_type;
44 using x509_lookup_type = ssl_types::x509_lookup_type;
45 using x509_store_ctx_type = ssl_types::x509_store_ctx_type;
46 using x509_store_type = ssl_types::x509_store_type;
47 using x509_crl_type = ssl_types::x509_crl_type;
48 using x509_type = ssl_types::x509_type;
49 using x509_stack_type = ssl_types::x509_stack_type;
51 using passwd_callback_type = int(
char*,
int,
int,
void*);
53 using x509_store_ctx_verify_callback_type = int(
int, x509_store_ctx_type*);
61 c_api_function_ptr<api_traits, nothing_t, Signature> Function>
74 ssl_api_function<
unsigned long(), EAGINE_SSL_STATIC_FUNC(ERR_get_error)>
77 ssl_api_function<
unsigned long(), EAGINE_SSL_STATIC_FUNC(ERR_peek_error)>
81 void(
unsigned long,
char*,
size_t),
82 EAGINE_SSL_STATIC_FUNC(ERR_error_string_n)>
86 ssl_api_function<
const ui_method_type*(), EAGINE_SSL_STATIC_FUNC(UI_null)>
89 ssl_api_function<ui_method_type*(), EAGINE_SSL_STATIC_FUNC(UI_OpenSSL)>
93 const ui_method_type*(),
94 EAGINE_SSL_STATIC_FUNC(UI_get_default_method)>
95 ui_get_default_method;
98 ssl_api_function<void(), EAGINE_SSL_STATIC_FUNC(ENGINE_load_builtin_engines)>
99 engine_load_builtin_engines;
101 ssl_api_function<engine_type*(), EAGINE_SSL_STATIC_FUNC(ENGINE_get_first)>
104 ssl_api_function<engine_type*(), EAGINE_SSL_STATIC_FUNC(ENGINE_get_last)>
108 engine_type*(engine_type*),
109 EAGINE_SSL_STATIC_FUNC(ENGINE_get_next)>
113 engine_type*(engine_type*),
114 EAGINE_SSL_STATIC_FUNC(ENGINE_get_prev)>
117 ssl_api_function<engine_type*(), EAGINE_SSL_STATIC_FUNC(ENGINE_new)>
121 engine_type*(
const char*),
122 EAGINE_SSL_STATIC_FUNC(ENGINE_by_id)>
125 ssl_api_function<int(engine_type*), EAGINE_SSL_STATIC_FUNC(ENGINE_up_ref)>
128 ssl_api_function<int(engine_type*), EAGINE_SSL_STATIC_FUNC(ENGINE_free)>
131 ssl_api_function<int(engine_type*), EAGINE_SSL_STATIC_FUNC(ENGINE_init)>
134 ssl_api_function<int(engine_type*), EAGINE_SSL_STATIC_FUNC(ENGINE_finish)>
138 const char*(
const engine_type*),
139 EAGINE_SSL_STATIC_FUNC(ENGINE_get_id)>
143 const char*(
const engine_type*),
144 EAGINE_SSL_STATIC_FUNC(ENGINE_get_name)>
149 EAGINE_SSL_STATIC_FUNC(ENGINE_set_default_RSA)>
150 engine_set_default_rsa;
154 EAGINE_SSL_STATIC_FUNC(ENGINE_set_default_DSA)>
155 engine_set_default_dsa;
159 EAGINE_SSL_STATIC_FUNC(ENGINE_set_default_DH)>
160 engine_set_default_dh;
164 EAGINE_SSL_STATIC_FUNC(ENGINE_set_default_RAND)>
165 engine_set_default_rand;
169 EAGINE_SSL_STATIC_FUNC(ENGINE_set_default_ciphers)>
170 engine_set_default_ciphers;
174 EAGINE_SSL_STATIC_FUNC(ENGINE_set_default_digests)>
175 engine_set_default_digests;
178 evp_pkey_type*(engine_type*,
const char*, ui_method_type*,
void*),
179 EAGINE_SSL_STATIC_FUNC(ENGINE_load_private_key)>
180 engine_load_private_key;
183 evp_pkey_type*(engine_type*,
const char*, ui_method_type*,
void*),
184 EAGINE_SSL_STATIC_FUNC(ENGINE_load_public_key)>
185 engine_load_public_key;
189 bio_type*(
const bio_method_type*),
190 EAGINE_SSL_STATIC_FUNC(BIO_new)>
194 bio_type*(
const void*, int),
195 EAGINE_SSL_STATIC_FUNC(BIO_new_mem_buf)>
198 ssl_api_function<int(bio_type*), EAGINE_SSL_STATIC_FUNC(BIO_up_ref)>
201 ssl_api_function<int(bio_type*), EAGINE_SSL_STATIC_FUNC(BIO_free)> bio_free;
203 ssl_api_function<void(bio_type*), EAGINE_SSL_STATIC_FUNC(BIO_free_all)>
208 int(
unsigned char*,
int num),
209 EAGINE_SSL_STATIC_FUNC(RAND_bytes)>
213 ssl_api_function<evp_pkey_type*(), EAGINE_SSL_STATIC_FUNC(EVP_PKEY_new)>
216 ssl_api_function<int(evp_pkey_type*), EAGINE_SSL_STATIC_FUNC(EVP_PKEY_up_ref)>
219 ssl_api_function<void(evp_pkey_type*), EAGINE_SSL_STATIC_FUNC(EVP_PKEY_free)>
223 const evp_cipher_type*(),
224 EAGINE_SSL_STATIC_FUNC(EVP_aes_128_ctr)>
228 const evp_cipher_type*(),
229 EAGINE_SSL_STATIC_FUNC(EVP_aes_128_ccm)>
233 const evp_cipher_type*(),
234 EAGINE_SSL_STATIC_FUNC(EVP_aes_128_gcm)>
238 const evp_cipher_type*(),
239 EAGINE_SSL_STATIC_FUNC(EVP_aes_128_xts)>
243 const evp_cipher_type*(),
244 EAGINE_SSL_STATIC_FUNC(EVP_aes_192_ecb)>
248 const evp_cipher_type*(),
249 EAGINE_SSL_STATIC_FUNC(EVP_aes_192_cbc)>
253 evp_cipher_ctx_type*(),
254 EAGINE_SSL_STATIC_FUNC(EVP_CIPHER_CTX_new)>
258 int(evp_cipher_ctx_type*),
259 EAGINE_SSL_STATIC_FUNC(EVP_CIPHER_CTX_reset)>
260 evp_cipher_ctx_reset;
263 void(evp_cipher_ctx_type*),
264 EAGINE_SSL_STATIC_FUNC(EVP_CIPHER_CTX_free)>
269 evp_cipher_ctx_type*,
270 const evp_cipher_type*,
271 const unsigned char*,
272 const unsigned char*,
274 EAGINE_SSL_STATIC_FUNC(EVP_CipherInit)>
279 evp_cipher_ctx_type*,
280 const evp_cipher_type*,
282 const unsigned char*,
283 const unsigned char*,
285 EAGINE_SSL_STATIC_FUNC(EVP_CipherInit_ex)>
289 int(evp_cipher_ctx_type*,
unsigned char*,
int*,
const unsigned char*,
int),
290 EAGINE_SSL_STATIC_FUNC(EVP_CipherUpdate)>
294 int(evp_cipher_ctx_type*,
unsigned char*,
int*),
295 EAGINE_SSL_STATIC_FUNC(EVP_CipherFinal_ex)>
299 int(evp_cipher_ctx_type*,
unsigned char*,
int*),
300 EAGINE_SSL_STATIC_FUNC(EVP_CipherFinal_ex)>
305 evp_cipher_ctx_type*,
306 const evp_cipher_type*,
307 const unsigned char*,
308 const unsigned char*),
309 EAGINE_SSL_STATIC_FUNC(EVP_EncryptInit)>
314 evp_cipher_ctx_type*,
315 const evp_cipher_type*,
317 const unsigned char*,
318 const unsigned char*),
319 EAGINE_SSL_STATIC_FUNC(EVP_EncryptInit_ex)>
323 int(evp_cipher_ctx_type*,
unsigned char*,
int*,
const unsigned char*,
int),
324 EAGINE_SSL_STATIC_FUNC(EVP_EncryptUpdate)>
328 int(evp_cipher_ctx_type*,
unsigned char*,
int*),
329 EAGINE_SSL_STATIC_FUNC(EVP_EncryptFinal_ex)>
333 int(evp_cipher_ctx_type*,
unsigned char*,
int*),
334 EAGINE_SSL_STATIC_FUNC(EVP_EncryptFinal_ex)>
335 evp_encrypt_final_ex;
339 evp_cipher_ctx_type*,
340 const evp_cipher_type*,
341 const unsigned char*,
342 const unsigned char*),
343 EAGINE_SSL_STATIC_FUNC(EVP_DecryptInit)>
348 evp_cipher_ctx_type*,
349 const evp_cipher_type*,
351 const unsigned char*,
352 const unsigned char*),
353 EAGINE_SSL_STATIC_FUNC(EVP_DecryptInit_ex)>
357 int(evp_cipher_ctx_type*,
unsigned char*,
int*,
const unsigned char*,
int),
358 EAGINE_SSL_STATIC_FUNC(EVP_DecryptUpdate)>
362 int(evp_cipher_ctx_type*,
unsigned char*,
int*),
363 EAGINE_SSL_STATIC_FUNC(EVP_DecryptFinal_ex)>
367 int(evp_cipher_ctx_type*,
unsigned char*,
int*),
368 EAGINE_SSL_STATIC_FUNC(EVP_DecryptFinal_ex)>
369 evp_decrypt_final_ex;
371 ssl_api_function<
const evp_md_type*(), EAGINE_SSL_STATIC_FUNC(EVP_md_null)>
374 ssl_api_function<
const evp_md_type*(), EAGINE_SSL_STATIC_FUNC(EVP_md5)>
377 ssl_api_function<
const evp_md_type*(), EAGINE_SSL_STATIC_FUNC(EVP_sha1)>
380 ssl_api_function<
const evp_md_type*(), EAGINE_SSL_STATIC_FUNC(EVP_sha224)>
383 ssl_api_function<
const evp_md_type*(), EAGINE_SSL_STATIC_FUNC(EVP_sha256)>
386 ssl_api_function<
const evp_md_type*(), EAGINE_SSL_STATIC_FUNC(EVP_sha384)>
389 ssl_api_function<
const evp_md_type*(), EAGINE_SSL_STATIC_FUNC(EVP_sha512)>
393 const evp_md_type*(
const char*),
394 EAGINE_SSL_STATIC_FUNC(EVP_get_digestbyname)>
395 evp_get_digest_by_name;
397 ssl_api_function<int(
const evp_md_type*), EAGINE_SSL_STATIC_FUNC(EVP_MD_size)>
401 int(
const evp_md_type*),
402 EAGINE_SSL_STATIC_FUNC(EVP_MD_block_size)>
405 ssl_api_function<evp_md_ctx_type*(), EAGINE_SSL_STATIC_FUNC(EVP_MD_CTX_new)>
409 int(evp_md_ctx_type*),
410 EAGINE_SSL_STATIC_FUNC(EVP_MD_CTX_reset)>
414 void(evp_md_ctx_type*),
415 EAGINE_SSL_STATIC_FUNC(EVP_MD_CTX_free)>
419 int(evp_md_ctx_type*,
const evp_md_type*),
420 EAGINE_SSL_STATIC_FUNC(EVP_DigestInit)>
424 int(evp_md_ctx_type*,
const evp_md_type*, engine_type*),
425 EAGINE_SSL_STATIC_FUNC(EVP_DigestInit_ex)>
429 int(evp_md_ctx_type*,
const void*,
size_t),
430 EAGINE_SSL_STATIC_FUNC(EVP_DigestUpdate)>
434 int(evp_md_ctx_type*,
unsigned char*,
unsigned int*),
435 EAGINE_SSL_STATIC_FUNC(EVP_DigestFinal_ex)>
439 int(evp_md_ctx_type*,
unsigned char*,
unsigned int*),
440 EAGINE_SSL_STATIC_FUNC(EVP_DigestFinal_ex)>
450 EAGINE_SSL_STATIC_FUNC(EVP_DigestSignInit)>
451 evp_digest_sign_init;
454 int(evp_md_ctx_type*,
const void*,
size_t),
455 EAGINE_SSL_STATIC_FUNC(EVP_DigestUpdate)>
456 evp_digest_sign_update;
459 int(evp_md_ctx_type*,
unsigned char*,
size_t*),
460 EAGINE_SSL_STATIC_FUNC(EVP_DigestSignFinal)>
461 evp_digest_sign_final;
470 EAGINE_SSL_STATIC_FUNC(EVP_DigestVerifyInit)>
471 evp_digest_verify_init;
474 int(evp_md_ctx_type*,
const void*,
size_t),
475 EAGINE_SSL_STATIC_FUNC(EVP_DigestUpdate)>
476 evp_digest_verify_update;
479 int(evp_md_ctx_type*,
const unsigned char*,
size_t),
480 EAGINE_SSL_STATIC_FUNC(EVP_DigestVerifyFinal)>
481 evp_digest_verify_final;
485 x509_lookup_method_type*(),
486 EAGINE_SSL_STATIC_FUNC(X509_LOOKUP_hash_dir)>
487 x509_lookup_hash_dir;
490 x509_lookup_method_type*(),
491 EAGINE_SSL_STATIC_FUNC(X509_LOOKUP_file)>
496 x509_store_ctx_type*(),
497 EAGINE_SSL_STATIC_FUNC(X509_STORE_CTX_new)>
501 int(x509_store_ctx_type*, x509_store_type*, x509_type*, x509_stack_type*),
502 EAGINE_SSL_STATIC_FUNC(X509_STORE_CTX_init)>
506 void(x509_store_ctx_type*, x509_stack_type*),
507 EAGINE_SSL_STATIC_FUNC(X509_STORE_CTX_set0_trusted_stack)>
508 x509_store_ctx_set0_trusted_stack;
511 void(x509_store_ctx_type*, x509_stack_type*),
512 EAGINE_SSL_STATIC_FUNC(X509_STORE_CTX_set0_verified_chain)>
513 x509_store_ctx_set0_verified_chain;
516 void(x509_store_ctx_type*, x509_stack_type*),
517 EAGINE_SSL_STATIC_FUNC(X509_STORE_CTX_set0_untrusted)>
518 x509_store_ctx_set0_untrusted;
521 void(x509_store_ctx_type*),
522 EAGINE_SSL_STATIC_FUNC(X509_STORE_CTX_cleanup)>
523 x509_store_ctx_cleanup;
526 void(x509_store_ctx_type*),
527 EAGINE_SSL_STATIC_FUNC(X509_STORE_CTX_free)>
531 int(x509_store_ctx_type*),
532 EAGINE_SSL_STATIC_FUNC(X509_verify_cert)>
536 ssl_api_function<x509_store_type*(), EAGINE_SSL_STATIC_FUNC(X509_STORE_new)>
540 int(x509_store_type*),
541 EAGINE_SSL_STATIC_FUNC(X509_STORE_up_ref)>
545 int(x509_store_type*),
546 EAGINE_SSL_STATIC_FUNC(X509_STORE_lock)>
550 int(x509_store_type*),
551 EAGINE_SSL_STATIC_FUNC(X509_STORE_unlock)>
555 void(x509_store_type*),
556 EAGINE_SSL_STATIC_FUNC(X509_STORE_free)>
560 int(x509_store_type*, x509_type*),
561 EAGINE_SSL_STATIC_FUNC(X509_STORE_add_cert)>
565 int(x509_store_type*, x509_crl_type*),
566 EAGINE_SSL_STATIC_FUNC(X509_STORE_add_crl)>
570 int(x509_store_type*,
const char*,
const char*),
571 EAGINE_SSL_STATIC_FUNC(X509_STORE_load_locations)>
572 x509_store_load_locations;
575 ssl_api_function<x509_crl_type*(), EAGINE_SSL_STATIC_FUNC(X509_CRL_new)>
578 ssl_api_function<void(x509_crl_type*), EAGINE_SSL_STATIC_FUNC(X509_CRL_free)>
582 ssl_api_function<x509_type*(), EAGINE_SSL_STATIC_FUNC(X509_new)> x509_new;
585 evp_pkey_type*(x509_type*),
586 EAGINE_SSL_STATIC_FUNC(X509_get_pubkey)>
590 evp_pkey_type*(
const x509_type*),
591 EAGINE_SSL_STATIC_FUNC(X509_get0_pubkey)>
594 ssl_api_function<void(x509_type*), EAGINE_SSL_STATIC_FUNC(X509_free)>
599 evp_pkey_type*(bio_type*, evp_pkey_type**, passwd_callback_type*,
void*),
600 EAGINE_SSL_STATIC_FUNC(PEM_read_bio_PrivateKey)>
601 pem_read_bio_private_key;
604 evp_pkey_type*(bio_type*, evp_pkey_type**, passwd_callback_type*,
void*),
605 EAGINE_SSL_STATIC_FUNC(PEM_read_bio_PUBKEY)>
609 x509_crl_type*(bio_type*, x509_crl_type**, passwd_callback_type*,
void*),
610 EAGINE_SSL_STATIC_FUNC(PEM_read_bio_X509_CRL)>
611 pem_read_bio_x509_crl;
614 x509_type*(bio_type*, x509_type**, passwd_callback_type*,
void*),
615 EAGINE_SSL_STATIC_FUNC(PEM_read_bio_X509)>
618 constexpr basic_ssl_c_api(api_traits& traits)
619 : err_get_error(
"ERR_get_error", traits, *this)
620 , err_peek_error(
"ERR_peek_error", traits, *this)
621 , err_error_string_n(
"ERR_error_string_n", traits, *this)
622 , ui_null(
"UI_null", traits, *this)
623 , ui_openssl(
"UI_OpenSSL", traits, *this)
624 , ui_get_default_method(
"UI_get_default_method", traits, *this)
625 , engine_load_builtin_engines(
"ENGINE_load_builtin_engines", traits, *this)
626 , engine_get_first(
"ENGINE_get_first", traits, *this)
627 , engine_get_last(
"ENGINE_get_last", traits, *this)
628 , engine_get_next(
"ENGINE_get_next", traits, *this)
629 , engine_get_prev(
"ENGINE_get_prev", traits, *this)
630 , engine_new(
"ENGINE_new", traits, *this)
631 , engine_by_id(
"ENGINE_by_id", traits, *this)
632 , engine_up_ref(
"ENGINE_up_ref", traits, *this)
633 , engine_free(
"ENGINE_free", traits, *this)
634 , engine_init(
"ENGINE_init", traits, *this)
635 , engine_finish(
"ENGINE_finish", traits, *this)
636 , engine_get_id(
"ENGINE_get_id", traits, *this)
637 , engine_get_name(
"ENGINE_get_name", traits, *this)
638 , engine_set_default_rsa(
"ENGINE_set_default_RSA", traits, *this)
639 , engine_set_default_dsa(
"ENGINE_set_default_DSA", traits, *this)
640 , engine_set_default_dh(
"ENGINE_set_default_DH", traits, *this)
641 , engine_set_default_rand(
"ENGINE_set_default_RAND", traits, *this)
642 , engine_set_default_ciphers(
"ENGINE_set_default_CIPHERS", traits, *this)
643 , engine_set_default_digests(
"ENGINE_set_default_DIGESTS", traits, *this)
644 , engine_load_private_key(
"ENGINE_load_private_key", traits, *this)
645 , engine_load_public_key(
"ENGINE_load_public_key", traits, *this)
646 , bio_new(
"BIO_new", traits, *this)
647 , bio_new_mem_buf(
"BIO_new_mem_buf", traits, *this)
648 , bio_up_ref(
"BIO_up_ref", traits, *this)
649 , bio_free(
"BIO_free", traits, *this)
650 , bio_free_all(
"BIO_free_all", traits, *this)
651 , rand_bytes(
"RAND_bytes", traits, *this)
652 , evp_pkey_new(
"EVP_PKEY_new", traits, *this)
653 , evp_pkey_up_ref(
"EVP_PKEY_up_ref", traits, *this)
654 , evp_pkey_free(
"EVP_PKEY_free", traits, *this)
655 , evp_aes_128_ctr(
"evp_aes_128_ctr", traits, *this)
656 , evp_aes_128_ccm(
"evp_aes_128_ccm", traits, *this)
657 , evp_aes_128_gcm(
"evp_aes_128_gcm", traits, *this)
658 , evp_aes_128_xts(
"evp_aes_128_xts", traits, *this)
659 , evp_aes_192_ecb(
"evp_aes_192_ecb", traits, *this)
660 , evp_aes_192_cbc(
"evp_aes_192_cbc", traits, *this)
661 , evp_cipher_ctx_new(
"EVP_CIPHER_CTX_new", traits, *this)
662 , evp_cipher_ctx_reset(
"EVP_CIPHER_CTX_reset", traits, *this)
663 , evp_cipher_ctx_free(
"EVP_CIPHER_CTX_free", traits, *this)
664 , evp_cipher_init(
"EVP_CipherInit", traits, *this)
665 , evp_cipher_init_ex(
"EVP_CipherInit_ex", traits, *this)
666 , evp_cipher_update(
"EVP_CipherUpdate", traits, *this)
667 , evp_cipher_final(
"EVP_CipherFinal", traits, *this)
668 , evp_cipher_final_ex(
"EVP_CipherFinal_ex", traits, *this)
669 , evp_encrypt_init(
"EVP_EncryptInit", traits, *this)
670 , evp_encrypt_init_ex(
"EVP_EncryptInit_ex", traits, *this)
671 , evp_encrypt_update(
"EVP_EncryptUpdate", traits, *this)
672 , evp_encrypt_final(
"EVP_EncryptFinal", traits, *this)
673 , evp_encrypt_final_ex(
"EVP_EncryptFinal_ex", traits, *this)
674 , evp_decrypt_init(
"EVP_DecryptInit", traits, *this)
675 , evp_decrypt_init_ex(
"EVP_DecryptInit_ex", traits, *this)
676 , evp_decrypt_update(
"EVP_DecryptUpdate", traits, *this)
677 , evp_decrypt_final(
"EVP_DecryptFinal", traits, *this)
678 , evp_decrypt_final_ex(
"EVP_DecryptFinal_ex", traits, *this)
679 , evp_md_null(
"EVP_md_null", traits, *this)
680 , evp_md5(
"EVP_md5", traits, *this)
681 , evp_sha1(
"EVP_sha1", traits, *this)
682 , evp_sha224(
"EVP_sha224", traits, *this)
683 , evp_sha256(
"EVP_sha256", traits, *this)
684 , evp_sha384(
"EVP_sha384", traits, *this)
685 , evp_sha512(
"EVP_sha512", traits, *this)
686 , evp_get_digest_by_name(
"EVP_get_digestbyname", traits, *this)
687 , evp_md_size(
"EVP_MD_size", traits, *this)
688 , evp_md_block_size(
"EVP_MD_block_size", traits, *this)
689 , evp_md_ctx_new(
"EVP_MD_CTX_new", traits, *this)
690 , evp_md_ctx_reset(
"EVP_MD_CTX_reset", traits, *this)
691 , evp_md_ctx_free(
"EVP_MD_CTX_free", traits, *this)
692 , evp_digest_init(
"EVP_DigestInit", traits, *this)
693 , evp_digest_init_ex(
"EVP_DigestInit_ex", traits, *this)
694 , evp_digest_update(
"EVP_DigestUpdate", traits, *this)
695 , evp_digest_final(
"EVP_DigestFinal", traits, *this)
696 , evp_digest_final_ex(
"EVP_DigestFinal_ex", traits, *this)
697 , evp_digest_sign_init(
"EVP_DigestSignInit", traits, *this)
698 , evp_digest_sign_update(
"EVP_DigestSignUpdate", traits, *this)
699 , evp_digest_sign_final(
"EVP_DigestSignFinal", traits, *this)
700 , evp_digest_verify_init(
"EVP_DigestVerifyInit", traits, *this)
701 , evp_digest_verify_update(
"EVP_DigestVerifyUpdate", traits, *this)
702 , evp_digest_verify_final(
"EVP_DigestVerifyFinal", traits, *this)
703 , x509_lookup_hash_dir(
"X509_LOOKUP_hash_dir", traits, *this)
704 , x509_lookup_file(
"X509_LOOKUP_file", traits, *this)
705 , x509_store_ctx_new(
"X509_STORE_CTX_new", traits, *this)
706 , x509_store_ctx_init(
"X509_STORE_CTX_init", traits, *this)
707 , x509_store_ctx_set0_trusted_stack(
708 "X509_STORE_CTX_set0_trusted_stack",
711 , x509_store_ctx_set0_verified_chain(
712 "X509_STORE_CTX_set0_verified_chain",
715 , x509_store_ctx_set0_untrusted(
716 "X509_STORE_CTX_set0_untrusted",
719 , x509_store_ctx_cleanup(
"X509_STORE_CTX_cleanup", traits, *this)
720 , x509_store_ctx_free(
"X509_STORE_CTX_free", traits, *this)
721 , x509_verify_cert(
"X509_verify_cert", traits, *this)
722 , x509_store_new(
"X509_STORE_new", traits, *this)
723 , x509_store_up_ref(
"X509_STORE_up_ref", traits, *this)
724 , x509_store_lock(
"X509_STORE_lock", traits, *this)
725 , x509_store_unlock(
"X509_STORE_unlock", traits, *this)
726 , x509_store_free(
"X509_STORE_free", traits, *this)
727 , x509_store_add_cert(
"X509_STORE_add_cert", traits, *this)
728 , x509_store_add_crl(
"X509_STORE_add_crl", traits, *this)
729 , x509_store_load_locations(
"X509_STORE_load_locations", traits, *this)
730 , x509_crl_new(
"X509_crl_new", traits, *this)
731 , x509_crl_free(
"X509_crl_free", traits, *this)
732 , x509_new(
"X509_new", traits, *this)
733 , x509_get_pubkey(
"X509_get_pubkey", traits, *this)
734 , x509_get0_pubkey(
"X509_get0_pubkey", traits, *this)
735 , x509_free(
"X509_free", traits, *this)
736 , pem_read_bio_private_key(
"PEM_read_bio_PrivateKey", traits, *this)
737 , pem_read_bio_pubkey(
"PEM_read_bio_PUBKEY", traits, *this)
738 , pem_read_bio_x509_crl(
"PEM_read_bio_X509_CRL", traits, *this)
739 , pem_read_bio_x509(
"PEM_read_bio_X509", traits, *this) {}
742 using ssl_c_api = basic_ssl_c_api<ssl_api_traits>;