Mercurial > hg > nginx-quic
view src/os/win32/ngx_thread.c @ 5989:ec01b1d1fff1
Mail: client SSL certificates support.
The "ssl_verify_client", "ssl_verify_depth", "ssl_client_certificate",
"ssl_trusted_certificate", and "ssl_crl" directives introduced to control
SSL client certificate verification in mail proxy module.
If there is a certificate, detail of the certificate are passed to
the auth_http script configured via Auth-SSL-Verify, Auth-SSL-Subject,
Auth-SSL-Issuer, Auth-SSL-Serial, Auth-SSL-Fingerprint headers. If
the auth_http_pass_client_cert directive is set, client certificate
in PEM format will be passed in the Auth-SSL-Cert header (urlencoded).
If there is no required certificate provided during an SSL handshake
or certificate verification fails then a protocol-specific error is
returned after the SSL handshake and the connection is closed.
Based on previous work by Sven Peter, Franck Levionnois and Filipe Da Silva.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 25 Feb 2015 17:48:05 +0300 |
parents | 2942a827da09 |
children | 94ce52db3367 |
line wrap: on
line source
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> ngx_int_t ngx_threads_n; static size_t stack_size; ngx_err_t ngx_create_thread(ngx_tid_t *tid, ngx_thread_value_t (__stdcall *func)(void *arg), void *arg, ngx_log_t *log) { u_long id; ngx_err_t err; *tid = CreateThread(NULL, stack_size, func, arg, 0, &id); if (*tid != NULL) { ngx_log_error(NGX_LOG_NOTICE, log, 0, "create thread " NGX_TID_T_FMT, id); return 0; } err = ngx_errno; ngx_log_error(NGX_LOG_ALERT, log, err, "CreateThread() failed"); return err; } ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle) { stack_size = size; return NGX_OK; } ngx_err_t ngx_thread_key_create(ngx_tls_key_t *key) { *key = TlsAlloc(); if (*key == TLS_OUT_OF_INDEXES) { return ngx_errno; } return 0; } ngx_err_t ngx_thread_set_tls(ngx_tls_key_t *key, void *data) { if (TlsSetValue(*key, data) == 0) { return ngx_errno; } return 0; } ngx_mutex_t * ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags) { ngx_mutex_t *m; m = ngx_alloc(sizeof(ngx_mutex_t), log); if (m == NULL) { return NULL; } m->log = log; /* STUB */ return m; } /* STUB */ void ngx_mutex_lock(ngx_mutex_t *m) { return; } ngx_int_t ngx_mutex_trylock(ngx_mutex_t *m) { return NGX_OK; } void ngx_mutex_unlock(ngx_mutex_t *m) { return; } /**/