mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
912 B
51 lines
912 B
11 years ago
|
#ifndef RESEED_H
|
||
|
#define RESEED_H
|
||
|
|
||
10 years ago
|
#include <iostream>
|
||
11 years ago
|
#include <string>
|
||
|
#include <vector>
|
||
10 years ago
|
#include <map>
|
||
|
#include "Identity.h"
|
||
9 years ago
|
#include "Crypto.h"
|
||
11 years ago
|
|
||
|
namespace i2p
|
||
|
{
|
||
|
namespace data
|
||
|
{
|
||
|
|
||
|
class Reseeder
|
||
|
{
|
||
10 years ago
|
typedef Tag<512> PublicKey;
|
||
|
|
||
11 years ago
|
public:
|
||
10 years ago
|
|
||
11 years ago
|
Reseeder();
|
||
|
~Reseeder();
|
||
8 years ago
|
void Bootstrap ();
|
||
8 years ago
|
int ReseedFromServers ();
|
||
|
int ReseedFromSU3Url (const std::string& url);
|
||
|
int ProcessSU3File (const char * filename);
|
||
|
int ProcessZIPFile (const char * filename);
|
||
10 years ago
|
|
||
10 years ago
|
void LoadCertificates ();
|
||
10 years ago
|
|
||
10 years ago
|
private:
|
||
|
|
||
10 years ago
|
void LoadCertificate (const std::string& filename);
|
||
9 years ago
|
|
||
10 years ago
|
int ProcessSU3Stream (std::istream& s);
|
||
8 years ago
|
int ProcessZIPStream (std::istream& s, uint64_t contentLength);
|
||
|
|
||
10 years ago
|
bool FindZipDataDescriptor (std::istream& s);
|
||
10 years ago
|
|
||
10 years ago
|
std::string HttpsRequest (const std::string& address);
|
||
|
|
||
10 years ago
|
private:
|
||
|
|
||
|
std::map<std::string, PublicKey> m_SigningKeys;
|
||
|
};
|
||
11 years ago
|
}
|
||
|
}
|
||
|
|
||
10 years ago
|
#endif
|