Commit Graph

45 Commits (dev)

Author SHA1 Message Date
Jeff Becker 4508c59cd3
redo includes to be consistent 1 year ago
Jason Rhinelander c82ade2d81
Make test code work with new logging 2 years ago
Jeff 7a8410b375 make more platforms ignore libcrypt 2 years ago
Jeff ee12ba51d5 disable hashed auth on windows 2 years ago
Jeff 5050cd0299 add hashed password capability to endpoint auth by file 2 years ago
Jeff Becker 60bfdacc23
get rid of the rest of gtest/gmock 3 years ago
lyyn ece91e87fc
Migrate tests from gtest to catch2 3 years ago
Jeff 12eb32a816
add conf.d directory for config overrides (#1410)
* add conf.d directory for config overrides

* refactor llarp::Config

* add explicit constructor with datadir as parameter
* have all config files be passed as std::optional
* make Config::LoadDefault private and use std::optional in Config::Load to remove ambiguity
* update rest of codebase to reflect above changes

* fix pybind

* rename bootstrap config skipBootstrap to seednode as it's more descriptive
* make seednode configurable
* make pybind layer compile
* make pybind layer run
4 years ago
Jeff 21930cf667
LNS (#1342)
* initial relay side lns

* fix typo

* add reserved names and refactor test for dns

* lns name decryption

* all wired up (allegedly)

* refact to use service::EncryptedName for LNS responses to include nonce with ciphertext

* fully rwemove tag_lookup_job

* replace lns cache with DecayingHashTable

* check for lns name validity against the following rules:

* not localhost.loki, loki.loki, or snode.loki

* if it contains no dash then max 32 characters long, not including the .loki tld (and also assuming a leading subdomain has been stripped)

* These are from general DNS requirements, and also enforced in
registrations:

* Must be all [A-Za-z0-9-]. (A-Z will be lower-cased by the RPC call).

* cannot start or end with a -

* max 63 characters long if it does contain a dash

* cannot contain -- in the third and fourth characters unless it starts with xn--

* handle timeout in name lookup job by calling the right handler with std::nullopt
4 years ago
Stephen Shelton 1497b829bd
Ignore our self.signed file if we're a client 4 years ago
Stephen Shelton 807bfc5302
Initialize Config with LoadConfig in all key manager tests 4 years ago
Stephen Shelton fa6845b206
Use global RC file paths instead of redefining them 4 years ago
Stephen Shelton ac225eb65e
Testing: explicitly initialize variable 4 years ago
Stephen Shelton 7167b4ad02
Properly initialize config in unit test 4 years ago
Stephen Shelton 733efbab40
Reflect removal of accessors on config structs 4 years ago
Jason Rhinelander 8aacc2d317 Update deprecated gtest macros
gtest ~renamed INSTANTIATE_TEST_CASE_P to INSTANTIATE_TEST_SUITE_P and
added a "backwards compatibility" shim, but the shim fails at compile
time if you pass in an empty fourth argument.
4 years ago
Jeff 186dba45cb
Merge pull request #956 from notlesh/km-testing
Implement KeyManager tests
4 years ago
Thomas Winget a487982c49 initial implementation of blinded sign -- not working yet 4 years ago
Jason Rhinelander 860c5efd47 Derived key fixes
The reason things weren't working here is because libsodium does
something completely unintuitive and called the seed the "secret key"
when it isn't, it's the seed.

This adds a new PrivateKey class (alongside the existing SecretKey and
PubKey) that holds just a private key value but no seed -- which we need
to do because there is no way we can get a seed after calculating a
derived keypair.

With these changes, we now generate exactly the same keys and subkeys as
Tor (and a new test case uses values generated in Tor to verify this).

This is incomplete -- the subkey signing code is still not implemented;
it has to be adapted to create a signature from a PrivateKey rather than
a SecretKey which will probably requiring working around/reimplementing
some of what libsodium does for creating a signature since it expects
"secret keys" i.e. the seed.
4 years ago
Jeff Becker 99eb7726ff
initial dht key blinding 4 years ago
Stephen Shelton c303d438aa Prefer ASSERT_EQ over ASSERT_TRUE when appropriate 4 years ago
Stephen Shelton ef075a53dd Implement KeyManager tests 5 years ago
Jeff Becker 098915bb8e
add check for identity key validity 5 years ago
Jeff Becker 2cb15e7e0b
enable see2 when used 5 years ago
Jeff Becker f38240f945
devendor libsodium by default except for android 5 years ago
Jeff Becker 01c4a9c287
revert a few things 5 years ago
jeff 1cdd9ba13a add unit test for identity_keygen 5 years ago
Michael a62655d501
Move tests to use top-level LlarpTest 5 years ago
Michael 491fee206b
Port code to use CryptoManager over passing Crypto pointers 5 years ago
Rick V b1fa597fa0
include what i use 5 years ago
Jeff Becker 230e84c742
make signing work 5 years ago
Michael 656843e9a3
Fix issues on debian 5 years ago
Rick V 69189214e0
rebase on current upstream staging 5 years ago
Rick V 3931b7d9d7
implement missing libabyss functionality
remove some finished TODOs
5 years ago
Rick V f277f368a1
win32 g++ is set to c++17 by default, so we use the _real_ string_view class 5 years ago
Michael 1ba6507a2f
Tests for dht::ServiceAddressLookup 5 years ago
Michael b1213c7a7c
Tests for dht::TagLookup 5 years ago
Michael 47380ba64b
Simplify some code 5 years ago
Michael f3b0af9d2f
Create CopyableBuffer type 5 years ago
Ryan Tharp f20ac0f6e9
Merge branch 'staging' into crypto_interface 5 years ago
Ryan Tharp 42873a088f fix build 5 years ago
Michael f24f554a01
Convert llarp::Crypto into an abstract base class 5 years ago
Jeff Becker d89e58199a
add initial identity key seed stuff
add more kubernetes stuff

make shared library installed if built
5 years ago
Michael fec75125f4
Add tests for crypto/types 5 years ago
Michael 04e0fe3ad7
Move crypto code to a subdirectory 5 years ago