Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace OpenSSL's ERR_PACK with ERR_GET_REASON #631

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

valldrac
Copy link
Contributor

ERR_PACK is internal of OpenSSL and there's no need to filter out by the function name in this case. The comment in the code already suggests to replace it with ERR_GET_REASON.

It also fixes this error when compiling Unbound with BoringSSL:

C/C++: .../boringssl/include/openssl/err.h:468:9: note: macro 'ERR_PACK' defined here
C/C++: #define ERR_PACK(lib, reason)                                              \
C/C++:         ^
C/C++: util/netevent.c:1215:55: error: too many arguments provided to function-like macro invocation
C/C++:                 err == ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_GET_RECORD, SSL_R_HTTP_REQUEST) ||

Copy link
Member

@wcawijngaards wcawijngaards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure that code looks good and more generic.

@wcawijngaards wcawijngaards merged commit fbbb42c into NLnetLabs:master Feb 18, 2022
wcawijngaards added a commit that referenced this pull request Feb 18, 2022
- Merge #631 from mollyim: Replace OpenSSL's ERR_PACK with
  ERR_GET_REASON.
@wcawijngaards
Copy link
Member

Thanks for the patch! Merged it to increase openssl library compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants