diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a4c6ece..161c456a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -356,7 +356,6 @@ set(TL_DOTNET_SCHEME_SOURCE set(TDLIB_SOURCE td/mtproto/AuthData.cpp - td/mtproto/crypto.cpp td/mtproto/DhHandshake.cpp td/mtproto/Handshake.cpp td/mtproto/HandshakeActor.cpp @@ -367,6 +366,7 @@ set(TDLIB_SOURCE td/mtproto/PingConnection.cpp td/mtproto/ProxySecret.cpp td/mtproto/RawConnection.cpp + td/mtproto/RSA.cpp td/mtproto/SessionConnection.cpp td/mtproto/TcpTransport.cpp td/mtproto/TlsInit.cpp @@ -494,7 +494,6 @@ set(TDLIB_SOURCE td/mtproto/AuthData.h td/mtproto/AuthKey.h - td/mtproto/crypto.h td/mtproto/CryptoStorer.h td/mtproto/DhHandshake.h td/mtproto/Handshake.h @@ -511,6 +510,7 @@ set(TDLIB_SOURCE td/mtproto/ProxySecret.h td/mtproto/Query.h td/mtproto/RawConnection.h + td/mtproto/RSA.h td/mtproto/SessionConnection.h td/mtproto/TcpTransport.h td/mtproto/TlsInit.h diff --git a/td/mtproto/Handshake.cpp b/td/mtproto/Handshake.cpp index eb56e1b7..4563268a 100644 --- a/td/mtproto/Handshake.cpp +++ b/td/mtproto/Handshake.cpp @@ -6,7 +6,6 @@ // #include "td/mtproto/Handshake.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/KDF.h" #include "td/mtproto/utils.h" diff --git a/td/mtproto/Handshake.h b/td/mtproto/Handshake.h index 46f0c69c..9669cb4c 100644 --- a/td/mtproto/Handshake.h +++ b/td/mtproto/Handshake.h @@ -7,8 +7,8 @@ #pragma once #include "td/mtproto/AuthKey.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/DhHandshake.h" +#include "td/mtproto/RSA.h" #include "td/utils/buffer.h" #include "td/utils/Slice.h" diff --git a/td/mtproto/crypto.cpp b/td/mtproto/RSA.cpp similarity index 98% rename from td/mtproto/crypto.cpp rename to td/mtproto/RSA.cpp index 905228cf..a5825c2a 100644 --- a/td/mtproto/crypto.cpp +++ b/td/mtproto/RSA.cpp @@ -4,7 +4,7 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -#include "td/mtproto/crypto.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/mtproto_api.h" @@ -25,7 +25,6 @@ namespace td { -/*** RSA ***/ RSA::RSA(BigNum n, BigNum e) : n_(std::move(n)), e_(std::move(e)) { } diff --git a/td/mtproto/crypto.h b/td/mtproto/RSA.h similarity index 95% rename from td/mtproto/crypto.h rename to td/mtproto/RSA.h index 7d3f35d9..68ea42b7 100644 --- a/td/mtproto/crypto.h +++ b/td/mtproto/RSA.h @@ -15,7 +15,6 @@ namespace td { -/*** RSA ***/ class RSA { public: RSA clone() const; @@ -33,7 +32,6 @@ class RSA { BigNum e_; }; -/*** PublicRsaKeyInterface ***/ class PublicRsaKeyInterface { public: virtual ~PublicRsaKeyInterface() = default; diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index a1dddae6..5ff78b36 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -27,8 +27,8 @@ #include "td/mtproto/AuthData.h" #include "td/mtproto/AuthKey.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/RawConnection.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/TransportType.h" #include "td/net/HttpQuery.h" diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 341181bf..93c896f1 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -99,11 +99,11 @@ #include "td/db/binlog/BinlogEvent.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/DhHandshake.h" #include "td/mtproto/Handshake.h" #include "td/mtproto/HandshakeActor.h" #include "td/mtproto/RawConnection.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/TransportType.h" #include "td/utils/buffer.h" diff --git a/td/telegram/net/PublicRsaKeyShared.h b/td/telegram/net/PublicRsaKeyShared.h index efab0853..6aafb92d 100644 --- a/td/telegram/net/PublicRsaKeyShared.h +++ b/td/telegram/net/PublicRsaKeyShared.h @@ -8,7 +8,7 @@ #include "td/telegram/net/DcId.h" -#include "td/mtproto/crypto.h" +#include "td/mtproto/RSA.h" #include "td/utils/common.h" #include "td/utils/port/RwMutex.h" diff --git a/td/telegram/net/PublicRsaKeyWatchdog.cpp b/td/telegram/net/PublicRsaKeyWatchdog.cpp index 25b96c44..20461046 100644 --- a/td/telegram/net/PublicRsaKeyWatchdog.cpp +++ b/td/telegram/net/PublicRsaKeyWatchdog.cpp @@ -12,7 +12,7 @@ #include "td/telegram/telegram_api.h" -#include "td/mtproto/crypto.h" +#include "td/mtproto/RSA.h" #include "td/utils/logging.h" #include "td/utils/Time.h" diff --git a/td/telegram/net/Session.cpp b/td/telegram/net/Session.cpp index aa9bd034..c3b851b2 100644 --- a/td/telegram/net/Session.cpp +++ b/td/telegram/net/Session.cpp @@ -18,11 +18,11 @@ #include "td/telegram/StateManager.h" #include "td/telegram/UniqueId.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/DhHandshake.h" #include "td/mtproto/Handshake.h" #include "td/mtproto/HandshakeActor.h" #include "td/mtproto/RawConnection.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/SessionConnection.h" #include "td/mtproto/TransportType.h" diff --git a/test/mtproto.cpp b/test/mtproto.cpp index 0e9648a9..cd126a75 100644 --- a/test/mtproto.cpp +++ b/test/mtproto.cpp @@ -10,7 +10,6 @@ #include "td/actor/PromiseFuture.h" #include "td/mtproto/AuthData.h" -#include "td/mtproto/crypto.h" #include "td/mtproto/DhHandshake.h" #include "td/mtproto/Handshake.h" #include "td/mtproto/HandshakeActor.h" @@ -18,6 +17,7 @@ #include "td/mtproto/PingConnection.h" #include "td/mtproto/ProxySecret.h" #include "td/mtproto/RawConnection.h" +#include "td/mtproto/RSA.h" #include "td/mtproto/TlsInit.h" #include "td/mtproto/TransportType.h"