Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

SSL3_GET_RECORD:decryption failed or bad record mac #1929

@lesn1kk

Description

@lesn1kk

Recently while fixing test Can shift data securely I noticed that sometimes it fails with following stack:

Connecting to the localhost:50178
[ThaliCore] TCPListener.socket(_:didAcceptNewSocket:)
[ThaliCore] BrowserRelay.createVirtualSocket(with:)
[ThaliCore] Session.startOutputStream(with:) peer:4A31505D-C170-4E1A-8DA7-87C9FC57A7ED:0
[ThaliCore] Session.session(_:didReceive:withName:fromPeer:) peer:4A31505D-C170-4E1A-8DA7-87C9FC57A7ED:0
[ThaliCore] VirtualSocket.init(inputStream:outputStream:) vsID:45, VS count:13
[ThaliCore] BrowserRelay.didOpenVirtualSocketStreamsHandler
Connected to the localhost:50178
2017-07-04 05:54:33 - DEBUG testThaliMobileNative: 'Client sends data (20 bytes):'
2017-07-04 05:54:33 - DEBUG testThaliMobileNative: 'Client data flushed'
Client socket error: 6145814528:error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac:../deps/openssl/openssl/ssl/s3_pkt.c:518:
 @native:jxcore_js_object:3:12
use@tls.js:210:8
$K@tls.js:418:8
$0.prototype.read@_stream_readable.js:308:1
$D@tls.js:336:1
$d@_stream_writable.js:240:1
[ThaliCore] Session.session(_:peer:didChange:) peer:4A31505D-C170-4E1A-8DA7-87C9FC57A7ED:0 state: connected -> notConnected
[ThaliCore] Browser: session notConnected Peer(uuid: "4A31505D-C170-4E1A-8DA7-87C9FC57A7ED", generation: 0)
[ThaliCore] BrowserRelay.closeRelay() disconnecting:false
[ThaliCore] TCPListener.stopListeningForConnectionsAndDisconnectClients() port:50178
[ThaliCore] VirtualSocket.closeStreams() vsID:45
[ThaliCore] BrowserRelay.didCloseVirtualSocketStreamsHandler
[ThaliCore] Session.disconnect() peer:4A31505D-C170-4E1A-8DA7-87C9FC57A7ED:0
[ThaliCore] TCPListener.socketDidDisconnect(_:withError:) listening socket error:nil
[ThaliCore] Browser: session notConnected removed relay for Peer(uuid: "4A31505D-C170-4E1A-8DA7-87C9FC57A7ED", generation: 0)
not ok 124 Error: 6145814528:error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac:../deps/openssl/openssl/ssl/s3_pkt.c:518: 
  ---
    operator: fail
  ...

It looks like there was some issue with OpenSSL. Tested on two iOS devices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions