Fixed nxt_openssl_chain_file() return type.

This closes #182 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
This commit is contained in:
Valentin Bartenev
2018-11-13 18:43:39 +03:00
parent 4f4a2d8c63
commit ff9bed64da

View File

@@ -40,7 +40,7 @@ static void nxt_openssl_locks_free(void);
#endif #endif
static nxt_int_t nxt_openssl_server_init(nxt_task_t *task, static nxt_int_t nxt_openssl_server_init(nxt_task_t *task,
nxt_tls_conf_t *conf); nxt_tls_conf_t *conf);
static nxt_uint_t nxt_openssl_chain_file(SSL_CTX *ctx, nxt_fd_t fd); static nxt_int_t nxt_openssl_chain_file(SSL_CTX *ctx, nxt_fd_t fd);
static void nxt_openssl_server_free(nxt_task_t *task, nxt_tls_conf_t *conf); static void nxt_openssl_server_free(nxt_task_t *task, nxt_tls_conf_t *conf);
static void nxt_openssl_conn_init(nxt_task_t *task, nxt_tls_conf_t *conf, static void nxt_openssl_conn_init(nxt_task_t *task, nxt_tls_conf_t *conf,
nxt_conn_t *c); nxt_conn_t *c);
@@ -359,14 +359,14 @@ fail:
} }
static nxt_uint_t static nxt_int_t
nxt_openssl_chain_file(SSL_CTX *ctx, nxt_fd_t fd) nxt_openssl_chain_file(SSL_CTX *ctx, nxt_fd_t fd)
{ {
BIO *bio; BIO *bio;
X509 *cert, *ca; X509 *cert, *ca;
long reason; long reason;
EVP_PKEY *key; EVP_PKEY *key;
nxt_uint_t ret; nxt_int_t ret;
bio = BIO_new(BIO_s_fd()); bio = BIO_new(BIO_s_fd());
if (bio == NULL) { if (bio == NULL) {