Skip to content

Comments

remove OSSL_HTTP ->OCSP renaming#13671

Closed
richsalz wants to merge 4 commits intoopenssl:masterfrom
richsalz:rm-http-ocsp-naming
Closed

remove OSSL_HTTP ->OCSP renaming#13671
richsalz wants to merge 4 commits intoopenssl:masterfrom
richsalz:rm-http-ocsp-naming

Conversation

@richsalz
Copy link
Contributor

This is built on #13620 but could probably be split.

The way things were renamed to look like HTTP_OCSP_xxx as opposed to OCSP_xxx is wrong. The only thing enabled was that the implementation in crypto/http/http_client.c had "new" names, but a set of defines in the internal local header file crypto/http/http_local.h mapped those new names to "old" style names. The "old" names is what were exported.

I spent more than an hour trying to find definitions of documented functions, etc., but failed because of the "new" names.

Based on comments from David von Oheimb.
The OCSP_xxx names were exported anyway. Remove the define's that
had the internal implementation to use new-style names.
@richsalz
Copy link
Contributor Author

Also, a comment "this function isn't used" was wrong.

@richsalz richsalz changed the title Rm http ocsp naming remove HTTP_OCSP->OCSP renaming Dec 11, 2020
@richsalz
Copy link
Contributor Author

CI failure is the encode/decode thing and not relevant.

Copy link
Contributor

@DDvO DDvO left a comment

Choose a reason for hiding this comment

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

The 'solution' taken here to revert the name changes I did from OCSP_ to OSSL_HTTP_ back to OCSP is IMO entirely wrong!

Didn't you see that the data structure and the functions have been generalized from an OCSP-biased bare-bones HTTP client to a generic one where OCSP is just an instance?

I deliberately had kept the old names internally to simplify backward compatibility, though I admit that this can be confusing. Maybe a better way of achieving that would have been to rename the original function and provide #define's for providing access via the old names.

@richsalz
Copy link
Contributor Author

Sorry @DDvO I strongly disagree. Renaming the implementation but nothing else is really wrong IMO.

But if the project rejects this, that's okay. I don't know the mechanism if contributors can put a hold, but perhaps some group in the project (otc or committers) wishes to discuss it.

@DDvO
Copy link
Contributor

DDvO commented Dec 13, 2020

Sorry @DDvO I strongly disagree. Renaming the implementation but nothing else is really wrong IMO.

@richsalz, have you understood what #11404 #10667 was all about?
Your response did not sound like that.
Note that both the data structure and the function were not just renamed, but strongly generalized.
The old OCSP-focused client is history.

@DDvO
Copy link
Contributor

DDvO commented Dec 13, 2020

Oops, I meant the HTTP client as introduced PR #10667.
Renaming the functionality back to 'OCSP' would not make sense.

@richsalz
Copy link
Contributor Author

You are right, I didn't realize that OSSL_HTTP was documented and exposed. So the way the new names were handled is wrong. Will you fix it, or should I? I will close this PR.

@richsalz richsalz closed this Dec 13, 2020
@DDvO
Copy link
Contributor

DDvO commented Dec 13, 2020

All right. Let's first clarify how to solve the confusion the right way. How about the idea I gave above?
At the example of #define OSSL_HTTP_REQ_CTX_new OCSP_REQ_CTX_new this would mean:

  • rename the old/original function OCSP_REQ_CTX_new to OSSL_HTTP_REQ_CTX_new
  • for backward compatibility, `#define OCSP_REQ_CTX_new OSSL_HTTP_REQ_CTX_new
  • state in the doc that OCSP_REQ_CTX_new is deprecated and superseded by OSSL_HTTP_REQ_CTX_new

If you agree, would be nice if you can take over this, which could be done even as new version of this PR.

@DDvO DDvO changed the title remove HTTP_OCSP->OCSP renaming remove OSSL_HTTP ->OCSP renaming Dec 13, 2020
@richsalz
Copy link
Contributor Author

I agree and will do the deprecation as you describe.

@richsalz
Copy link
Contributor Author

Closing in favor of #13742.

@richsalz richsalz closed this Dec 27, 2020
@richsalz richsalz deleted the rm-http-ocsp-naming branch February 3, 2021 14:50
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.

3 participants