Skip to content

HTTP client: Minimal changes that include the improved API#15147

Closed
DDvO wants to merge 6 commits intoopenssl:masterfrom
siemens:http_API_only
Closed

HTTP client: Minimal changes that include the improved API#15147
DDvO wants to merge 6 commits intoopenssl:masterfrom
siemens:http_API_only

Conversation

@DDvO
Copy link
Contributor

@DDvO DDvO commented May 4, 2021

This is a minimal version of #15053
including all the proposed improvements to the HTTP client API
but only those code adaptations strictly needed for it.

Is this helpful for reviewing the API and preliminary inclusion in the upcoming 3.0 beta1?

In case this gets merged, #15053 can then be based on it to provide the meat,
i.e., the implementation of the keep-alive feature etc., extended tests, and updated documentation.

Checklist
  • documentation is added or updated
  • tests are added or updated

@t8m
Copy link
Member

t8m commented May 5, 2021

I think both this API PR and the "meat" PR should be merged before beta1. And I am in favor of the split mainly because it keeps the size of the PRs more reasonable.

@DDvO
Copy link
Contributor Author

DDvO commented May 5, 2021

Thanks a lot @t8m for your response!

I think both this API PR and the "meat" PR should be merged before beta1.

Pleased to hear. Yes, this should make most sense.

And I am in favor of the split mainly because it keeps the size of the PRs more reasonable.

I'm glad that the extra effort I spent in tentatively providing this split is going to pay off.

Who can do the review(s) and start when, since unfortunately this is pretty urgent?

@DDvO
Copy link
Contributor Author

DDvO commented May 5, 2021

I'll take care of the remaining CI failures (due to mem leaks) later today...

@DDvO DDvO changed the title WIP: HTTP client: Minimal changes that include the improved API HTTP client: Minimal changes that include the improved API May 5, 2021
@DDvO
Copy link
Contributor Author

DDvO commented May 5, 2021

Mem leaks fixed.
check_update CI failure is unrelated.
Ready for review.

@DDvO DDvO marked this pull request as ready for review May 5, 2021 20:03
@DDvO DDvO force-pushed the http_API_only branch from a38b5f3 to 18792f7 Compare May 5, 2021 20:57
@DDvO
Copy link
Contributor Author

DDvO commented May 5, 2021

In order to get rid of the unrelated CI failure on check_update
I had to add an artificial commit for updating the FIPS checksums
since apparently this meanwhile required and someone forgot to do so.

@DDvO
Copy link
Contributor Author

DDvO commented May 6, 2021

@t8m, are you going to review this PR?
Its core are just some 130 lines changed in header files.

Copy link
Member

@t8m t8m left a comment

Choose a reason for hiding this comment

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

In general this looks good except for a few things.

@t8m
Copy link
Member

t8m commented May 6, 2021

You should be able to drop the fips.checksum update commit now.

@DDvO DDvO force-pushed the http_API_only branch from 18792f7 to 8e0c36c Compare May 6, 2021 19:19
@DDvO
Copy link
Contributor Author

DDvO commented May 6, 2021

In general this looks good except for a few things.

Pleased to hear - thanks for your swift review; I've handled all comments.

@DDvO
Copy link
Contributor Author

DDvO commented May 6, 2021

You should be able to drop the fips.checksum update commit now.

Yes 👍

@DDvO DDvO force-pushed the http_API_only branch from 651378c to 31ff16a Compare May 7, 2021 20:24
@DDvO
Copy link
Contributor Author

DDvO commented May 8, 2021

CI failures are unrelated - currently credential loading appears broken.

@DDvO DDvO force-pushed the http_API_only branch from 31ff16a to 4bd69e3 Compare May 8, 2021 13:30
@DDvO DDvO force-pushed the http_API_only branch from 4bd69e3 to 4f10541 Compare May 9, 2021 08:47
@DDvO
Copy link
Contributor Author

DDvO commented May 10, 2021

I'm still stuck with trying to dissect where the various new test failures come from, part of which are related to a strange regression in private key loading:
In case a key is not encrypted so far it did not hurt if a (useless) password for decryption was provided; now loading via OSSL_STORE fails.
Does anyone have a hint/idea why?

