ngx_openssl_create_conf

时间:2025-03-11 12:24:40

ngx_openssl_create_conf 

声明在 src\event\ngx_event_openssl.c

static void *ngx_openssl_create_conf(ngx_cycle_t *cycle);

定义在 src\event\ngx_event_openssl.c

static void *
ngx_openssl_create_conf(ngx_cycle_t *cycle)
{
    ngx_openssl_conf_t  *oscf;

    oscf = ngx_pcalloc(cycle->pool, sizeof(ngx_openssl_conf_t));
    if (oscf == NULL) {
        return NULL;
    }

    /*
     * set by ngx_pcalloc():
     *
     *     oscf->engine = 0;
     */

    return oscf;
}

就是从内存池中分配一个 ngx_openssl_conf_t 结构体大小的内存,然后返回内存地址

ngx_openssl_conf_t -****博客