Giter VIP home page Giter VIP logo

Comments (5)

tomato42 avatar tomato42 commented on May 20, 2024

The problem is that scripts_retention.py executes the scripts as normal executables (it doesn't import them to execute), so it doesn't have any special impact on the runtime of it, it can only change environment variables and/or command line options.

Using the socket.setdefaulttimeout won't work because the default is always overriden:

def __init__(self, hostname, port, version=(3, 0), timeout=5):
"""
Provide minimal settings needed to connect to other peer.
:param str hostname: host name of the server to connect to
:param int port: :term:`TCP` port number to connect to
:param tuple(int,int) version: the protocol version used in the
record layer for the initial messages
:param float timeout: amount of time to wait while expecting a message
before aborting the connection, in seconds
"""
super(Connect, self).__init__()
self.hostname = hostname
self.port = port
self.version = version
self.timeout = timeout
def process(self, state):
"""Connect to a server."""
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(self.timeout)

Adding support for -t timeout to all script would be the better. Not sure why you think integration would be harder, there's support for common_arguments to pass -t timeout to all scripts (including option to override it on a per-script basis), e.g.:

"common_arguments" : ["-k", "tests/clientX509Key.pem",
"-c", "tests/clientX509Cert.pem"],

from tlsfuzzer.

ueno avatar ueno commented on May 20, 2024

there's support for common_arguments to pass -t timeout to all scripts (including option to override it on a per-script basis)

Oh, ok; I wasn't aware of that option.

Adding support for -t timeout to all script would be the better.

One more thing that might prevent this is that test-tls13-count-tickets.py uses -t for a different meaning (ticket count).

from tlsfuzzer.

tomato42 avatar tomato42 commented on May 20, 2024

One more thing that might prevent this is that test-tls13-count-tickets.py uses -t for a different meaning (ticket count).

hmm, technically it's reserved for the timeout:

# -t timeout to wait for messages (also count of NSTs in
# test-tls13-count-tickets.py)

but yes, that script is the exception, we may need to break compatibility on it

from tlsfuzzer.

tomato42 avatar tomato42 commented on May 20, 2024

I've been thinking a bit more about it, and I wonder if it really just wouldn't be better to change the timeout on that one (test-tls13-ffdhe-sanity.py) script (maybe even make its default larger in the script proper)...

The thing is that 5 seconds for a reply, especially on a localhost is quite generous, but this particular test runs through all the different FFDHE key sizes, and 8192 bit DH is really slow, so on an overwhelmed CI host I can imagine the calculation alone taking 5 seconds... At the same time, even the slowest ECDH should be faster by few orders of magnitude, same for 2048bit DH, so other scripts shouldn't really be impacted.

from tlsfuzzer.

tomato42 avatar tomato42 commented on May 20, 2024

fixed by #782

from tlsfuzzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.