{"id":17246781,"url":"https://github.com/johnou/ssl-server-test","last_synced_at":"2026-07-03T00:33:12.315Z","repository":{"id":139625543,"uuid":"45904910","full_name":"johnou/ssl-server-test","owner":"johnou","description":null,"archived":false,"fork":false,"pushed_at":"2015-11-14T09:48:55.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T05:30:34.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-10T10:32:32.000Z","updated_at":"2015-11-10T10:35:48.000Z","dependencies_parsed_at":"2023-03-13T18:01:19.927Z","dependency_job_id":null,"html_url":"https://github.com/johnou/ssl-server-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnou/ssl-server-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnou%2Fssl-server-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnou%2Fssl-server-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnou%2Fssl-server-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnou%2Fssl-server-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnou","download_url":"https://codeload.github.com/johnou/ssl-server-test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnou%2Fssl-server-test/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261883820,"owners_count":23224566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T06:35:08.927Z","updated_at":"2026-07-03T00:33:07.281Z","avatar_url":"https://github.com/johnou.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssl-server-test\n\nSample project for debugging SSL handshake with Unity Android client. n.b. Initial message must be at least five bytes for the SSL message decoder.\n\n```\nnioEventLoopGroup-3-1, WRITE: TLSv1 Handshake, length = 518\nnioEventLoopGroup-3-1, READ: TLSv1 Alert, length = 2\nnioEventLoopGroup-3-1, RECV TLSv1 ALERT:  warning, internal_error\nSSL -- handshake alert:  internal_error\nnioEventLoopGroup-3-1, fatal error: 80: problem unwrapping net record\njavax.net.ssl.SSLProtocolException: handshake alert: internal_error\n%% Invalidated:  [Session-1, TLS_RSA_WITH_AES_128_CBC_SHA]\nnioEventLoopGroup-3-1, SEND TLSv1 ALERT:  fatal, description = internal_error\nnioEventLoopGroup-3-1, WRITE: TLSv1 Alert, length = 2\nnioEventLoopGroup-3-1, called closeOutbound()\nnioEventLoopGroup-3-1, closeOutboundInternal()\nnioEventLoopGroup-3-1, called closeInbound()\nnioEventLoopGroup-3-1, fatal: engine already closed.  Rethrowing javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?\n2015-11-09 16:47:46,619 ERROR [nioEventLoopGroup-3-1] omitted: unexpected exception \nio.netty.handler.codec.DecoderException: javax.net.ssl.SSLProtocolException: handshake alert: internal_error\n    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:380)\n    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)\n    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)\n    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)\n    at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266)\n    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)\n    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)\n    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)\n    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)\n    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)\n    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)\n    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)\n    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)\n    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)\n    at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)\n    at java.lang.Thread.run(Thread.java:745)\nCaused by: javax.net.ssl.SSLProtocolException: handshake alert: internal_error\n    at sun.security.ssl.ServerHandshaker.handshakeAlert(ServerHandshaker.java:1757)\n    at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1771)\n    at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1075)\n    at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:901)\n    at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:775)\n    at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)\n    at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1138)\n    at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1028)\n    at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:968)\n    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:349)\n    ... 15 more\nnioEventLoopGroup-3-1, called closeOutbound()\nnioEventLoopGroup-3-1, closeOutboundInternal()\nnioEventLoopGroup-3-1, called closeInbound()\nnioEventLoopGroup-3-1, closeInboundInternal()\n```\n\nTurns out there was an undocumented exception being thrown in the SSL authenticated callback which was being swallowed..\n\n```\n11-11 01:12:50.858 25012 25139 I Unity : NullReferenceException: Object reference not set to an instance of an object\n11-11 01:12:50.858 25012 25139 I Unity : at Mono.Security.X509.X509Certificate.get_Hash () [0x00000] in :0\n11-11 01:12:50.858 25012 25139 I Unity : at Mono.Security.X509.X509Certificate.VerifySignature (System.Security.Cryptography.RSA rsa) [0x00000] in :0\n11-11 01:12:50.858 25012 25139 I Unity : at Mono.Security.X509.X509Certificate.VerifySignature (System.Security.Cryptography.AsymmetricAlgorithm aa) [0x00000] in :\n011-11 01:12:50.858 25012 25139 I Unity : at System.Security.Cryptography.X509Certificates.X509Chain.IsSignedWith (System.Security.Cryptography.X509Certificates.X509Certificate2 signed, System.Security.Cryptography.AsymmetricAlgorithm pubkey) [0x00000] in :\n0\n11-11 01:12:50.858 25012 25139 I Unity : at System.Security.Cryptography.X509Certificates.X509Chain.Process (Int32 n) [0x00000] in :0\n11-11 01:12:50.858 25012 25139 I Unity : at System.Security.Cryptography.X509Certificates.X509Chain.ValidateChain (X509ChainStatusFlags flag) [0x00000] in :0\n11-11 01:12:50.858 25012 25139 I Unity : at System.Security.Cryptography.X509Certificates.X509Chain.Build (System.Security.Cryptograp\n```\n\nThis is caused by \"Strip Bytecode\" in Unity publish settings and only affects Android. The fix was to add the following in link.xml.\n\n```\n\u003cassembly fullname=\"mscorlib\"\u003e\n       \u003cnamespace fullname=\"System.Security.Cryptography\" preserve=\"all\"/\u003e\n\u003c/assembly\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnou%2Fssl-server-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnou%2Fssl-server-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnou%2Fssl-server-test/lists"}