Welcome! Log In Create A New Profile

Advanced

question about ngx_ssl_clear_error()

何龙
January 28, 2015 09:00AM
in src/event/ngx_event_openssl.c:1907, i found function
ngx_ssl_clear_error() call openssl function ERR_peek_error() in a
while loop, intend to clear global error code queue,

but according to openssl's documents and source code, ERR_peek_error() will not
pop the first error code , and it does not modify the queue.

so it looks like this will cause a busy loop.

is my understanding correct?

reference:

nginx source code
"
static void
ngx_ssl_clear_error(ngx_log_t *log)
{
while (ERR_peek_error()) {
ngx_ssl_error(NGX_LOG_ALERT, log, 0, "ignoring stale global SSL error");
}

ERR_clear_error();
}

"

openssl source code:
https://github.com/openssl/openssl/blob/master/crypto/err/err.c#L770

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

question about ngx_ssl_clear_error()

何龙 1269 January 28, 2015 09:00AM

Re: question about ngx_ssl_clear_error()

何龙 544 January 28, 2015 09:08AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 104
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready