Skip to content

Commit

Permalink
SSL: ERR_peek_error_line_data() compatibility with OpenSSL 3.0.
Browse files Browse the repository at this point in the history
ERR_peek_error_line_data() was deprecated in favour of ERR_peek_error_all().
Here we use the ERR_peek_error_data() helper to pass only used arguments.
  • Loading branch information
pluknet committed Aug 10, 2021
1 parent b26858a commit 9609288
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/event/ngx_event_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3280,7 +3280,7 @@ ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...)

for ( ;; ) {

n = ERR_peek_error_line_data(NULL, NULL, &data, &flags);
n = ERR_peek_error_data(&data, &flags);

if (n == 0) {
break;
Expand Down
5 changes: 5 additions & 0 deletions src/event/ngx_event_openssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
#endif


#if (OPENSSL_VERSION_NUMBER < 0x30000000L && !defined ERR_peek_error_data)
#define ERR_peek_error_data(d, f) ERR_peek_error_line_data(NULL, NULL, d, f)
#endif


typedef struct ngx_ssl_ocsp_s ngx_ssl_ocsp_t;


Expand Down

0 comments on commit 9609288

Please sign in to comment.