mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
first separation between authSSL and authGPG
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1999 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d377aa1278
commit
bd5df3a9ea
5 changed files with 399 additions and 747 deletions
|
@ -48,12 +48,16 @@
|
|||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "authgpg.h"
|
||||
|
||||
#include "util/rsthreads.h"
|
||||
|
||||
#include "pqi/pqi_base.h"
|
||||
#include "pqi/pqinetwork.h"
|
||||
#include "pqi/p3authmgr.h"
|
||||
|
||||
typedef std::string SSL_id;
|
||||
|
||||
class AuthSSL;
|
||||
|
||||
class sslcert
|
||||
|
@ -111,6 +115,7 @@ virtual bool isValid(std::string id);
|
|||
virtual bool isAuthenticated(std::string id);
|
||||
virtual std::string getName(std::string id);
|
||||
virtual std::string getIssuerName(std::string id);
|
||||
virtual GPG_id getGPGId(SSL_id id);
|
||||
virtual bool getDetails(std::string id, pqiAuthDetails &details);
|
||||
|
||||
/* first party trust info (dummy) */
|
||||
|
@ -159,6 +164,9 @@ bool decrypt(void *&out, int &outlen, const void *in, int inlen); //return t
|
|||
/*********** Overloaded Functions from p3AuthMgr **********/
|
||||
|
||||
/************* Virtual Functions from AuthSSL *************/
|
||||
X509* SignX509Req(X509_REQ *req, long days);
|
||||
bool AuthX509(X509 *x509);
|
||||
|
||||
|
||||
virtual int VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx);
|
||||
virtual bool ValidateCertificate(X509 *x509, std::string &peerId); /* validate + get id */
|
||||
|
@ -214,6 +222,14 @@ bool locked_FindCert(std::string id, sslcert **cert);
|
|||
|
||||
};
|
||||
|
||||
// the single instance of this, but only when SSL Only
|
||||
static AuthSSL instance_sslroot;
|
||||
|
||||
AuthSSL *getAuthSSL()
|
||||
{
|
||||
return &instance_sslroot;
|
||||
}
|
||||
|
||||
|
||||
X509_REQ *GenerateX509Req(
|
||||
std::string pkey_file, std::string passwd,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue