mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-09 09:35:32 -04:00
- made the names consistent between ftdata, ftdatamultiplex and tests/
- added missing virtual functions in ftDataRecv - setup initSSL instance as a static member of AuthSSL, instead of an external (does not change much except the init in rsinit.cc) - changed p3PeerMgrIMPL to take SSL and PGP ids as parameters. This avoids calling AuthSSL and AuthGPG from the constructor => very helpful for tests. - added random creation function in t_RsGenericId<> - added functions setAuthSSL_debug() and setAuthGPG_debug() to manually setup the authSSL and authGPG objects to use. Used in tests. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6035 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
69859f2a43
commit
66207b81e5
12 changed files with 52 additions and 23 deletions
|
@ -86,7 +86,6 @@ class sslcert
|
|||
};
|
||||
|
||||
/* required to install instance */
|
||||
extern void AuthSSLInit();
|
||||
|
||||
class AuthSSL
|
||||
{
|
||||
|
@ -94,6 +93,7 @@ class AuthSSL
|
|||
AuthSSL();
|
||||
|
||||
static AuthSSL *getAuthSSL();
|
||||
static void AuthSSLInit();
|
||||
|
||||
/* Initialisation Functions (Unique) */
|
||||
virtual bool validateOwnCertificate(X509 *x509, EVP_PKEY *pkey) = 0;
|
||||
|
@ -155,6 +155,9 @@ virtual void getCurrentConnectionAttemptInfo( std::string& gpg_id, s
|
|||
|
||||
virtual bool FailedCertificate(X509 *x509, const std::string& gpgid,const std::string& sslid,const std::string& sslcn,const struct sockaddr_in &addr, bool incoming) = 0; /* store for discovery */
|
||||
virtual bool CheckCertificate(std::string peerId, X509 *x509) = 0; /* check that they are exact match */
|
||||
|
||||
static void setAuthSSL_debug(AuthSSL*) ; // used for debug only. The real function is InitSSL()
|
||||
static AuthSSL *instance_ssl ;
|
||||
};
|
||||
|
||||
|
||||
|
@ -235,9 +238,6 @@ virtual bool CheckCertificate(std::string peerId, X509 *x509); /* check that th
|
|||
|
||||
private:
|
||||
|
||||
// the single instance of this
|
||||
static AuthSSL *instance_ssl;
|
||||
|
||||
bool LocalStoreCert(X509* x509);
|
||||
bool RemoveX509(std::string id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue