https://github.com/drwetter/testssl.sh
Revision 91367caa71fc961cd6d1ab4be16f239980aecc90 authored by Emmanuel Fusté on 06 March 2024, 12:57:21 UTC, committed by Emmanuel Fusté on 06 March 2024, 12:57:21 UTC
There is a race condition if openssl exit during a renego but after
the RENEGOTIATING printing.
In this case we could issue a R before the process exit and be blocked
in the waiting loop.
With the safety guards in place (loop count + timeout) this is harmless
but not optimal.
Fix this by:
- reordering the sleep vs echo to let the process exit and catch the
  pipe error more frequently.
- exit the while loop if RENEGOTIATING is not the last log line. We
  will catch the pipe error on the next for loop echo.
- correct the k variable initialisation
- correct the for (( ; ; )) variable $ convention usage
- reduce the while loop count limit to 120 to align with the global
  timeout
1 parent 35496e5
Raw File
Tip revision: 91367caa71fc961cd6d1ab4be16f239980aecc90 authored by Emmanuel Fusté on 06 March 2024, 12:57:21 UTC
Fix and optimisation
Tip revision: 91367ca
CONTRIBUTING.md

### Contributions / participation

is always welcome, here @ github or via e-mail.

Note please the following

* Please read at least the [coding convention](https://github.com/drwetter/testssl.sh/Coding_Convention.md).
* One PR per feature or bug fix or improvement. Please do not mix issues.
* Document your PR, both in the PR and/or commit message and in the code.
* Please test your changes thoroughly as reliability is important for this project. You may want to check different servers with different settings.
* Travis runs automatically when anything is committed/PR'd. You should check any complains from Travis. Beforehand you can check with `prove -v`.
* If it's a new feature please consider writing a unit test for it. You can use e.g. `t/20_baseline_ipv4_http.t` as a template. The general documentation for [Test::More](https://perldoc.perl.org/Test/More.html) is a good start.
* If it's a new feature it would need to be documented in the appropriate section in `help()` and in `~/doc/testssl.1.md`

For questions just open an issue or feel free to send me an e-mail.

#### Patches via e-mail

Of course it is fine when you want to send in patches to use e-mail. For the address please grep for SWCONTACT in testssl.sh .
Let me know how you like them to be attributed.
back to top