mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 19:04:25 -05:00
more documentation: authgpg
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2712 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a02289a611
commit
26db9fde3c
@ -54,7 +54,8 @@
|
|||||||
|
|
||||||
const time_t STORE_KEY_TIMEOUT = 60; //store key is call around every 60sec
|
const time_t STORE_KEY_TIMEOUT = 60; //store key is call around every 60sec
|
||||||
|
|
||||||
/* gpgcert is the identifier for a person.
|
/*!
|
||||||
|
* gpgcert is the identifier for a person.
|
||||||
* It is a wrapper class for a GPGme OpenPGP certificate.
|
* It is a wrapper class for a GPGme OpenPGP certificate.
|
||||||
*/
|
*/
|
||||||
class gpgcert
|
class gpgcert
|
||||||
@ -81,11 +82,17 @@ class gpgcert
|
|||||||
gpgme_key_t key;
|
gpgme_key_t key;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*!
|
||||||
* The certificate map type
|
* The certificate map type
|
||||||
*/
|
*/
|
||||||
typedef std::map<std::string, gpgcert> certmap;
|
typedef std::map<std::string, gpgcert> certmap;
|
||||||
|
|
||||||
|
//! provides basic gpg functionality
|
||||||
|
/*!
|
||||||
|
*
|
||||||
|
* This provides retroshare basic gpg functionality and
|
||||||
|
* key/web-of-trust management, also handle cert intialisation for retroshare
|
||||||
|
*/
|
||||||
class AuthGPG : public p3Config
|
class AuthGPG : public p3Config
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@ -112,6 +119,9 @@ class AuthGPG : public p3Config
|
|||||||
AuthGPG();
|
AuthGPG();
|
||||||
~AuthGPG();
|
~AuthGPG();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ids list of gpg certificate ids (note, not the actual certificates)
|
||||||
|
*/
|
||||||
bool availableGPGCertificatesWithPrivateKeys(std::list<std::string> &ids);
|
bool availableGPGCertificatesWithPrivateKeys(std::list<std::string> &ids);
|
||||||
|
|
||||||
/* SKTAN */
|
/* SKTAN */
|
||||||
@ -255,7 +265,9 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Sign a key */
|
/*!
|
||||||
|
* Sign a key
|
||||||
|
**/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SIGN_START,
|
SIGN_START,
|
||||||
@ -271,7 +283,9 @@ typedef enum
|
|||||||
} SignState;
|
} SignState;
|
||||||
|
|
||||||
|
|
||||||
/* Change the key ownertrust */
|
/*!
|
||||||
|
* Change the key ownertrust
|
||||||
|
**/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TRUST_START,
|
TRUST_START,
|
||||||
@ -285,7 +299,8 @@ typedef enum
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* This is the generic data object passed to the
|
/*!
|
||||||
|
* This is the generic data object passed to the
|
||||||
* callback function in a gpgme_op_edit operation.
|
* callback function in a gpgme_op_edit operation.
|
||||||
* The contents of this object are modified during
|
* The contents of this object are modified during
|
||||||
* each callback, to keep track of states, errors
|
* each callback, to keep track of states, errors
|
||||||
@ -295,14 +310,16 @@ class EditParams
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int state;
|
int state;
|
||||||
/* The return code of gpgme_op_edit() is the return value of
|
|
||||||
|
/*!
|
||||||
|
* The return code of gpgme_op_edit() is the return value of
|
||||||
* the last invocation of the callback. But returning an error
|
* the last invocation of the callback. But returning an error
|
||||||
* from the callback does not abort the edit operation, so we
|
* from the callback does not abort the edit operation, so we
|
||||||
* must remember any error.
|
* must remember any error.
|
||||||
*/
|
*/
|
||||||
gpg_error_t err;
|
gpg_error_t err;
|
||||||
|
|
||||||
/* Parameters specific to the key operation */
|
/// Parameters specific to the key operation
|
||||||
void *oParams;
|
void *oParams;
|
||||||
|
|
||||||
EditParams(int state, void *oParams) {
|
EditParams(int state, void *oParams) {
|
||||||
@ -313,7 +330,9 @@ class EditParams
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Data specific to key signing */
|
/*!
|
||||||
|
* Data specific to key signing
|
||||||
|
**/
|
||||||
class SignParams
|
class SignParams
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -325,7 +344,9 @@ class SignParams
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Data specific to key signing */
|
/*!
|
||||||
|
* Data specific to key signing
|
||||||
|
**/
|
||||||
class TrustParams
|
class TrustParams
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user