portable icon indicating copy to clipboard operation
portable copied to clipboard

SSL_ERROR_SYSCALL in connection

Open luisgomes-olx opened this issue 6 years ago • 14 comments

Hi, currently running into a wall with libressl (ssl in general connections using libressl).

Error 1:

MacBook-Pro:portable ddd$ curl https://pypi.org curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to pypi.org:443

wget https://bootstrap.pypa.io/get-pip.py --2018-06-04 01:14:10-- https://bootstrap.pypa.io/get-pip.py Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 2a04:4e42:4::175, 151.101.16.175 Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|2a04:4e42:4::175|:443... connected. Unable to establish SSL connection.

Even in the browser the site fails to open (pypi.org or any of the websites that are present on a default pip action), this tells me that if I can open other websites like gmail or similar this could be a problem with this website but I do the exactttt same in my other Linux boxes or even windows and only in macOS is failing with the libressl lib. Furthermore I did 2 clean installs (internet recovery even on the macbook pro and still got the same issue with libressl at version 2.7.x or 2.8.0).

Error 2:

MacBook-Pro:portable ddd$ pip3 install requests Collecting requests Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))': /simple/requests/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))': /simple/requests/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))': /simple/requests/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))': /simple/requests/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))': /simple/requests/ Could not find a version that satisfies the requirement requests (from versions: ) No matching distribution found for requests

OS: MacOS High Sierra

Openssl version:

MacBook-Pro:portable ddd$ openssl version LibreSSL 2.7.3

OpenSSL connect:

openssl s_client -connect pypi.org:443 -msg
CONNECTED(00000005)
>>> TLS 1.2 Handshake [length 00c3], ClientHello
    01 00 00 bf 03 03 4a 9d 29 ad 05 39 82 0c eb 9a
    1f 92 4c 4c 30 f9 6b e2 a0 b5 89 48 bb f1 81 f0
    d2 61 36 1d 8b eb 00 00 60 c0 30 c0 2c c0 28 c0
    24 c0 14 c0 0a 00 9f 00 6b 00 39 cc a9 cc a8 cc
    aa ff 85 00 c4 00 88 00 81 00 9d 00 3d 00 35 00
    c0 00 84 c0 2f c0 2b c0 27 c0 23 c0 13 c0 09 00
    9e 00 67 00 33 00 be 00 45 00 9c 00 3c 00 2f 00
    ba 00 41 c0 11 c0 07 00 05 00 04 c0 12 c0 08 00
    16 00 0a 00 15 00 09 00 ff 01 00 00 36 00 0b 00
    02 01 00 00 0a 00 08 00 06 00 1d 00 17 00 18 00
    23 00 00 00 0d 00 1c 00 1a 06 01 06 03 ef ef 05
    01 05 03 04 01 04 03 ee ee ed ed 03 01 03 03 02
    01 02 03
<<< TLS 1.2 Handshake [length 003d], ServerHello
    02 00 00 39 03 03 b5 af d2 07 4f dc e3 8b 99 fc
    d0 70 db 83 ab 02 7a d2 57 ce b9 39 5c f2 c9 84
    5a 22 b1 06 84 bc 00 c0 2f 00 00 11 ff 01 00 01
    00 00 0b 00 04 03 00 01 02 00 23 00 00
<<< TLS 1.2 Handshake [length 0cc2], Certificate
    0b 00 0c be 00 0c bb 00 07 fb 30 82 07 f7 30 82
    06 df a0 03 02 01 02 02 10 0c 4a 84 23 8e 73 44
    55 9b b8 4d 1e 0f 31 88 83 30 0d 06 09 2a 86 48
    86 f7 0d 01 01 0b 05 00 30 75 31 0b 30 09 06 03
    55 04 06 13 02 55 53 31 15 30 13 06 03 55 04 0a
    13 0c 44 69 67 69 43 65 72 74 20 49 6e 63 31 19
    30 17 06 03 55 04 0b 13 10 77 77 77 2e 64 69 67
    69 63 65 72 74 2e 63 6f 6d 31 34 30 32 06 03 55
    04 03 13 2b 44 69 67 69 43 65 72 74 20 53 48 41
    32 20 45 78 74 65 6e 64 65 64 20 56 61 6c 69 64
    61 74 69 6f 6e 20 53 65 72 76 65 72 20 43 41 30
    1e 17 0d 31 38 30 33 32 38 30 30 30 30 30 30 5a
    17 0d 31 38 30 39 32 37 31 32 30 30 30 30 5a 30
    81 d8 31 1d 30 1b 06 03 55 04 0f 0c 14 50 72 69
    76 61 74 65 20 4f 72 67 61 6e 69 7a 61 74 69 6f
    6e 31 13 30 11 06 0b 2b 06 01 04 01 82 37 3c 02
    01 03 13 02 55 53 31 19 30 17 06 0b 2b 06 01 04
    01 82 37 3c 02 01 02 13 08 44 65 6c 61 77 61 72
    65 31 10 30 0e 06 03 55 04 05 13 07 33 33 35 39
    33 30 30 31 0b 30 09 06 03 55 04 06 13 02 55 53
    31 16 30 14 06 03 55 04 08 13 0d 4e 65 77 20 48
    61 6d 70 73 68 69 72 65 31 12 30 10 06 03 55 04
    07 13 09 57 6f 6c 66 65 62 6f 72 6f 31 23 30 21
    06 03 55 04 0a 13 1a 50 79 74 68 6f 6e 20 53 6f
    66 74 77 61 72 65 20 46 6f 75 6e 64 61 74 69 6f
    6e 31 17 30 15 06 03 55 04 03 13 0e 77 77 77 2e
    70 79 74 68 6f 6e 2e 6f 72 67 30 82 01 22 30 0d
    06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01
    0f 00 30 82 01 0a 02 82 01 01 00 c1 d4 b6 46 d5
    88 1d 59 3b 85 17 35 53 80 19 3c 1d 84 ae a7 2b
    da d9 5a 81 f4 4d cd 6c 60 42 62 ce 54 3c 7c c0
    97 e6 a8 89 5e be 6f 2f 64 4c 4c 85 b9 5e 86 58
    e9 b7 2e 6b 66 f4 c4 60 09 b1 32 28 e0 bc 76 ee
    27 ca cd a2 03 b3 e8 db 85 d1 06 06 53 d1 d1 a8
    2d 1f 1b ef e0 d4 17 06 13 68 51 85 7c 2b 09 bb
    eb 74 d9 bb 95 7d e0 e6 7e 1d c3 55 1b 66 62 f8
    64 49 f7 f6 fe 66 4b 41 40 df 6c 1f 80 c8 36 ae
    5b 98 ca 36 94 ca dc 71 00 cf a5 5a a5 4c 4d 7c
    52 79 6f 87 44 0d 2d ca c1 4c 36 f2 79 7b 50 a9
    f2 d9 3f 76 9e 07 bd a4 eb 5c 1d 5a f5 6e 22 44
    66 e6 a5 64 aa dd 45 d7 fd ea ca 2c b3 dd e5 da
    8e 37 55 ed ea 9d 2e 01 bb 9a 1b 3c da be 4b 16
    eb ea 69 53 17 6c e9 67 75 aa 9f b3 63 38 32 1c
    94 92 1a 9e fe 91 e8 95 d4 3f 5c 58 61 bc e6 e4
    d1 77 2b f0 dc 04 e4 6e 5b d7 e1 02 03 01 00 01
    a3 82 04 1d 30 82 04 19 30 1f 06 03 55 1d 23 04
    18 30 16 80 14 3d d3 50 a5 d6 a0 ad ee f3 4a 60
    0a 65 d3 21 d4 f8 f8 d6 0f 30 1d 06 03 55 1d 0e
    04 16 04 14 69 01 23 d3 f5 c8 29 8c b2 ac b5 4d
    f4 d9 d8 10 0d a7 e5 90 30 82 01 42 06 03 55 1d
    11 04 82 01 39 30 82 01 35 82 0e 77 77 77 2e 70
    79 74 68 6f 6e 2e 6f 72 67 82 0f 64 6f 63 73 2e
    70 79 74 68 6f 6e 2e 6f 72 67 82 0f 62 75 67 73
    2e 70 79 74 68 6f 6e 2e 6f 72 67 82 0f 77 69 6b
    69 2e 70 79 74 68 6f 6e 2e 6f 72 67 82 0d 68 67
    2e 70 79 74 68 6f 6e 2e 6f 72 67 82 0f 6d 61 69
    6c 2e 70 79 74 68 6f 6e 2e 6f 72 67 82 0f 70 79
    70 69 2e 70 79 74 68 6f 6e 2e 6f 72 67 82 14 70
    61 63 6b 61 67 69 6e 67 2e 70 79 74 68 6f 6e 2e
    6f 72 67 82 10 6c 6f 67 69 6e 2e 70 79 74 68 6f
    6e 2e 6f 72 67 82 12 64 69 73 63 75 73 73 2e 70
    79 74 68 6f 6e 2e 6f 72 67 82 0c 75 73 2e 70 79
    63 6f 6e 2e 6f 72 67 82 07 70 79 70 69 2e 69 6f
    82 0c 64 6f 63 73 2e 70 79 70 69 2e 69 6f 82 08
    70 79 70 69 2e 6f 72 67 82 0d 64 6f 63 73 2e 70
    79 70 69 2e 6f 72 67 82 0f 64 6f 6e 61 74 65 2e
    70 79 70 69 2e 6f 72 67 82 13 64 65 76 67 75 69
    64 65 2e 70 79 74 68 6f 6e 2e 6f 72 67 82 13 77
    77 77 2e 62 75 67 73 2e 70 79 74 68 6f 6e 2e 6f
    72 67 82 0a 70 79 74 68 6f 6e 2e 6f 72 67 30 0e
    06 03 55 1d 0f 01 01 ff 04 04 03 02 05 a0 30 1d
    06 03 55 1d 25 04 16 30 14 06 08 2b 06 01 05 05
    07 03 01 06 08 2b 06 01 05 05 07 03 02 30 75 06
    03 55 1d 1f 04 6e 30 6c 30 34 a0 32 a0 30 86 2e
    68 74 74 70 3a 2f 2f 63 72 6c 33 2e 64 69 67 69
    63 65 72 74 2e 63 6f 6d 2f 73 68 61 32 2d 65 76
    2d 73 65 72 76 65 72 2d 67 32 2e 63 72 6c 30 34
    a0 32 a0 30 86 2e 68 74 74 70 3a 2f 2f 63 72 6c
    34 2e 64 69 67 69 63 65 72 74 2e 63 6f 6d 2f 73
    68 61 32 2d 65 76 2d 73 65 72 76 65 72 2d 67 32
    2e 63 72 6c 30 4b 06 03 55 1d 20 04 44 30 42 30
    37 06 09 60 86 48 01 86 fd 6c 02 01 30 2a 30 28
    06 08 2b 06 01 05 05 07 02 01 16 1c 68 74 74 70
    73 3a 2f 2f 77 77 77 2e 64 69 67 69 63 65 72 74
    2e 63 6f 6d 2f 43 50 53 30 07 06 05 67 81 0c 01
    01 30 81 88 06 08 2b 06 01 05 05 07 01 01 04 7c
    30 7a 30 24 06 08 2b 06 01 05 05 07 30 01 86 18
    68 74 74 70 3a 2f 2f 6f 63 73 70 2e 64 69 67 69
    63 65 72 74 2e 63 6f 6d 30 52 06 08 2b 06 01 05
    05 07 30 02 86 46 68 74 74 70 3a 2f 2f 63 61 63
    65 72 74 73 2e 64 69 67 69 63 65 72 74 2e 63 6f
    6d 2f 44 69 67 69 43 65 72 74 53 48 41 32 45 78
    74 65 6e 64 65 64 56 61 6c 69 64 61 74 69 6f 6e
    53 65 72 76 65 72 43 41 2e 63 72 74 30 0c 06 03
    55 1d 13 01 01 ff 04 02 30 00 30 82 01 03 06 0a
    2b 06 01 04 01 d6 79 02 04 02 04 81 f4 04 81 f1
    00 ef 00 76 00 bb d9 df bc 1f 8a 71 b5 93 94 23
    97 aa 92 7b 47 38 57 95 0a ab 52 e8 1a 90 96 64
    36 8e 1e d1 85 00 00 01 62 6d 97 38 a4 00 00 04
    03 00 47 30 45 02 21 00 ff 00 26 e9 0b 64 b6 88
    32 e9 70 17 14 07 14 6a 2b 79 75 4b c7 7f 7b b0
    38 25 f9 73 ed f3 2e a8 02 20 41 9d 86 c0 ce 35
    dc ce ae a1 a0 1b aa 4a 47 ac 60 22 7f 87 9b ae
    37 0f ed bb c3 94 f1 cb 1b 6d 00 75 00 56 14 06
    9a 2f d7 c2 ec d3 f5 e1 bd 44 b2 3e c7 46 76 b9
    bc 99 11 5c c0 ef 94 98 55 d6 89 d0 dd 00 00 01
    62 6d 97 38 a1 00 00 04 03 00 46 30 44 02 20 25
    73 6f eb 2e ec 31 13 c8 4d cd ff 9e d4 97 e5 52
    18 ed 13 ed ab dc b5 b5 98 4c 69 db 61 6e 38 02
    20 22 e2 c8 5c 6b b2 24 6a 51 47 9e 04 63 6f b5
    ee d8 07 85 49 2e 16 c4 9d a8 5d 93 39 26 29 70
    51 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00
    03 82 01 01 00 5a c0 0c db f3 45 4d a5 7c 1f 4a
    25 2a c4 dd 50 c6 b5 79 fd d3 5f ae b7 67 c8 e1
    c6 37 0c ae 71 22 3c 93 6a 4a e5 53 e4 4a f7 42
    bc a9 fe 9d 24 37 75 fa 4b cb cc 38 91 d0 d6 f0
    7e 2e b8 ee 57 c2 82 01 84 ac 8f 41 2c a9 55 ef
    91 7f 2e d5 84 d8 5d c1 85 ff 7e 14 a4 99 06 42
    c8 24 66 be 41 12 b4 9f e0 16 bd 02 eb a2 0d 64
    d5 e6 37 ef 3d 9e c0 eb f8 e9 aa 77 95 3b 24 f6
    da 27 5c 4e 14 5b f6 b8 5d fb 29 1f fd bf 4e 25
    ee 4d 0e 6f 82 a4 52 3e 7c 61 ad d4 a7 da e2 b2
    89 3b 86 40 9c c8 eb 44 33 d9 80 f5 74 35 e3 38
    66 a8 e5 e4 fb 23 cb f7 c9 01 ae 0c a9 78 d1 cd
    b0 f4 6f d7 0a 06 eb 4f 8c e6 44 4d fb 25 00 b9
    84 52 fb a1 09 be f9 8b ef 8f 99 44 58 d9 d5 6c
    3d cf f9 ea a2 97 14 a4 6f b7 39 5b 52 58 22 b3
    c1 c1 10 91 ec e5 07 9a 7d 77 32 88 43 fd 68 89
    94 80 66 8d fd 00 04 ba 30 82 04 b6 30 82 03 9e
    a0 03 02 01 02 02 10 0c 79 a9 44 b0 8c 11 95 20
    92 61 5f e2 6b 1d 83 30 0d 06 09 2a 86 48 86 f7
    0d 01 01 0b 05 00 30 6c 31 0b 30 09 06 03 55 04
    06 13 02 55 53 31 15 30 13 06 03 55 04 0a 13 0c
    44 69 67 69 43 65 72 74 20 49 6e 63 31 19 30 17
    06 03 55 04 0b 13 10 77 77 77 2e 64 69 67 69 63
    65 72 74 2e 63 6f 6d 31 2b 30 29 06 03 55 04 03
    13 22 44 69 67 69 43 65 72 74 20 48 69 67 68 20
    41 73 73 75 72 61 6e 63 65 20 45 56 20 52 6f 6f
    74 20 43 41 30 1e 17 0d 31 33 31 30 32 32 31 32
    30 30 30 30 5a 17 0d 32 38 31 30 32 32 31 32 30
    30 30 30 5a 30 75 31 0b 30 09 06 03 55 04 06 13
    02 55 53 31 15 30 13 06 03 55 04 0a 13 0c 44 69
    67 69 43 65 72 74 20 49 6e 63 31 19 30 17 06 03
    55 04 0b 13 10 77 77 77 2e 64 69 67 69 63 65 72
    74 2e 63 6f 6d 31 34 30 32 06 03 55 04 03 13 2b
    44 69 67 69 43 65 72 74 20 53 48 41 32 20 45 78
    74 65 6e 64 65 64 20 56 61 6c 69 64 61 74 69 6f
    6e 20 53 65 72 76 65 72 20 43 41 30 82 01 22 30
    0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82
    01 0f 00 30 82 01 0a 02 82 01 01 00 d7 53 a4 04
    51 f8 99 a6 16 48 4b 67 27 aa 93 49 d0 39 ed 0c
    b0 b0 00 87 f1 67 28 86 85 8c 8e 63 da bc b1 40
    38 e2 d3 f5 ec a5 05 18 b8 3d 3e c5 99 17 32 ec
    18 8c fa f1 0c a6 64 21 85 cb 07 10 34 b0 52 88
    2b 1f 68 9b d2 b1 8f 12 b0 b3 d2 e7 88 1f 1f ef
    38 77 54 53 5f 80 79 3f 2e 1a aa a8 1e 4b 2b 0d
    ab b7 63 b9 35 b7 7d 14 bc 59 4b df 51 4a d2 a1
    e2 0c e2 90 82 87 6a ae ea d7 64 d6 98 55 e8 fd
    af 1a 50 6c 54 bc 11 f2 fd 4a f2 9d bb 7f 0e f4
    d5 be 8e 16 89 12 55 d8 c0 71 34 ee f6 dc 2d ec
    c4 87 25 86 8d d8 21 e4 b0 4d 0c 89 dc 39 26 17
    dd f6 d7 94 85 d8 04 21 70 9d 6f 6f ff 5c ba 19
    e1 45 cb 56 57 28 7e 1c 0d 41 57 aa b7 b8 27 bb
    b1 e4 fa 2a ef 21 23 75 1a ad 2d 9b 86 35 8c 9c
    77 b5 73 ad d8 94 2d e4 f3 0c 9d ee c1 4e 62 7e
    17 c0 71 9e 2c de f1 f9 10 28 19 33 02 03 01 00
    01 a3 82 01 49 30 82 01 45 30 12 06 03 55 1d 13
    01 01 ff 04 08 30 06 01 01 ff 02 01 00 30 0e 06
    03 55 1d 0f 01 01 ff 04 04 03 02 01 86 30 1d 06
    03 55 1d 25 04 16 30 14 06 08 2b 06 01 05 05 07
    03 01 06 08 2b 06 01 05 05 07 03 02 30 34 06 08
    2b 06 01 05 05 07 01 01 04 28 30 26 30 24 06 08
    2b 06 01 05 05 07 30 01 86 18 68 74 74 70 3a 2f
    2f 6f 63 73 70 2e 64 69 67 69 63 65 72 74 2e 63
    6f 6d 30 4b 06 03 55 1d 1f 04 44 30 42 30 40 a0
    3e a0 3c 86 3a 68 74 74 70 3a 2f 2f 63 72 6c 34
    2e 64 69 67 69 63 65 72 74 2e 63 6f 6d 2f 44 69
    67 69 43 65 72 74 48 69 67 68 41 73 73 75 72 61
    6e 63 65 45 56 52 6f 6f 74 43 41 2e 63 72 6c 30
    3d 06 03 55 1d 20 04 36 30 34 30 32 06 04 55 1d
    20 00 30 2a 30 28 06 08 2b 06 01 05 05 07 02 01
    16 1c 68 74 74 70 73 3a 2f 2f 77 77 77 2e 64 69
    67 69 63 65 72 74 2e 63 6f 6d 2f 43 50 53 30 1d
    06 03 55 1d 0e 04 16 04 14 3d d3 50 a5 d6 a0 ad
    ee f3 4a 60 0a 65 d3 21 d4 f8 f8 d6 0f 30 1f 06
    03 55 1d 23 04 18 30 16 80 14 b1 3e c3 69 03 f8
    bf 47 01 d4 98 26 1a 08 02 ef 63 64 2b c3 30 0d
    06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 03 82 01
    01 00 9d b6 d0 90 86 e1 86 02 ed c5 a0 f0 34 1c
    74 c1 8d 76 cc 86 0a a8 f0 4a 8a 42 d6 3f c8 a9
    4d ad 7c 08 ad e6 b6 50 b8 a2 1a 4d 88 07 b1 29
    21 dc e7 da c6 3c 21 e0 e3 11 49 70 ac 7a 1d 01
    a4 ca 11 3a 57 ab 7d 57 2a 40 74 fd d3 1d 85 18
    50 df 57 47 75 a1 7d 55 20 2e 47 37 50 72 8c 7f
    82 1b d2 62 8f 2d 03 5a da c3 c8 a1 ce 2c 52 a2
    00 63 eb 73 ba 71 c8 49 27 23 97 64 85 9e 38 0e
    ad 63 68 3c ba 52 81 58 79 a3 2c 0c df de 6d eb
    31 f2 ba a0 7c 6c f1 2c d4 e1 bd 77 84 37 03 ce
    32 b5 c8 9a 81 1a 4a 92 4e 3b 46 9a 85 fe 83 a2
    f9 9e 8c a3 cc 0d 5e b3 3d cf 04 78 8f 14 14 7b
    32 9c c7 00 a6 5c c4 b5 a1 55 8d 5a 56 68 a4 22
    70 aa 3c 81 71 d9 9d a8 45 3b f4 e5 f6 a2 51 dd
    c7 7b 62 e8 6f 0c 74 eb b8 da f8 bf 87 0d 79 50
    91 90 9b 18 3b 91 59 27 f1 35 28 13 ab 26 7e d5
    f7 7a
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert High Assurance EV Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert SHA2 Extended Validation Server CA
verify return:1
depth=0 businessCategory = Private Organization, jurisdictionCountryName = US, jurisdictionStateOrProvinceName = Delaware, serialNumber = 3359300, C = US, ST = New Hampshire, L = Wolfeboro, O = Python Software Foundation, CN = www.python.org
verify return:1
<<< TLS 1.2 Handshake [length 012c], ServerKeyExchange
    0c 00 01 28 03 00 1d 20 00 5a 25 d0 d0 3a 02 11
    77 b3 41 67 b1 ac 60 11 93 15 24 5d 12 3f 05 de
    71 6e 3b 77 92 08 da 02 06 01 01 00 22 b1 d9 51
    4e e7 74 1f 46 c3 39 87 e6 70 03 da 2d 4b 28 b4
    90 8f 11 6b 0c 9b 97 94 ae 3f b2 3a ac 4c cf 64
    39 a7 d1 b8 1a 2d 7b f2 18 fe ff 6d 19 0b 0e f1
    f3 76 fe a1 0d 4e 3b 47 51 0e 24 4d cb 67 71 10
    d7 8e 03 eb 45 21 48 5a 11 ec ee 93 b9 89 ba fb
    13 97 37 3c 55 9e 0d a5 81 02 9b 4b 68 f3 ce 7c
    40 50 a7 49 3b d0 14 f6 e5 12 05 9a a3 05 83 e4
    33 9e b4 3a 2a 9b 0d 02 ce ae 5d b3 34 d1 7d 83
    eb 80 db bc e9 e2 0f d3 0f e5 98 7d c1 23 91 a1
    17 ce 2a 95 c4 77 30 41 10 cc 26 ba 96 0f f9 bf
    24 46 13 83 00 fe 94 06 bd 2c 62 3b f2 07 a2 e0
    05 3a a3 73 4b 97 73 d8 46 b4 41 cc f7 28 65 ba
    9d fd 87 ae 2f c5 81 40 ab 06 ba 06 e3 2e 10 df
    f9 03 69 f8 1a 13 95 61 f6 e8 09 63 04 ab 64 53
    37 0d 61 3f f6 be 4c 03 4f 87 3d 46 92 40 21 fe
    5a 18 cf 3c 7e c1 6f 89 9c b2 f3 9f
