git-svn-id: svn://db.shs.com.ru/pip@922 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -38,7 +38,10 @@ public:
|
||||
PIAuth(const PIByteArray & sign);
|
||||
|
||||
//! Set server info data for client authorize event
|
||||
void setInfoData(const PIByteArray & info) {server_info = info;}
|
||||
void setInfoData(const PIByteArray & info) {custom_info = info;}
|
||||
|
||||
//! Set server password for check
|
||||
void setServerPassword(const PIString & ps);
|
||||
|
||||
//! Set list of trusted clients/servers public digital sign keys
|
||||
void setAuthorizedPublicKeys(const PIVector<PIByteArray> & pkeys) {auth_pkeys = pkeys;}
|
||||
@@ -70,10 +73,10 @@ public:
|
||||
|
||||
|
||||
//! Disconneted event
|
||||
EVENT(disconnected)
|
||||
EVENT1(disconnected, PIString, reason)
|
||||
|
||||
//! Conneted event
|
||||
EVENT(connected)
|
||||
EVENT1(connected, PIString, info)
|
||||
|
||||
//! Client event for authorize new server
|
||||
EVENT2(authorize, PIByteArray, info, bool *, ok)
|
||||
@@ -81,8 +84,8 @@ public:
|
||||
//! Client event for input server password
|
||||
EVENT1(passwordRequest, PIString *, pass)
|
||||
|
||||
//! Server event for check client password
|
||||
EVENT2(passwordCheck, PIByteArray, phash, bool *, ok)
|
||||
//! Server event on check client password
|
||||
EVENT1(passwordCheck, bool, result)
|
||||
|
||||
|
||||
//EVENT_HANDLER1(void, received, PIByteArray, data);
|
||||
@@ -95,13 +98,14 @@ private:
|
||||
|
||||
Role role;
|
||||
State state;
|
||||
PIByteArray server_info;
|
||||
PIByteArray custom_info;
|
||||
PICrypt crypt;
|
||||
PIByteArray sign_sk, sign_pk;
|
||||
PIByteArray auth_sign;
|
||||
PIByteArray box_sk, box_pk;
|
||||
PIByteArray my_pk;
|
||||
PIByteArray secret_key;
|
||||
PIByteArray pass_hash;
|
||||
PIVector<PIByteArray> auth_pkeys;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user