@DDvO
Copy link
Contributor Author

DDvO commented May 10, 2021

@t8m, I hope that, taking aside the test failures, you can still continue reviewing this PR, which meanwhile includes the updated and extended documentation.

@DDvO DDvO force-pushed the http_API_only branch 2 times, most recently from b7514be to cb8bc29 Compare May 10, 2021 12:53
@DDvO
Copy link
Contributor Author

DDvO commented May 10, 2021

I'm still stuck with trying to dissect where the various new test failures come from

I think I've managed to sufficiently trace them down and handle them.
Found and fixed an instability of the HTTP test server instability when it returns an error message.

part of which are related to a strange regression in private key loading:
In case a key is not encrypted so far it did not hurt if a (useless) password for decryption was provided; now loading via OSSL_STORE fails.

Since this issue is unrelated I've decoupled it from this PR by disabling the respective (unimportant) test case for now.
Update: Meanwhile found the root cause - see 15219.
So reverted the planned improvement on asn1_d2i_read_bio(), and no need to adapt the tests.

@DDvO DDvO force-pushed the http_API_only branch from 1274692 to 4cb445c Compare May 11, 2021 10:09
@DDvO DDvO requested a review from t8m May 11, 2021 10:16
Copy link
Member

@t8m t8m left a comment

Choose a reason for hiding this comment

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

Just some small stuff remaining to fix and I'll approve. Please do not rebase.

Copy link
Member

@t8m t8m left a comment

Choose a reason for hiding this comment

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

Good work!

@t8m t8m added approval: done This pull request has the required number of approvals and removed approval: otc review pending labels May 11, 2021
@DDvO
Copy link
Contributor Author

DDvO commented May 11, 2021

Good work!

Thank you 😄

@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@DDvO DDvO added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels May 12, 2021
openssl-machine pushed a commit that referenced this pull request May 12, 2021
…bio()

ASN1_item_d2i_bio(): Do not report errors in queue on BIO input being NULL

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #15147)
openssl-machine pushed a commit that referenced this pull request May 12, 2021
This is a minimal version of pull request #15053 including all the
proposed improvements to the HTTP client API and its documentation
but only those code adaptations strictly needed for it.

The proposed new features include
* support for persistent connections (keep-alive),
* generalization to arbitrary request and response types, and
* support for streaming BIOs for request and response data.

The related API changes include:
* Split the monolithic OSSL_HTTP_transfer() into OSSL_HTTP_open(),
  OSSL_HTTP_set_request(), a lean OSSL_HTTP_transfer(), and OSSL_HTTP_close().
* Split the timeout functionality accordingly and improve default behavior.
* Extract part of OSSL_HTTP_REQ_CTX_new() to OSSL_HTTP_REQ_CTX_set_expected().

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #15147)
@DDvO
Copy link
Contributor Author

DDvO commented May 12, 2021

Merged - thanks a lot @t8m for the timely handling of this non-trivial PR!

@DDvO DDvO closed this May 12, 2021
devnexen pushed a commit to devnexen/openssl that referenced this pull request Jul 7, 2021
…bio()

ASN1_item_d2i_bio(): Do not report errors in queue on BIO input being NULL

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#15147)
devnexen pushed a commit to devnexen/openssl that referenced this pull request Jul 7, 2021
This is a minimal version of pull request openssl#15053 including all the
proposed improvements to the HTTP client API and its documentation
but only those code adaptations strictly needed for it.

The proposed new features include
* support for persistent connections (keep-alive),
* generalization to arbitrary request and response types, and
* support for streaming BIOs for request and response data.

The related API changes include:
* Split the monolithic OSSL_HTTP_transfer() into OSSL_HTTP_open(),
  OSSL_HTTP_set_request(), a lean OSSL_HTTP_transfer(), and OSSL_HTTP_close().
* Split the timeout functionality accordingly and improve default behavior.
* Extract part of OSSL_HTTP_REQ_CTX_new() to OSSL_HTTP_REQ_CTX_set_expected().

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#15147)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants