- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试使用 Netty 5.0.0.Alpha2 编写一个 HTTP 客户端以连接到专有服务器。我只能将连接描述为类似于 Websockets 但不是。服务器使用 StartTLS,它预计在服务器以 200 和内容类型响应后由客户端初始化,如果您不这样做,服务器将断开您的连接。一旦连接安全,服务器将在响应客户端命令时无限期地保持连接。无论如何,下面是我的 SSLDump 日志和关于“Unknown SSL content type 1”行,一旦我尝试将我的第一个命令发送到服务器,就会发生这种情况。来自服务器的流量似乎不受阻碍,因为服务器每 30-60 秒发送一次 ping 心跳,我可以很好地读取它。
SSLDump 日志:
New TCP connection #1: Chiori-chan.local(54679) <-> ***.***.***.***(443)
0.1110 (0.1110) C>S
---------------------------------------------------------------
GET /fwd/xControl HTTP/1.0
---------------------------------------------------------------
0.1776 (0.0666) S>C
---------------------------------------------------------------
HTTP/1.0 200 OK
Content-Type: application/octet-stream
---------------------------------------------------------------
0.2440 (0.0664) S>C
---------------------------------------------------------------
---------------------------------------------------------------
1 1 0.2582 (0.0142) C>SV3.1(54) Handshake
ClientHello
Version 3.1
random[32]=
55 0c 50 be 81 96 8d 83 b2 8d 91 fd 02 3d f5 ff
1e 9d 65 48 3a 3b 8c a1 63 d4 e1 17 45 24 c8 90
cipher suites
TLS_RSA_WITH_RC4_128_SHA
TLS_RSA_WITH_RC4_128_MD5
compression methods
NULL
1 2 0.3332 (0.0749) S>CV3.1(81) Handshake
ServerHello
Version 3.1
random[32]=
fb 50 d9 c3 2d f2 b1 2f 43 ac 69 eb 54 6b 79 1e
34 68 0b e8 5b 90 74 d8 0a bd 0e 46 be 9b 80 54
session_id[32]=
cf 67 a2 86 b4 c0 26 08 6a f4 4c 86 16 8a da df
34 fc da 75 66 cd 38 a6 c6 42 21 cf 3e a4 c9 73
cipherSuite TLS_RSA_WITH_RC4_128_SHA
compressionMethod NULL
1 3 0.3332 (0.0000) S>CV3.1(471) Handshake
Certificate
certificate[461]=
30 82 01 ... omitted ... fa 3f 56
1 4 0.3332 (0.0000) S>CV3.1(4) Handshake
ServerHelloDone
1 5 0.3490 (0.0157) C>SV3.1(134) Handshake
ClientKeyExchange
EncryptedPreMasterSecret[128]=
c5 f6 2e ... omitted ... 4b f2 64
1 6 0.3490 (0.0000) C>SV3.1(1) ChangeCipherSpec
1 7 0.3490 (0.0000) C>SV3.1(36) Handshake
1 8 0.4161 (0.0671) S>CV3.1(1) ChangeCipherSpec
1 9 0.4161 (0.0000) S>CV3.1(36) Handshake
Unknown SSL content type 1
1 10 0.4891 (0.0729) S>CV3.1(22) Alert
1 11 0.4892 (0.0001) S>CV3.1(22) Alert
1 12 0.4893 (0.0000) S>CV3.1(22) Alert
1 13 0.4930 (0.0036) C>SShort record
1 2.7379 (2.2449) C>S TCP FIN
1 2.8043 (0.0663) S>C TCP FIN
Java 日志:
Mar 20, 2015 11:54:21 AM io.netty.handler.logging.LoggingHandler channelRegistered
INFO: [id: 0x811e4e4d] REGISTERED
Mar 20, 2015 11:54:21 AM io.netty.handler.logging.LoggingHandler connect
INFO: [id: 0x811e4e4d] CONNECT: /omitted:443
Mar 20, 2015 11:54:21 AM io.netty.handler.logging.LoggingHandler channelActive
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] ACTIVE
Mar 20, 2015 11:54:22 AM io.netty.handler.logging.LoggingHandler write
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] WRITE: 40B
GET /fwd/xControl HTTP/1.0
Mar 20, 2015 11:54:22 AM io.netty.handler.logging.LoggingHandler flush
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] FLUSH
Mar 20, 2015 11:54:22 AM io.netty.handler.logging.LoggingHandler channelRead
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] RECEIVED: 57B
HTTP/1.0 200 OK
Content-Type: application/octet-stream
Mar 20, 2015 11:54:22 AM io.netty.handler.logging.LoggingHandler channelRead
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] RECEIVED: 2B
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 0d 0a |.. |
+--------+-------------------------------------------------+----------------+
RCVD: DefaultHttpResponse(decodeResult: success, version: HTTP/1.0)
HTTP/1.0 200 OK
Content-Type: application/octet-stream
Mar 20, 2015 11:54:22 AM io.netty.handler.logging.LoggingHandler userEventTriggered
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] USER_EVENT: io.netty.handler.ssl.SslHandshakeCompletionEvent@1dc9b12c
Mar 20, 2015 11:54:22 AM io.netty.handler.logging.LoggingHandler write
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] WRITE: 66B
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 01 00 1a 00 16 00 00 00 0b 03 06 05 7e 4c 47 49 |............~LGI|
|00000010| 4e 03 00 00 00 00 00 98 9a c0 0b 02 02 02 01 00 |N...............|
|00000020| 20 00 1c 00 00 00 0b 03 06 05 7e 4c 47 49 4e 03 | .........~LGIN.|
|00000030| 00 00 00 00 00 9c 9a c0 0b 02 06 05 61 64 6d 69 |............admi|
|00000040| 6e 02 |n. |
+--------+-------------------------------------------------+----------------+
Mar 20, 2015 11:54:22 AM io.netty.handler.logging.LoggingHandler flush
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] FLUSH
Mar 20, 2015 11:54:22 AM io.netty.handler.logging.LoggingHandler exceptionCaught
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] EXCEPTION: io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: protocol_version
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: protocol_version
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:347)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:84)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:153)
at io.netty.channel.PausableChannelEventExecutor.invokeChannelRead(PausableChannelEventExecutor.java:86)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:389)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:956)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:127)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:514)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:471)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:385)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:351)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.internal.chmv8.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1412)
at io.netty.util.internal.chmv8.ForkJoinTask.doExec(ForkJoinTask.java:280)
at io.netty.util.internal.chmv8.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:877)
at io.netty.util.internal.chmv8.ForkJoinPool.scan(ForkJoinPool.java:1706)
at io.netty.util.internal.chmv8.ForkJoinPool.runWorker(ForkJoinPool.java:1661)
at io.netty.util.internal.chmv8.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:126)
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1619)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1587)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1756)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1060)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:884)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:758)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1071)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:938)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:891)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:316)
... 18 more
Mar 20, 2015 11:54:22 AM io.netty.channel.DefaultChannelPipeline$TailContext exceptionCaught
WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: protocol_version
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:347)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:84)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:153)
at io.netty.channel.PausableChannelEventExecutor.invokeChannelRead(PausableChannelEventExecutor.java:86)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:389)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:956)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:127)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:514)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:471)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:385)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:351)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.internal.chmv8.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1412)
at io.netty.util.internal.chmv8.ForkJoinTask.doExec(ForkJoinTask.java:280)
at io.netty.util.internal.chmv8.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:877)
at io.netty.util.internal.chmv8.ForkJoinPool.scan(ForkJoinPool.java:1706)
at io.netty.util.internal.chmv8.ForkJoinPool.runWorker(ForkJoinPool.java:1661)
at io.netty.util.internal.chmv8.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:126)
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1619)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1587)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1756)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1060)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:884)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:758)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1071)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:938)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:891)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:316)
... 18 more
Mar 20, 2015 11:54:22 AM io.netty.handler.logging.LoggingHandler exceptionCaught
INFO: [id: 0x811e4e4d, /10.0.0.152:54679 => /omitted:443] EXCEPTION: io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:347)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:84)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:153)
at io.netty.channel.PausableChannelEventExecutor.invokeChannelRead(PausableChannelEventExecutor.java:86)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:389)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:956)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:127)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:514)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:471)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:385)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:351)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.internal.chmv8.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1412)
at io.netty.util.internal.chmv8.ForkJoinTask.doExec(ForkJoinTask.java:280)
at io.netty.util.internal.chmv8.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:877)
at io.netty.util.internal.chmv8.ForkJoinPool.scan(ForkJoinPool.java:1706)
at io.netty.util.internal.chmv8.ForkJoinPool.runWorker(ForkJoinPool.java:1661)
at io.netty.util.internal.chmv8.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:126)
Caused by: javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1619)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1587)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1756)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1060)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:884)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:758)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1071)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:938)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:891)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:316)
... 18 more
Mar 20, 2015 11:54:22 AM io.netty.channel.DefaultChannelPipeline$TailContext exceptionCaught
WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:347)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:84)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:153)
at io.netty.channel.PausableChannelEventExecutor.invokeChannelRead(PausableChannelEventExecutor.java:86)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:389)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:956)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:127)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:514)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:471)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:385)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:351)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.internal.chmv8.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1412)
at io.netty.util.internal.chmv8.ForkJoinTask.doExec(ForkJoinTask.java:280)
at io.netty.util.internal.chmv8.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:877)
at io.netty.util.internal.chmv8.ForkJoinPool.scan(ForkJoinPool.java:1706)
at io.netty.util.internal.chmv8.ForkJoinPool.runWorker(ForkJoinPool.java:1661)
at io.netty.util.internal.chmv8.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:126)
Caused by: javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1619)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1587)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1756)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1060)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:884)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:758)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1071)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:938)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:891)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:316)
... 18 more
有人可以向我解释为什么我会收到此错误以及我可以采取什么措施来补救它吗?我一开始以为是我用来写数据的对象类型,即ByteBuf,但是我尝试了很多其他对象,似乎都没有效果。我确定有一个明显的原因,我只是没有看到它。我对将 SSL 与 Netty 结合使用还很陌生,遗憾的是我找不到足够多的文档,因为我认为 Netty 会像现在这样被广泛使用。
如果有人能提供任何帮助,我将不胜感激。
编辑:
有趣的是,使用服务器(还有 Netty 和 Java)我使用相同的 SSL 引擎编程声称它也可以建立连接但是它应该接收我的命令的地方,它会打印这个错误。这会让我相信我的客户端没有正确编码 ssl 数据包,因为它报告的记录是纯文本的。
Mar 20, 2015 3:18:36 PM io.netty.channel.DefaultChannelPipeline$TailHandler exceptionCaught
WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 01000c00080000000b01060470696e67
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:832)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:228)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:141)
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:341)
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:327)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:116)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:494)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:461)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:745)
最佳答案
看来我是个彻头彻尾的白痴。就像我说的,我不熟悉将 SSL 与 Netty 结合使用。
在我的 SslHandler() 构造函数下的代码中,有第二个可选的 boolean 值,名为 startTLS。如果设置为 True,SslHandler 将以明文形式输出您的第一条消息。我对 javadoc 感到困惑,它说 StartTLS 是在明文连接中间保护线路的通信模式。请注意,它与 SSL/TLS 不同,后者从连接开始就保护线路。
因为我是在发送 HTTP header 后启动 SSL,所以我假设 StartTLS 是我想要的。
再一次,我对缺乏我能找到的 Netty 文档感到失望。我感到很欣慰,因为这个愚蠢的问题现在已得到解决,我可以继续对该网络协议(protocol)进行逆向工程。
关于Java Netty 未知 SSL 内容类型错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29172415/
我有一个交叉表函数,我过去曾多次成功使用它,但现在它在最后转储所有数据,而不是将其旋转到输出表中。它似乎无法找到交叉表。我通过以下方式对其进行了研究; 如果 tablefunc 不存在则创建扩展; -
表1(客户表) Id, CustomerId, IsKnownCustomer,phonemacaddress 1, 空 0 00:9a:34:cf:a4 2, 004024 1 00:6f:64:c
知道为什么我总是收到这个烦人且无用的错误代码/描述吗? Failed to pull image myapidemodocker.azurecr.io/apidemo:v4.0: rpc error:
我正在进行 PHP 登录,并且之前可以正常工作,但我尝试使用户名功能不区分大小写,但此后代码一直无法正常工作。我删除了我添加的所有内容,以尝试使其不区分大小写,即 strtolower()。页面上显示
有人会帮助我提供有关此错误的任何可能信息吗?原因?登录?在哪里寻找/开始? Cannot use output buffering in output buffering display handl
我已经添加了这样的脚本 我在我的 test.js 中做了这个 var app = angular.module('MyApp', ['ngRoute']).config
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 8 年前。 Improve this qu
我有这个sql语句: selectAllUsersByCriteria = 连接.prepareStatement( “从用户那里选择*?=?” ); 下面的方法运行该语句: public Array
我有一个白色的 EditText,在 Android 3.1 及更高版本中,光标不显示(因为它也是白色的)。有关信息,我使用 android:background="@android:drawable
我正在尝试使用 Keras 实现深度学习模型。但是我有一个未知形状实现的问题。我一直在寻找类似的错误,但没有找到。 这是我的代码。 Xhome = dataset[:,32:62] Xaway = d
关注此introduction可以通过导入命名空间 System.Xml 来使用 XMLReader 类。在我的 Visual Studio 项目中,我使用 .NET 4.0,但 System.Xml
我有一个动态链接库的程序。该程序将函数指针传递给该库以执行。 但是 ubsan(Undefined Behavior Sanitizer)指定指针位于错误的函数类型上。那只会发生 如果回调函数有一个类
我正在尝试在我的 Swift SpriteKit 应用程序中使用 AVAudioSession。我遇到了奇怪的“未声明类型”问题。例如…… import AVFoundation var audioS
如果在编译期间(在实际编译和运行程序之前)其参数之一的值已知/未知,如何专门化模板函数? 我还不知道怎么做。 想法 1: #include #include int main(void){
我看到一些人的代码是这样的: while (!(baseType == typeof(Object))) { .... baseType = baseType.BaseType;
我正在尝试使用 GoColly 框架获取所有 HREF 链接,但是只允许任何域的 url 为根 URL 或子域(否路径)。我已经注释掉了我的 REGEXP。文件扩展名没有事情。我只是在“/”之后不想要
我有一个包含多个实体的数据库,特别是 Book 和 User。它们之间存在这样的 ManyToMany 关系: 书: @Entity @Table(name = "Books") public cla
如果我将范围的初始部分设置为 Range("A:A"),如何确保将整行传递给排序? 数据 id、fname、mname、lname、后缀、状态、位置、时区 通过在 id 中搜索起点和终点来选择范围。
我对kubernetes很陌生,而对于docker来说就不那么多了。 我一直在研究示例,但是我对自动缩放器(似乎无法缩放)感到困惑。 我在这里通过示例https://kubernetes.io/doc
我在 ChildWindow 中使用 SL Toolkit 5 中的 BusyIndicator 控件。 在某些解决方案中,它可以工作,但在其他解决方案中,使用完全相同的代码(至少看起来),我在运
我是一名优秀的程序员,十分优秀!