X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fssl_lib.c;h=6a33b9ddff50e765d22e23ca9d1b781926bd3e8f;hp=98f4018014df4414403fddc5891a0c8d683865a4;hb=ecf4d660902dcef6e0afc51d52926f00d409ee6b;hpb=879bde123b18afdcb2aecf67f5c807c016bbcf73 diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 98f4018014..6a33b9ddff 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1751,76 +1751,6 @@ void SSL_CTX_set_next_proto_select_cb(SSL_CTX *ctx, int (*cb) (SSL *s, unsigned } # endif -static int cert_set_custom_cli_ext(CERT *cert, unsigned short ext_type, - custom_cli_ext_first_cb_fn fn1, - custom_cli_ext_second_cb_fn fn2, void* arg) - { - size_t i; - custom_cli_ext_record* record; - - /* Check for duplicates */ - for (i=0; i < cert->custom_cli_ext_records_count; i++) - if (ext_type == cert->custom_cli_ext_records[i].ext_type) - return 0; - - cert->custom_cli_ext_records = OPENSSL_realloc(cert->custom_cli_ext_records, - (cert->custom_cli_ext_records_count + 1) * - sizeof(custom_cli_ext_record)); - if (!cert->custom_cli_ext_records) { - cert->custom_cli_ext_records_count = 0; - return 0; - } - cert->custom_cli_ext_records_count++; - record = &cert->custom_cli_ext_records[cert->custom_cli_ext_records_count - 1]; - record->ext_type = ext_type; - record->fn1 = fn1; - record->fn2 = fn2; - record->arg = arg; - return 1; - } - -static int cert_set_custom_srv_ext(CERT *cert, unsigned short ext_type, - custom_srv_ext_first_cb_fn fn1, - custom_srv_ext_second_cb_fn fn2, void* arg) - { - size_t i; - custom_srv_ext_record* record; - - /* Check for duplicates */ - for (i=0; i < cert->custom_srv_ext_records_count; i++) - if (ext_type == cert->custom_srv_ext_records[i].ext_type) - return 0; - - cert->custom_srv_ext_records = OPENSSL_realloc(cert->custom_srv_ext_records, - (cert->custom_srv_ext_records_count + 1) * - sizeof(custom_srv_ext_record)); - if (!cert->custom_srv_ext_records) { - cert->custom_srv_ext_records_count = 0; - return 0; - } - cert->custom_srv_ext_records_count++; - record = &cert->custom_srv_ext_records[cert->custom_srv_ext_records_count - 1]; - record->ext_type = ext_type; - record->fn1 = fn1; - record->fn2 = fn2; - record->arg = arg; - return 1; - } - -int SSL_CTX_set_custom_cli_ext(SSL_CTX *ctx, unsigned short ext_type, - custom_cli_ext_first_cb_fn fn1, - custom_cli_ext_second_cb_fn fn2, void *arg) - { - return cert_set_custom_cli_ext(ctx->cert, ext_type, fn1, fn2,arg); - } - -int SSL_CTX_set_custom_srv_ext(SSL_CTX *ctx, unsigned short ext_type, - custom_srv_ext_first_cb_fn fn1, - custom_srv_ext_second_cb_fn fn2, void *arg) - { - return cert_set_custom_srv_ext(ctx->cert, ext_type, fn1, fn2,arg); - } - /* SSL_CTX_set_alpn_protos sets the ALPN protocol list on |ctx| to |protos|. * |protos| must be in wire-format (i.e. a series of non-empty, 8-bit * length-prefixed strings). @@ -3645,7 +3575,6 @@ void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx) return ctx->cert->sec_ex; } - #if defined(_WINDLL) && defined(OPENSSL_SYS_WIN16) #include "../crypto/bio/bss_file.c" #endif