<<< TLS 1.2 Handshake [length 0004], ServerHelloDone
    0e 00 00 00
>>> TLS 1.2 Handshake [length 0025], ClientKeyExchange
    10 00 00 21 20 fd d4 70 f2 db 59 5c bb c4 80 5a
    3a 0c 87 76 b8 81 9a 95 66 96 40 0a 7d a3 ca 26
    99 8f 0c 05 73
>>> TLS 1.2 ChangeCipherSpec [length 0001]
    01
>>> TLS 1.2 Handshake [length 0010], Finished
    14 00 00 0c df 0d 64 02 d9 ad 1e 09 ad c1 67 5c
write:errno=54
---
Certificate chain
 0 s:/businessCategory=Private Organization/jurisdictionCountryName=US/jurisdictionStateOrProvinceName=Delaware/serialNumber=3359300/C=US/ST=New Hampshire/L=Wolfeboro/O=Python Software Foundation/CN=www.python.org
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
 1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIH9zCCBt+gAwIBAgIQDEqEI45zRFWbuE0eDzGIgzANBgkqhkiG9w0BAQsFADB1
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQ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pov18Ls0/XhvUSyPsdGdrm8mRFcwO+UmFXW
idDdAAABYm2XOKEAAAQDAEYwRAIgJXNv6y7sMRPITc3/ntSX5VIY7RPtq9y1tZhM
adthbjgCICLiyFxrsiRqUUeeBGNvte7YB4VJLhbEnahdkzkmKXBRMA0GCSqGSIb3
DQEBCwUAA4IBAQBawAzb80VNpXwfSiUqxN1QxrV5/dNfrrdnyOHGNwyucSI8k2pK
5VPkSvdCvKn+nSQ3dfpLy8w4kdDW8H4uuO5XwoIBhKyPQSypVe+Rfy7VhNhdwYX/
fhSkmQZCyCRmvkEStJ/gFr0C66INZNXmN+89nsDr+Omqd5U7JPbaJ1xOFFv2uF37
KR/9v04l7k0Ob4KkUj58Ya3Up9risok7hkCcyOtEM9mA9XQ14zhmqOXk+yPL98kB
rgypeNHNsPRv1woG60+M5kRN+yUAuYRS+6EJvvmL74+ZRFjZ1Ww9z/nqopcUpG+3
OVtSWCKzwcEQkezlB5p9dzKIQ/1oiZSAZo39
-----END CERTIFICATE-----
subject=/businessCategory=Private Organization/jurisdictionCountryName=US/jurisdictionStateOrProvinceName=Delaware/serialNumber=3359300/C=US/ST=New Hampshire/L=Wolfeboro/O=Python Software Foundation/CN=www.python.org
issuer=/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
---
No client certificate CA names sent
Server Temp Key: ECDH, X25519, 253 bits
---
SSL handshake has read 3651 bytes and written 93 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES128-GCM-SHA256
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: CE8D9938EAB89BA0FB439298DF4B57D2550A594BC3CE66A62DBFBD3BE63DEDB095BE3E5337CFC2C613F75F3E0D050C68
    Start Time: 1528065161
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---

