{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/4116","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/4116/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/4116/comments","events_url":"https://api.github.com/repos/netty/netty/issues/4116/events","html_url":"https://github.com/netty/netty/issues/4116","id":102082968,"number":4116,"title":"Decryption failed or bad mac record in Android 5.0","user":{"login":"grgvineet","id":6297036,"avatar_url":"https://avatars.githubusercontent.com/u/6297036?v=3","gravatar_id":"","url":"https://api.github.com/users/grgvineet","html_url":"https://github.com/grgvineet","followers_url":"https://api.github.com/users/grgvineet/followers","following_url":"https://api.github.com/users/grgvineet/following{/other_user}","gists_url":"https://api.github.com/users/grgvineet/gists{/gist_id}","starred_url":"https://api.github.com/users/grgvineet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grgvineet/subscriptions","organizations_url":"https://api.github.com/users/grgvineet/orgs","repos_url":"https://api.github.com/users/grgvineet/repos","events_url":"https://api.github.com/users/grgvineet/events{/privacy}","received_events_url":"https://api.github.com/users/grgvineet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/netty/netty/labels/defect","name":"defect","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/141","html_url":"https://github.com/netty/netty/milestones/4.0.37.Final","labels_url":"https://api.github.com/repos/netty/netty/milestones/141/labels","id":1682502,"number":141,"title":"4.0.37.Final","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":57,"closed_issues":33,"state":"open","created_at":"2016-04-04T16:35:57Z","updated_at":"2016-04-12T19:13:23Z","due_on":null,"closed_at":null},"comments":37,"created_at":"2015-08-20T07:50:39Z","updated_at":"2016-04-13T00:41:50Z","closed_at":"2016-04-12T19:13:23Z","body":"Netty version : from 4.0.26 onwards\r\n\r\nContext : SSL client from Android device\r\n\r\nWhile using SSL client in Android 5.0, an exception is thrown stating that decryption failed or bad mac record. The issue is only with Android 5.0 and not with any other version. It might be a bug in internal library of Android, but this exception is only encountered from Netty 4.0.26 onwards. For versions earlier than this, no exception is thrown and I can get a successful connection and can send data.\r\nHere is the stack trace for device\r\n\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: javax.net.ssl.SSLProtocolException: Read error: ssl=0xafa2cc00: Failure in SSL library, usually a protocol error\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac (external/openssl/ssl/s3_pkt.c:485 0xabde7ce0:0x00000000)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:346)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:229)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:430)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:384)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at java.lang.Thread.run(Thread.java:818)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ Caused by: javax.net.ssl.SSLException: javax.net.ssl.SSLProtocolException: Read error: ssl=0xafa2cc00: Failure in SSL library, usually a protocol error\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac (external/openssl/ssl/s3_pkt.c:485 0xabde7ce0:0x00000000)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at com.android.org.conscrypt.OpenSSLEngineImpl.unwrap(OpenSSLEngineImpl.java:491)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:1006)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1114)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:981)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:934)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:315)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ ... 12 more\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ Caused by: javax.net.ssl.SSLProtocolException: Read error: ssl=0xafa2cc00: Failure in SSL library, usually a protocol error\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac (external/openssl/ssl/s3_pkt.c:485 0xabde7ce0:0x00000000)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at com.android.org.conscrypt.NativeCrypto.SSL_read_BIO(Native Method)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ at com.android.org.conscrypt.OpenSSLEngineImpl.unwrap(OpenSSLEngineImpl.java:472)\r\n08-20 03:26:19.356    2633-2915/org.kde.nettytest W/System.err﹕ ... 17 more\r\n\r\nSteps to reproduce : \r\n1. Use this app https://github.com/grgvineet/NettyTest\r\n2. Run client on Android 5.0, error is thrown\r\n3. Change netty version in build.gradle to 4.0.25\r\n4. Try again, it will work\r\n5. Reproducible always"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/209166785","html_url":"https://github.com/netty/netty/issues/4116#issuecomment-209166785","issue_url":"https://api.github.com/repos/netty/netty/issues/4116","id":209166785,"user":{"login":"Scottmitch","id":7562868,"avatar_url":"https://avatars.githubusercontent.com/u/7562868?v=3","gravatar_id":"","url":"https://api.github.com/users/Scottmitch","html_url":"https://github.com/Scottmitch","followers_url":"https://api.github.com/users/Scottmitch/followers","following_url":"https://api.github.com/users/Scottmitch/following{/other_user}","gists_url":"https://api.github.com/users/Scottmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Scottmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scottmitch/subscriptions","organizations_url":"https://api.github.com/users/Scottmitch/orgs","repos_url":"https://api.github.com/users/Scottmitch/repos","events_url":"https://api.github.com/users/Scottmitch/events{/privacy}","received_events_url":"https://api.github.com/users/Scottmitch/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T00:41:49Z","updated_at":"2016-04-13T00:41:49Z","body":"@m3ltaw4y - Please provide a reproducer and instructions on how to setup and run it. Assume we are not familiar with Android or Android simulators."}}