mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
clarify crypto algo
This commit is contained in:
@@ -246,7 +246,7 @@ ReadState tr_handshake::read_handshake(tr_peerIo* peer_io)
|
|||||||
tr_logAddTraceHand(this, "peer is unencrypted, and we're disallowing that");
|
tr_logAddTraceHand(this, "peer is unencrypted, and we're disallowing that");
|
||||||
return done(false);
|
return done(false);
|
||||||
}
|
}
|
||||||
if (crypto_select_ == CryptoProvideCrypto)
|
if (crypto_select_ == CryptoProvideRC4)
|
||||||
{
|
{
|
||||||
tr_logAddTraceHand(this, "peer is unencrypted, and that does not agree with our handshake");
|
tr_logAddTraceHand(this, "peer is unencrypted, and that does not agree with our handshake");
|
||||||
return done(false);
|
return done(false);
|
||||||
@@ -725,11 +725,11 @@ uint32_t tr_handshake::crypto_provide() const noexcept
|
|||||||
{
|
{
|
||||||
case TR_ENCRYPTION_REQUIRED:
|
case TR_ENCRYPTION_REQUIRED:
|
||||||
case TR_ENCRYPTION_PREFERRED:
|
case TR_ENCRYPTION_PREFERRED:
|
||||||
provide |= CryptoProvideCrypto;
|
provide |= CryptoProvideRC4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TR_CLEAR_PREFERRED:
|
case TR_CLEAR_PREFERRED:
|
||||||
provide |= CryptoProvideCrypto | CryptoProvidePlaintext;
|
provide |= CryptoProvideRC4 | CryptoProvidePlaintext;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -744,17 +744,17 @@ uint32_t tr_handshake::crypto_provide() const noexcept
|
|||||||
switch (encryption_mode)
|
switch (encryption_mode)
|
||||||
{
|
{
|
||||||
case TR_ENCRYPTION_REQUIRED:
|
case TR_ENCRYPTION_REQUIRED:
|
||||||
choices[n_choices++] = CryptoProvideCrypto;
|
choices[n_choices++] = CryptoProvideRC4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TR_ENCRYPTION_PREFERRED:
|
case TR_ENCRYPTION_PREFERRED:
|
||||||
choices[n_choices++] = CryptoProvideCrypto;
|
choices[n_choices++] = CryptoProvideRC4;
|
||||||
choices[n_choices++] = CryptoProvidePlaintext;
|
choices[n_choices++] = CryptoProvidePlaintext;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TR_CLEAR_PREFERRED:
|
case TR_CLEAR_PREFERRED:
|
||||||
choices[n_choices++] = CryptoProvidePlaintext;
|
choices[n_choices++] = CryptoProvidePlaintext;
|
||||||
choices[n_choices++] = CryptoProvideCrypto;
|
choices[n_choices++] = CryptoProvideRC4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ private:
|
|||||||
// > As of now 0x01 means plaintext, 0x02 means RC4. (see Functions)
|
// > As of now 0x01 means plaintext, 0x02 means RC4. (see Functions)
|
||||||
// > The remaining bits are reserved for future use.
|
// > The remaining bits are reserved for future use.
|
||||||
static auto constexpr CryptoProvidePlaintext = uint32_t{ 0x01 };
|
static auto constexpr CryptoProvidePlaintext = uint32_t{ 0x01 };
|
||||||
static auto constexpr CryptoProvideCrypto = uint32_t{ 0x02 };
|
static auto constexpr CryptoProvideRC4 = uint32_t{ 0x02 };
|
||||||
|
|
||||||
// MSE constants.
|
// MSE constants.
|
||||||
// http://wiki.vuze.com/w/Message_Stream_Encryption
|
// http://wiki.vuze.com/w/Message_Stream_Encryption
|
||||||
|
|||||||
Reference in New Issue
Block a user