Is this "libressl" problem or i'm just being dummy for taking your time with this.

luisgomes-olx avatar Jun 03 '18 22:06 luisgomes-olx

After "TLS 1.2 Handshake [length 0010], Finished", you had write:errno=54 (Connection reset by peer).

On my fedora28 with libressl 2.8.0, I didn't see any error with s_client, like below.

$ local/bin/openssl s_client -connect pypi.org:443 -msg
CONNECTED(00000003)
>>> TLS 1.2 Handshake [length 00c3], ClientHello
    01 00 00 bf 03 03 96 10 0e 80 c3 63 53 ce 27 49
...
    01 02 03
<<< TLS 1.2 Handshake [length 003d], ServerHello
    02 00 00 39 03 03 7a c7 17 61 9b 3d 05 83 8d 23
...
    00 00 0b 00 04 03 00 01 02 00 23 00 00
<<< TLS 1.2 Handshake [length 0cc2], Certificate
    0b 00 0c be 00 0c bb 00 07 fb 30 82 07 f7 30 82
...
    91 90 9b 18 3b 91 59 27 f1 35 28 13 ab 26 7e d5
    f7 7a
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert High Assurance EV Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert SHA2 Extended Validation Server CA
verify return:1
depth=0 businessCategory = Private Organization, jurisdictionCountryName = US, jurisdictionStateOrProvinceName = Delaware, serialNumber = 3359300, C = US, ST = New Hampshire, L = Wolfeboro, O = Python Software Foundation, CN = www.python.org
verify return:1
<<< TLS 1.2 Handshake [length 012c], ServerKeyExchange
    0c 00 01 28 03 00 1d 20 1c 17 a5 c3 63 c6 46 56
