fermitools / cigetcert

Get an X.509 certificate with SAML ECP and store proxies.
Other
2 stars 6 forks source link

reduced default timeout to 1 minute #24

Closed ghost closed 8 years ago

DrDaveD commented 8 years ago

Examples I see, for example this one say to also set sslconn.setdefaulttimeout() to cover the original connection. Could you please add that?

Also while you're at it, please change tab characters to blanks.

ghost commented 8 years ago

setdefaulttimeout() is a socket function, I believe the M2crypto connection has settimeout() that does something similar

DrDaveD commented 8 years ago

Yes you're right that using sslconn.settimeout is better. I have done some testing now and socket.setdefaulttimeout doesn't even do anything. It's good to set sslconn.settimeout because even though when a host doesn't respond it times out because of the read timeout, the error message with sslconn.settimeout changes from "urlopen error (115, 'Operation now in progress')" to "urlopen error timed out" which is more descriptive.

Also I think 60 seconds is too long -- please change the timeouts to 15.

DrDaveD commented 8 years ago

I just tested cigetcert on Debian for the first time, and found that the sslconn.settimeout function was missing. I'm not sure yet what to do about it. That was just about the only change needed other than the path for the cafile.