Skip to content

Deprecate the public definition of ERR_STATE#9462

Closed
levitte wants to merge 3 commits intoopenssl:masterfrom
levitte:deprecate-err_state
Closed

Deprecate the public definition of ERR_STATE#9462
levitte wants to merge 3 commits intoopenssl:masterfrom
levitte:deprecate-err_state

Conversation

@levitte
Copy link
Member

@levitte levitte commented Jul 25, 2019

The intention is to make it opaque later on.

@levitte levitte added the branch: master Applies to master branch label Jul 25, 2019
@levitte
Copy link
Member Author

levitte commented Jul 25, 2019

This is a step toward #9082, which is marked to happen in 4.0

@levitte levitte mentioned this pull request Jul 25, 2019
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why you make a new public file to deprecated something. Why don't you just put the #if around it, instead of moving it to a new file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because crypto/err/err.c still needs the definition. The easiest was to place it in another file that is unguarded. Th other solution would be to duplicate the definition in a private header, but that would be a bad solution.

Copy link
Member Author

Choose a reason for hiding this comment

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

Another solution is to have an internal macro defined by crypto/err/err.c, say OPENSSL_FORCEDEF_ERR_STATE, which overrides deprecation. Is that preferable?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was typing that in my browser when your reply showed up. :) FWIW, I think that's preferable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okie. Maybe... Yesterday, I thought that was a bad idea, but I'm less sure today.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@kroeckx
Copy link
Member

kroeckx commented Jul 26, 2019

You also need to deprecate ERR_get_state

@levitte
Copy link
Member Author

levitte commented Jul 26, 2019

You also need to deprecate ERR_get_state

Ah, right

@levitte
Copy link
Member Author

levitte commented Jul 30, 2019

You also need to deprecate ERR_get_state

Done

mattcaswell
mattcaswell previously approved these changes Jul 30, 2019
@levitte
Copy link
Member Author

levitte commented Jul 30, 2019

I had forgotten make update

@levitte levitte requested a review from mattcaswell July 30, 2019 09:12
@levitte levitte dismissed mattcaswell’s stale review July 30, 2019 09:13

Forgot make update

@levitte levitte force-pushed the deprecate-err_state branch from d243457 to 02621bd Compare August 1, 2019 07:14
@mattcaswell mattcaswell added the approval: done This pull request has the required number of approvals label Sep 12, 2019
@levitte levitte force-pushed the deprecate-err_state branch from 4439fd3 to 4af440a Compare September 12, 2019 16:25
The intention is to make it opaque later on.
Internally, we still need this function, so we make it internal and
then add a new ERR_get_state() that simply calls the internal variant,
unless it's "removed" by configuration.
@levitte levitte force-pushed the deprecate-err_state branch from 4af440a to a98c3fa Compare September 12, 2019 16:35
@levitte
Copy link
Member Author

levitte commented Sep 12, 2019

Rebase meant a couple of small changes. Re-review, please?

Copy link
Member

@mattcaswell mattcaswell left a comment

Choose a reason for hiding this comment

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

Reconfirm

levitte added a commit that referenced this pull request Sep 13, 2019
The intention is to make it opaque later on.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from #9462)
levitte added a commit that referenced this pull request Sep 13, 2019
Internally, we still need this function, so we make it internal and
then add a new ERR_get_state() that simply calls the internal variant,
unless it's "removed" by configuration.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from #9462)
levitte added a commit that referenced this pull request Sep 13, 2019
@levitte
Copy link
Member Author

levitte commented Sep 13, 2019

Merged.

14e275e Deprecate the public definition of ERR_STATE
e5d4233 Deprecate ERR_get_state()
3c90534 Document the deprecation of ERR_STATE and ERR_get_state()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants