equal
deleted
inserted
replaced
285 } |
285 } |
286 |
286 |
287 // Is the handshake completed? |
287 // Is the handshake completed? |
288 boolean needRetransmission = |
288 boolean needRetransmission = |
289 conContext.sslContext.isDTLS() && |
289 conContext.sslContext.isDTLS() && |
290 conContext.handshakeContext != null && |
290 conContext.getHandshakeContext(TransportContext.PRE) != null && |
291 conContext.handshakeContext.sslConfig.enableRetransmissions; |
291 conContext.handshakeContext.sslConfig.enableRetransmissions; |
292 HandshakeStatus hsStatus = |
292 HandshakeStatus hsStatus = |
293 tryToFinishHandshake(ciphertext.contentType); |
293 tryToFinishHandshake(ciphertext.contentType); |
294 if (needRetransmission && |
294 if (needRetransmission && |
295 hsStatus == HandshakeStatus.FINISHED && |
295 hsStatus == HandshakeStatus.FINISHED && |
329 HandshakeStatus hsStatus = null; |
329 HandshakeStatus hsStatus = null; |
330 if ((contentType == ContentType.HANDSHAKE.id) && |
330 if ((contentType == ContentType.HANDSHAKE.id) && |
331 conContext.outputRecord.isEmpty()) { |
331 conContext.outputRecord.isEmpty()) { |
332 if (conContext.handshakeContext == null) { |
332 if (conContext.handshakeContext == null) { |
333 hsStatus = HandshakeStatus.FINISHED; |
333 hsStatus = HandshakeStatus.FINISHED; |
|
334 } else if (conContext.getHandshakeContext(TransportContext.POST) != null) { |
|
335 return null; |
334 } else if (conContext.handshakeContext.handshakeFinished) { |
336 } else if (conContext.handshakeContext.handshakeFinished) { |
335 hsStatus = conContext.finishHandshake(); |
337 hsStatus = conContext.finishHandshake(); |
336 } |
338 } |
337 } // Otherwise, the followed call to getHSStatus() will help. |
339 } // Otherwise, the followed call to getHSStatus() will help. |
338 |
340 |
682 return pt; |
684 return pt; |
683 } |
685 } |
684 |
686 |
685 @Override |
687 @Override |
686 public synchronized Runnable getDelegatedTask() { |
688 public synchronized Runnable getDelegatedTask() { |
687 if (conContext.handshakeContext != null && |
689 if (conContext.handshakeContext != null && // PRE or POST handshake |
688 !conContext.handshakeContext.taskDelegated && |
690 !conContext.handshakeContext.taskDelegated && |
689 !conContext.handshakeContext.delegatedActions.isEmpty()) { |
691 !conContext.handshakeContext.delegatedActions.isEmpty()) { |
690 conContext.handshakeContext.taskDelegated = true; |
692 conContext.handshakeContext.taskDelegated = true; |
691 return new DelegatedTask(this); |
693 return new DelegatedTask(this); |
692 } |
694 } |