diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-02-23 11:47:36 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-02-23 11:47:36 -0800 |
| commit | 10185e92faa77a4b032a27a7c01b4186727b91b9 (patch) | |
| tree | 5ce223c4cbeda31551d80ee3f42445924902f2ad /node/Network.hpp | |
| parent | 33b94e8478e99d1e185041fa522b01de25fe53d4 (diff) | |
| download | infinitytier-10185e92faa77a4b032a27a7c01b4186727b91b9.tar.gz infinitytier-10185e92faa77a4b032a27a7c01b4186727b91b9.zip | |
Certificate of ownership -- used to secure against IP address spoofing, especially for IPv4 and regular IPv6.
Diffstat (limited to 'node/Network.hpp')
| -rw-r--r-- | node/Network.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/node/Network.hpp b/node/Network.hpp index 85ee6e9a..56c7fc60 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -302,6 +302,17 @@ public: Membership::AddCredentialResult addCredential(const Address &sentFrom,const Revocation &rev); /** + * Validate a credential and learn it if it passes certificate and other checks + */ + inline Membership::AddCredentialResult addCredential(const CertificateOfOwnership &coo) + { + if (coo.networkId() != _id) + return Membership::ADD_REJECTED; + Mutex::Lock _l(_lock); + return _membership(coo.issuedTo()).addCredential(RR,_config,coo); + } + + /** * Force push credentials (COM, etc.) to a peer now * * @param to Destination peer address |