...
    b0 d5 d5 b8 80 ce d5 8c 4e 30 59 c8
<<< TLS 1.2 Handshake [length 0004], ServerHelloDone
    0e 00 00 00
>>> TLS 1.2 Handshake [length 0025], ClientKeyExchange
    10 00 00 21 20 e2 7a 42 3f fb 7b fe e5 5b 99 ed
    e6 78 27 e9 bc 05 c9 71 7d b9 a6 32 9f c9 75 2a
    33 39 4c fc 65
>>> TLS 1.2 ChangeCipherSpec [length 0001]
    01
>>> TLS 1.2 Handshake [length 0010], Finished
    14 00 00 0c 06 d6 57 47 7e 81 7c 3e 22 f1 4f 29
<<< TLS 1.2 Handshake [length 00aa]???
    04 00 00 a6 00 00 1c 20 00 a0 09 ba ba ba 54 b4
...
    2c 72 f2 9c 68 21 07 d7 54 d9
<<< TLS 1.2 ChangeCipherSpec [length 0001]
    01
<<< TLS 1.2 Handshake [length 0010], Finished
    14 00 00 0c 09 af 15 e9 fe 6a 7c 34 4b 62 f4 7a
---
Certificate chain
 0 s:/businessCategory=Private Organization/jurisdictionCountryName=US/jurisdictionStateOrProvinceName=Delaware/serialNumber=3359300/C=US/ST=New Hampshire/L=Wolfeboro/O=Python Software Foundation/CN=www.python.org
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
 1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIH9zCCBt+gAwIBAgIQDEqEI45zRFWbuE0eDzGIgzANBgkqhkiG9w0BAQsFADB1
