int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx, unsigned int ext_type, custom_ext_add_cb add_cb, custom_ext_free_cb free_cb, void *add_arg, custom_ext_parse_cb parse_cb, void *parse_arg) { return custom_ext_meth_add(&ctx->cert->srv_ext, ext_type, add_cb, free_cb, add_arg, parse_cb, parse_arg); }
/* Application level functions to add custom extension callbacks */ int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, unsigned int ext_type, custom_ext_add_cb add_cb, custom_ext_free_cb free_cb, void *add_arg, custom_ext_parse_cb parse_cb, void *parse_arg) { #ifndef OPENSSL_NO_CT /* * We don't want applications registering callbacks for SCT extensions * whilst simultaneously using the built-in SCT validation features, as * these two things may not play well together. */ if (ext_type == TLSEXT_TYPE_signed_certificate_timestamp && SSL_CTX_ct_is_enabled(ctx)) return 0; #endif return custom_ext_meth_add(&ctx->cert->cli_ext, ext_type, add_cb, free_cb, add_arg, parse_cb, parse_arg); }