mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 13:48:05 +01:00
Rename NoiseStreamHandler to NoiseTransportHandler for consistency with Noise specification terminology
This commit is contained in:
committed by
Jon Chambers
parent
75bb22f08b
commit
8a587d1d12
@@ -29,7 +29,7 @@ class NoiseNXHandshakeHandler extends AbstractNoiseHandshakeHandler {
|
||||
// All we need to do is accept the client's ephemeral key and send our own static keys; after that, we can consider
|
||||
// the handshake complete
|
||||
context.fireUserEventTriggered(new NoiseHandshakeCompleteEvent(Optional.empty()));
|
||||
context.pipeline().replace(NoiseNXHandshakeHandler.this, null, new NoiseStreamHandler(getHandshakeState().split()));
|
||||
context.pipeline().replace(NoiseNXHandshakeHandler.this, null, new NoiseTransportHandler(getHandshakeState().split()));
|
||||
} else {
|
||||
// Anything except binary WebSocket frames should have been filtered out of the pipeline by now; treat this as an
|
||||
// error
|
||||
|
||||
@@ -17,15 +17,15 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* A Noise stream handler manages a bidirectional Noise session after a handshake has completed.
|
||||
* A Noise transport handler manages a bidirectional Noise session after a handshake has completed.
|
||||
*/
|
||||
class NoiseStreamHandler extends ChannelDuplexHandler {
|
||||
class NoiseTransportHandler extends ChannelDuplexHandler {
|
||||
|
||||
private final CipherStatePair cipherStatePair;
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(NoiseStreamHandler.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(NoiseTransportHandler.class);
|
||||
|
||||
NoiseStreamHandler(CipherStatePair cipherStatePair) {
|
||||
NoiseTransportHandler(CipherStatePair cipherStatePair) {
|
||||
this.cipherStatePair = cipherStatePair;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ class NoiseXXHandshakeHandler extends AbstractNoiseHandshakeHandler {
|
||||
context.fireUserEventTriggered(new NoiseHandshakeCompleteEvent(
|
||||
Optional.of(new AuthenticatedDevice(accountIdentifier, deviceId))));
|
||||
|
||||
context.pipeline().addAfter(context.name(), null, new NoiseStreamHandler(handshakeState.split()));
|
||||
context.pipeline().addAfter(context.name(), null, new NoiseTransportHandler(handshakeState.split()));
|
||||
|
||||
// Flush any buffered reads
|
||||
pendingInboundFrames.forEach(context::fireChannelRead);
|
||||
|
||||
Reference in New Issue
Block a user