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

Fix flush #104

Merged
merged 10 commits into from
May 10, 2023
Merged

Fix flush #104

merged 10 commits into from
May 10, 2023

Conversation

craff
Copy link
Contributor

@craff craff commented Jan 10, 2023

No description provided.

src/ssl.ml Show resolved Hide resolved
@craff
Copy link
Contributor Author

craff commented Jan 10, 2023

By the way, the tread_safe parameter to Ssl.init should be enough ? Why to keep a separate Ssl_thread module with nothing in it ? I will do another PR.

@craff
Copy link
Contributor Author

craff commented Jan 10, 2023

And thanks for your review.

@anmonteiro
Copy link
Collaborator

Why to keep a separate Ssl_thread module with nothing in it ?

Probably for backwards compatibility. It's a breaking change to remove it, and will likely break some OPAM code. An analysis of the opam repository should probably be done first.

@craff
Copy link
Contributor Author

craff commented Jan 10, 2023

We can keep Ssl_thread.init, mark it as deprecated and make Ssl.init ~thread_safe true position the reference
so that it is sufficient to be thread safe?

@craff
Copy link
Contributor Author

craff commented Jan 10, 2023

I fixed the problem of compilation on 5.0 without using Thread.Exit. So now it compiles with both old OCaml and 5.0. test shoud work.

@craff
Copy link
Contributor Author

craff commented Jan 10, 2023

My previous comment was unclear: ocaml-ssl did not compile on 5.0 because of Thread.exit () deprecated and warn as error. My first fix was bad (broke even 4.13!), I just added a "+w 3" in dune for tests/util.ml to keep the warning and not make it an error.

@craff
Copy link
Contributor Author

craff commented Jan 11, 2023

The build on macos failed to download alcotest for a strange reason. Probably a temporary failure.

@craff craff closed this Apr 6, 2023
@craff craff reopened this May 10, 2023
@craff craff mentioned this pull request May 10, 2023
src/ssl.mli Outdated Show resolved Hide resolved
tests/dune Outdated Show resolved Hide resolved
craff and others added 2 commits May 9, 2023 19:52
Co-authored-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
src/ssl.mli Outdated Show resolved Hide resolved
Copy link
Collaborator

@anmonteiro anmonteiro left a comment

Choose a reason for hiding this comment

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

Thanks

@anmonteiro anmonteiro merged commit 3fed67f into savonet:master May 10, 2023
4 of 6 checks passed
anmonteiro added a commit that referenced this pull request May 23, 2023
anmonteiro added a commit that referenced this pull request May 23, 2023
anmonteiro added a commit to anmonteiro/opam-repository that referenced this pull request Jun 2, 2023
CHANGES:

- Raise an error when `Ssl.flush` isn't successful (savonet/ocaml-ssl#104, savonet/ocaml-ssl#120)
- Add an API-compatible `Ssl.Runtime_lock` module. The functions in this module
  don't release the OCaml runtime lock. While they don't allow other OCaml
  threads to run concurrently, they don't perform any copying in the underlying
  data, leading certain workloads to be faster than their counterparts that
  release the lock. (savonet/ocaml-ssl#106)
- Guarantee `Ssl.output_string` writes the whole string by retrying the
  operation with unwritten bytes (savonet/ocaml-ssl#103, savonet/ocaml-ssl#116)
- Fix calls in C stubs that need to call `ERR_clear_error` before the underlying
  OpenSSL call (savonet/ocaml-ssl#118)
- Add a module `Ssl.Error` to retrieve OpenSSL errors in a structured way (savonet/ocaml-ssl#119)
- Deprecate Ssl.{SSLv23,SSLv3,TLSv1,TLSv1_1}, which were were formally
  deprecated in March 2021 and earlier (savonet/ocaml-ssl#115).
anmonteiro added a commit to anmonteiro/opam-repository that referenced this pull request Jun 3, 2023
CHANGES:

- Raise an error when `Ssl.flush` isn't successful (savonet/ocaml-ssl#104, savonet/ocaml-ssl#120)
- Add an API-compatible `Ssl.Runtime_lock` module. The functions in this module
  don't release the OCaml runtime lock. While they don't allow other OCaml
  threads to run concurrently, they don't perform any copying in the underlying
  data, leading certain workloads to be faster than their counterparts that
  release the lock. (savonet/ocaml-ssl#106)
- Guarantee `Ssl.output_string` writes the whole string by retrying the
  operation with unwritten bytes (savonet/ocaml-ssl#103, savonet/ocaml-ssl#116)
- Fix calls in C stubs that need to call `ERR_clear_error` before the underlying
  OpenSSL call (savonet/ocaml-ssl#118)
- Add a module `Ssl.Error` to retrieve OpenSSL errors in a structured way (savonet/ocaml-ssl#119)
- Deprecate Ssl.{SSLv23,SSLv3,TLSv1,TLSv1_1}, which were were formally
  deprecated in March 2021 and earlier (savonet/ocaml-ssl#115).
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.

None yet

2 participants