mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-27 11:00:37 -05:00
switched security items to new notification system
This commit is contained in:
parent
694e05d4b9
commit
d8569d813c
11 changed files with 179 additions and 52 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#include <cstdint>
|
||||
|
||||
#include "util/rsmemory.h"
|
||||
#include "util/rsurl.h"
|
||||
#include "serialiser/rsserializable.h"
|
||||
#include "serialiser/rstypeserializer.h"
|
||||
|
||||
|
|
@ -170,3 +171,51 @@ public:
|
|||
|
||||
virtual ~RsEvents();
|
||||
};
|
||||
|
||||
//===================================================================================================//
|
||||
// Connexion events //
|
||||
//===================================================================================================//
|
||||
|
||||
/**
|
||||
* Event triggered by AuthSSL when authentication of a connection attempt either
|
||||
* fail or success
|
||||
*/
|
||||
struct RsAuthSslConnectionAutenticationEvent : RsEvent
|
||||
{
|
||||
RsAuthSslConnectionAutenticationEvent();
|
||||
|
||||
enum ConnextionErrorCode: uint8_t {
|
||||
UNKNOWN_ERROR = 0x00,
|
||||
MISSING_AUTHENTICATION_INFO = 0x01,
|
||||
PGP_SIGNATURE_VALIDATION_FAILED = 0x02,
|
||||
MISMATCHED_PGP_ID = 0x03,
|
||||
NO_CERTIFICATE_SUPPLIED = 0x04,
|
||||
NOT_A_FRIEND = 0x05,
|
||||
MISSING_CERTIFICATE = 0x06,
|
||||
IP_IS_BLACKLISTED = 0x07,
|
||||
NO_ERROR = 0x08,
|
||||
};
|
||||
|
||||
bool mSuccess;
|
||||
RsPeerId mSslId;
|
||||
std::string mSslCn;
|
||||
RsPgpId mPgpId;
|
||||
RsUrl mLocator;
|
||||
std::string mErrorMsg;
|
||||
ConnextionErrorCode mErrorCode;
|
||||
|
||||
///* @see RsEvent @see RsSerializable
|
||||
void serial_process( RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx) override
|
||||
{
|
||||
RsEvent::serial_process(j, ctx);
|
||||
RS_SERIAL_PROCESS(mSuccess);
|
||||
RS_SERIAL_PROCESS(mSslId);
|
||||
RS_SERIAL_PROCESS(mSslCn);
|
||||
RS_SERIAL_PROCESS(mPgpId);
|
||||
RS_SERIAL_PROCESS(mLocator);
|
||||
RS_SERIAL_PROCESS(mErrorMsg);
|
||||
RS_SERIAL_PROCESS(mErrorCode);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,6 @@ public:
|
|||
virtual void notifyDiskFull (uint32_t /* location */, uint32_t /* size limit in MB */) {}
|
||||
virtual void notifyPeerStatusChanged (const std::string& /* peer_id */, uint32_t /* status */) {}
|
||||
virtual void notifyGxsChange (const RsGxsChanges& /* changes */) {}
|
||||
virtual void notifyConnectionWithoutCert () {}
|
||||
|
||||
/* one or more peers has changed the states */
|
||||
virtual void notifyPeerStatusChangedSummary () {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue