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

err: remove ERR_GET_FUNC() #16004

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGES.md
Expand Up @@ -30,6 +30,12 @@ breaking changes, and mappings for the large list of deprecated functions.

### Changes between 1.1.1 and 3.0 [xx XXX xxxx]

* The ERR_GET_FUNC() function was removed. With the loss of meaningful
function codes, this function can only cause problems for calling
applications.

*Paul Dale*

Copy link
Member

Choose a reason for hiding this comment

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

This should be mentioned in NEWS.md too

* Add a configurable flag to output date formats as ISO 8601. Does not
change the default date format.

Expand Down Expand Up @@ -1061,6 +1067,8 @@ breaking changes, and mappings for the large list of deprecated functions.
* Removed the function names from error messages and deprecated the
xxx_F_xxx define's.

*Richard Levitte*

* Removed NextStep support and the macro OPENSSL_UNISTD

*Rich Salz*
Expand Down
14 changes: 6 additions & 8 deletions doc/man3/ERR_GET_LIB.pod
Expand Up @@ -2,7 +2,7 @@

=head1 NAME

ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON, ERR_FATAL_ERROR
ERR_GET_LIB, ERR_GET_REASON, ERR_FATAL_ERROR
- get information from error codes

=head1 SYNOPSIS
Expand All @@ -11,16 +11,14 @@ ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON, ERR_FATAL_ERROR

int ERR_GET_LIB(unsigned long e);

int ERR_GET_FUNC(unsigned long e);

int ERR_GET_REASON(unsigned long e);

int ERR_FATAL_ERROR(unsigned long e);

=head1 DESCRIPTION

The error code returned by ERR_get_error() consists of a library
number, function code and reason code. ERR_GET_LIB(), ERR_GET_FUNC()
number, function code and reason code. ERR_GET_LIB()
and ERR_GET_REASON() can be used to extract these.

ERR_FATAL_ERROR() indicates whether a given error code is a fatal error.
Expand All @@ -37,8 +35,7 @@ B<ERR_R_...> reason codes such as B<ERR_R_MALLOC_FAILURE> are globally
unique. However, when checking for sub-library specific reason codes,
be sure to also compare the library number.

ERR_GET_LIB(), ERR_GET_FUNC(), ERR_GET_REASON(), and ERR_FATAL_ERROR()
are macros.
ERR_GET_LIB(), ERR_GET_REASON(), and ERR_FATAL_ERROR() are macros.

=head1 RETURN VALUES

Expand All @@ -52,8 +49,9 @@ L<ERR_get_error(3)>

=head1 HISTORY

ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are available in
all versions of OpenSSL.
ERR_GET_LIB() and ERR_GET_REASON() are available in all versions of OpenSSL.

ERR_GET_FUNC() was removed in OpenSSL 3.0.

=head1 COPYRIGHT

Expand Down
5 changes: 0 additions & 5 deletions include/openssl/err.h.in
Expand Up @@ -247,11 +247,6 @@ static ossl_unused ossl_inline int ERR_GET_LIB(unsigned long errcode)
return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
}

static ossl_unused ossl_inline int ERR_GET_FUNC(unsigned long errcode ossl_unused)
{
return 0;
}

static ossl_unused ossl_inline int ERR_GET_RFLAGS(unsigned long errcode)
{
if (ERR_SYSTEM_ERROR(errcode))
Expand Down
1 change: 0 additions & 1 deletion util/other.syms
Expand Up @@ -234,7 +234,6 @@ DTLS_get_link_min_mtu define
DTLS_set_link_mtu define
ENGINE_cleanup define deprecated 1.1.0
ERR_FATAL_ERROR define
ERR_GET_FUNC define
ERR_GET_LIB define
ERR_GET_REASON define
ERR_PACK define
Expand Down