[tor-commits] [stem/master] Normalize ORPort type check for debian

atagar at torproject.org atagar at torproject.org
Sat Oct 6 17:52:42 UTC 2018


commit 9013e20153fc4cb0d526c96bb32aece2465c0d1c
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Oct 6 10:51:20 2018 -0700

    Normalize ORPort type check for debian
    
    Prior adjustments for this check broke the normalization for our jenkins test
    runs. Now that I know what it's running making the normalization fix.
---
 stem/client/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/stem/client/__init__.py b/stem/client/__init__.py
index 6cadc098..8e8bb118 100644
--- a/stem/client/__init__.py
+++ b/stem/client/__init__.py
@@ -87,10 +87,11 @@ class Relay(object):
       # instead) we'll likely fail during SSL negotiation. This can result
       # in a variety of responses so normalizing what we can...
       #
+      #   Debian 9.5:     [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:661)
       #   Ubuntu 16.04:   [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)
       #   Ubuntu 12.04:   [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
 
-      if 'unknown protocol' in str(exc):
+      if 'unknown protocol' in str(exc) or 'wrong version number' in str(exc):
         raise stem.SocketError("Failed to SSL authenticate to %s:%i. Maybe it isn't an ORPort?" % (address, port))
 
       raise



More information about the tor-commits mailing list