added methods to check public/private keys for consistent fingerprint and content. Should be later used to check GXS keys when they arrive from neighbor nodes.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8613 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-07-15 22:20:00 +00:00 committed by cave beat
parent 685ddbbf0a
commit 0873c0dfa2
2 changed files with 87 additions and 14 deletions

View file

@ -112,7 +112,17 @@ class GxsSecurity
* @param sign Signature for the data
* @return true if signature checks
*/
static bool validateSignature(const char *data, uint32_t data_len, const RsTlvSecurityKey& pubKey, const RsTlvKeySignature& sign);
static bool validateSignature(const char *data, uint32_t data_len, const RsTlvSecurityKey& pubKey, const RsTlvKeySignature& sign);
/*!
* Checks that the public key has correct fingerprint and correct flags.
* @brief checkPublicKey
* @param key
* @return false if the key is invalid.
*/
static bool checkPublicKey(const RsTlvSecurityKey &key);
static bool checkPrivateKey(const RsTlvSecurityKey &key);
};
#endif // GXSSECURITY_H