Reformat code

This commit is contained in:
Anatolii Cherednichenko 2022-08-30 02:11:28 +03:00
parent 3ddb370718
commit 55534ea002
140 changed files with 46068 additions and 48277 deletions

View file

@ -16,46 +16,52 @@
#include "Identity.h"
#include "Crypto.h"
namespace i2p
{
namespace data
{
namespace i2p {
namespace data {
class Reseeder
{
typedef Tag<512> PublicKey;
class Reseeder {
typedef Tag<512> PublicKey;
public:
public:
Reseeder();
~Reseeder();
void Bootstrap ();
int ReseedFromServers ();
int ProcessSU3File (const char * filename);
int ProcessZIPFile (const char * filename);
Reseeder();
void LoadCertificates ();
~Reseeder();
private:
void Bootstrap();
int ReseedFromSU3Url (const std::string& url, bool isHttps = true);
void LoadCertificate (const std::string& filename);
int ReseedFromServers();
int ProcessSU3Stream (std::istream& s);
int ProcessZIPStream (std::istream& s, uint64_t contentLength);
int ProcessSU3File(const char *filename);
bool FindZipDataDescriptor (std::istream& s);
int ProcessZIPFile(const char *filename);
std::string HttpsRequest (const std::string& address);
std::string YggdrasilRequest (const std::string& address);
template<typename Stream>
std::string ReseedRequest (Stream& s, const std::string& uri);
void LoadCertificates();
private:
private:
std::map<std::string, PublicKey> m_SigningKeys;
};
}
int ReseedFromSU3Url(const std::string &url, bool isHttps = true);
void LoadCertificate(const std::string &filename);
int ProcessSU3Stream(std::istream &s);
int ProcessZIPStream(std::istream &s, uint64_t contentLength);
bool FindZipDataDescriptor(std::istream &s);
std::string HttpsRequest(const std::string &address);
std::string YggdrasilRequest(const std::string &address);
template<typename Stream>
std::string ReseedRequest(Stream &s, const std::string &uri);
private:
std::map<std::string, PublicKey> m_SigningKeys;
};
}
}
#endif