...
OVtSWCKzwcEQkezlB5p9dzKIQ/1oiZSAZo39
-----END CERTIFICATE-----
subject=/businessCategory=Private Organization/jurisdictionCountryName=US/jurisdictionStateOrProvinceName=Delaware/serialNumber=3359300/C=US/ST=New Hampshire/L=Wolfeboro/O=Python Software Foundation/CN=www.python.org
issuer=/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
---
No client certificate CA names sent
Server Temp Key: ECDH, X25519, 253 bits
---
SSL handshake has read 3877 bytes and written 293 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES128-GCM-SHA256
    Session-ID: 684228B55DFD610913A77F98849BE75F5C30FC08E0B13EE504CDC446857F8889
    Session-ID-ctx:
    Master-Key: 2D6FD0188A04DEE6590B1B7DD64248314F79ADC6721268AB6D6D3B98E4DAF4DB4CB0E07AE80CE9BC7FCA5E8DE14876A0
    TLS session ticket lifetime hint: 7200 (seconds)
    TLS session ticket:
    0000 - 09 ba ba ba 54 b4 90 5b-17 c8 2c ee a3 90 80 0a   ....T..[..,.....
...
    0090 - 54 34 80 92 03 b6 2c 72-f2 9c 68 21 07 d7 54 d9   T4....,r..h!..T.

    Start Time: 1529406787
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---

kinichiro avatar Jun 19 '18 11:06 kinichiro

CentOS 7.4 with curl 7.6.0 built built against LibreSSL 2.7.4 does not give me any issues, nor does the s_client.

So if it's a LibreSSL problem it is likely OS X specific.

AliceWonderMiscreations avatar Jun 26 '18 01:06 AliceWonderMiscreations

curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to pypi.org:443 curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to www.python.org:443

LibreSSL 2.2.7

But somehow is only related with python websites.

speeddragon avatar Jul 06 '18 09:07 speeddragon

@speeddragon pypy recently dropped TLS v.1.0 and 1.1: https://mail.python.org/pipermail/distutils-sig/2017-January/029970.html, https://github.com/pypa/warehouse/issues/3411

So it means that curl you've built doesn't support TLS v. 1.2

@lyssdod the strange thing is not about the curl, but my network. For some reason on my working network is giving me that error. On my home network (and every where else) it works fine. I just don't know why the router have implications in this.

speeddragon avatar Aug 20 '18 16:08 speeddragon

So you have man-in-the-middle attack at work? 😮

Or maybe some port filtering

Well, going to sound crazy but the moment I disabled ipv6 everything worked just fine. That was literally the only changed done by me.

luisgomes-olx avatar Aug 21 '18 10:08 luisgomes-olx

I will check disabling IPv6. Our "network" at work is just a common ISP router.

speeddragon avatar Aug 21 '18 13:08 speeddragon

Same kind of issue #515 was caused by security tool.

kinichiro avatar May 04 '19 16:05 kinichiro

I restart my mac,and it was resloved!

facejiong avatar Jun 24 '19 10:06 facejiong

fatal: unable to access 'https://github.com/xx/xx.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 macOS Catalina 10.15.3 MackBookPro:~ xxx$ openssl version LibreSSL 2.9.2

coder-free avatar Feb 11 '20 09:02 coder-free

fatal: unable to access 'https://github.com/xx/xx.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 macOS Catalina 10.15.3 MackBookPro:~ xxx$ openssl version LibreSSL 2.9.2

sorry, I found i set the proxy for command line, after unset it, ssl work fine.

coder-free avatar Feb 11 '20 09:02 coder-free

CONNECTED(00000005)
4523394668:error:140040E5:SSL routines:CONNECT_CR_SRVR_HELLO:ssl handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.200.4/libressl-2.6/ssl/ssl_pkt.c:585:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : 0000
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: 
    Start Time: 1582111892
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---

SXerox007 avatar Feb 19 '20 11:02 SXerox007