From 905dc52b7a587c19af8cef05dc111a3cc550b8de Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 8 Apr 2021 17:14:41 -0700 Subject: [PATCH 1/2] Update Connectivity and Logging --- .../tokenboard/tokenboard_integration_test.go | 3 +- go.mod | 8 +-- go.sum | 62 +++++++------------ testing/tapir_integration_test.go | 3 +- ...tapir_malicious_remote_integration_test.go | 4 +- 5 files changed, 33 insertions(+), 47 deletions(-) diff --git a/applications/tokenboard/tokenboard_integration_test.go b/applications/tokenboard/tokenboard_integration_test.go index e3e161c..81617ad 100644 --- a/applications/tokenboard/tokenboard_integration_test.go +++ b/applications/tokenboard/tokenboard_integration_test.go @@ -75,7 +75,8 @@ func TestTokenBoardApp(t *testing.T) { log.Infof("Number of goroutines open at start: %d", runtime.NumGoroutine()) os.MkdirAll("./tor/", 0700) - torProvider.GenerateTorrc("tapir-integration-test", "./tor/torrc") + builder := new(torProvider.TorrcBuilder) + builder.WithHashedPassword("tapir-integration-test").Build("./tor/torrc") // Connect to Tor acn, err := torProvider.NewTorACNWithAuth("./", "", 9051, torProvider.HashedPasswordAuthenticator{Password: "tapir-integration-test"}) diff --git a/go.mod b/go.mod index 45dc8e5..3125992 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,15 @@ module cwtch.im/tapir require ( - git.openprivacy.ca/openprivacy/connectivity v1.2.0 - git.openprivacy.ca/openprivacy/log v1.0.1 + git.openprivacy.ca/openprivacy/connectivity v1.4.0 + git.openprivacy.ca/openprivacy/log v1.0.2 github.com/davecgh/go-spew v1.1.1 // indirect github.com/gtank/merlin v0.1.1 github.com/gtank/ristretto255 v0.1.2 github.com/kr/pretty v0.2.0 // indirect - github.com/stretchr/testify v1.4.0 // indirect go.etcd.io/bbolt v1.3.4 - golang.org/x/crypto v0.0.0-20200206161412-a0c6ece9d31a + golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect - gopkg.in/yaml.v2 v2.2.8 // indirect ) go 1.13 diff --git a/go.sum b/go.sum index a3ef9f6..41e69b9 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,13 @@ -git.openprivacy.ca/openprivacy/connectivity v1.1.0 h1:9PEeKuPdoIRYeA62BUkBW2BfK4KqKEXz1fvUxZoP4xs= -git.openprivacy.ca/openprivacy/connectivity v1.1.0/go.mod h1:4P8mirZZslKbo2zBrXXVjgEdqGwHo/6qoFBwFQW6d6E= -git.openprivacy.ca/openprivacy/connectivity v1.2.0 h1:dbZ5CRl11vg3BNHdzRKSlDP8OUtDB+mf6FkxMVf73qw= -git.openprivacy.ca/openprivacy/connectivity v1.2.0/go.mod h1:B7vzuVmChJtSKoh0ezph5vu6DQ0gIk0zHUNG6IgXCcA= -git.openprivacy.ca/openprivacy/log v1.0.0 h1:Rvqm1weUdR4AOnJ79b1upHCc9vC/QF1rhSD2Um7sr1Y= -git.openprivacy.ca/openprivacy/log v1.0.0/go.mod h1:gGYK8xHtndRLDymFtmjkG26GaMQNgyhioNS82m812Iw= -git.openprivacy.ca/openprivacy/log v1.0.1 h1:NWV5oBTatvlSzUE6wtB+UQCulgyMOtm4BXGd34evMys= +git.openprivacy.ca/openprivacy/bine v0.0.4 h1:CO7EkGyz+jegZ4ap8g5NWRuDHA/56KKvGySR6OBPW+c= +git.openprivacy.ca/openprivacy/bine v0.0.4/go.mod h1:13ZqhKyqakDsN/ZkQkIGNULsmLyqtXc46XBcnuXm/mU= +git.openprivacy.ca/openprivacy/connectivity v1.4.0 h1:c7AANUCrlA4hIqXxIGDOWMtSe8CpDleD1877PShScbM= +git.openprivacy.ca/openprivacy/connectivity v1.4.0/go.mod h1:bR0Myx9nm2YzWtsThRelkNMV4Pp7sPDa123O1qsAbVo= git.openprivacy.ca/openprivacy/log v1.0.1/go.mod h1:gGYK8xHtndRLDymFtmjkG26GaMQNgyhioNS82m812Iw= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cretz/bine v0.1.1-0.20200124154328-f9f678b84cca h1:Q2r7AxHdJwWfLtBZwvW621M3sPqxPc6ITv2j1FGsYpw= -github.com/cretz/bine v0.1.1-0.20200124154328-f9f678b84cca/go.mod h1:6PF6fWAvYtwjRGkAuDEJeWNOv3a2hUouSP/yRYXmvHw= +git.openprivacy.ca/openprivacy/log v1.0.2 h1:HLP4wsw4ljczFAelYnbObIs821z+jgMPCe8uODPnGQM= +git.openprivacy.ca/openprivacy/log v1.0.2/go.mod h1:gGYK8xHtndRLDymFtmjkG26GaMQNgyhioNS82m812Iw= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= @@ -27,42 +22,31 @@ github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjK github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200206161412-a0c6ece9d31a h1:aczoJ0HPNE92XKa7DrIzkNN6esOKO2TBwiiYoKcINhA= -golang.org/x/crypto v0.0.0-20200206161412-a0c6ece9d31a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee h1:4yd7jl+vXjalO5ztz6Vc1VADv+S/80LGJmyl1ROJ2AI= +golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44 h1:Bli41pIlzTzf3KEY06n+xnzK/BESIg2ze4Pgfh/aI8c= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200625195345-7480c7b4547d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/testing/tapir_integration_test.go b/testing/tapir_integration_test.go index 9ff72e6..b5116ce 100644 --- a/testing/tapir_integration_test.go +++ b/testing/tapir_integration_test.go @@ -62,7 +62,8 @@ func TestTapir(t *testing.T) { log.Infof("Number of goroutines open at start: %d", runtime.NumGoroutine()) // Connect to Tor os.MkdirAll("./tor/", 0700) - torProvider.GenerateTorrc("tapir-integration-test", "./tor/torrc") + builder := new(torProvider.TorrcBuilder) + builder.WithHashedPassword("tapir-integration-test").Build("./tor/torrc") // Connect to Tor acn, err := torProvider.NewTorACNWithAuth("./", "", 9051, torProvider.HashedPasswordAuthenticator{Password: "tapir-integration-test"}) diff --git a/testing/tapir_malicious_remote_integration_test.go b/testing/tapir_malicious_remote_integration_test.go index e80ab95..1574bd9 100644 --- a/testing/tapir_malicious_remote_integration_test.go +++ b/testing/tapir_malicious_remote_integration_test.go @@ -22,7 +22,9 @@ func TestTapirMaliciousRemote(t *testing.T) { log.Infof("Number of goroutines open at start: %d", runtime.NumGoroutine()) // Connect to Tor os.MkdirAll("./tor/", 0700) - torProvider.GenerateTorrc("tapir-integration-test", "./tor/torrc") + builder := new(torProvider.TorrcBuilder) + builder.WithHashedPassword("tapir-integration-test").Build("./tor/torrc") + // Connect to Tor acn, err := torProvider.NewTorACNWithAuth("./", "", 9051, torProvider.HashedPasswordAuthenticator{Password: "tapir-integration-test"}) From b68d8382958f8f0a023e35b00bcf915c04f99a68 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 8 Apr 2021 17:55:17 -0700 Subject: [PATCH 2/2] Remove custom url forwarding for tapir module --- application.go | 2 +- applications/application_chain.go | 2 +- applications/auth.go | 4 ++-- applications/auth_test.go | 4 ++-- applications/proof_of_work_app.go | 4 ++-- applications/token_app.go | 4 ++-- applications/tokenboard/client.go | 8 ++++---- applications/tokenboard/common.go | 4 ++-- applications/tokenboard/server.go | 8 ++++---- .../tokenboard/tokenboard_integration_test.go | 12 ++++++------ applications/transcript_app.go | 4 ++-- go.mod | 2 +- networks/tor/BaseOnionService.go | 5 +++-- primitives/auditable/auditablestore.go | 6 +++--- primitives/auditable/auditablestore_test.go | 4 ++-- primitives/identity.go | 2 +- primitives/privacypass/dlogeq.go | 2 +- primitives/privacypass/token.go | 2 +- primitives/privacypass/token_test.go | 4 ++-- primitives/privacypass/tokenserver.go | 4 ++-- service.go | 3 ++- testing/tapir_integration_test.go | 8 ++++---- testing/tapir_malicious_remote_integration_test.go | 9 ++++----- 23 files changed, 54 insertions(+), 53 deletions(-) diff --git a/application.go b/application.go index 1fd47b9..0be1173 100644 --- a/application.go +++ b/application.go @@ -1,7 +1,7 @@ package tapir import ( - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" ) // Capability defines a status granted to a connection, from an application. That allows the connection to access diff --git a/applications/application_chain.go b/applications/application_chain.go index 3b440af..32d50f9 100644 --- a/applications/application_chain.go +++ b/applications/application_chain.go @@ -1,7 +1,7 @@ package applications import ( - "cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir" ) // ApplicationChain is a meta-app that can be used to build complex applications from other applications diff --git a/applications/auth.go b/applications/auth.go index 898bd55..e7ea405 100644 --- a/applications/auth.go +++ b/applications/auth.go @@ -2,9 +2,9 @@ package applications import ( "crypto/subtle" - "cwtch.im/tapir" - "cwtch.im/tapir/primitives" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" diff --git a/applications/auth_test.go b/applications/auth_test.go index ef5f08f..be41015 100644 --- a/applications/auth_test.go +++ b/applications/auth_test.go @@ -2,9 +2,9 @@ package applications import ( "crypto/rand" - "cwtch.im/tapir" - "cwtch.im/tapir/primitives" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "golang.org/x/crypto/ed25519" "testing" ) diff --git a/applications/proof_of_work_app.go b/applications/proof_of_work_app.go index 602f2f2..bdf0c61 100644 --- a/applications/proof_of_work_app.go +++ b/applications/proof_of_work_app.go @@ -2,8 +2,8 @@ package applications import ( "crypto/sha256" - "cwtch.im/tapir" - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" ) diff --git a/applications/token_app.go b/applications/token_app.go index 11e4970..263bc6f 100644 --- a/applications/token_app.go +++ b/applications/token_app.go @@ -1,9 +1,9 @@ package applications import ( - "cwtch.im/tapir" - "cwtch.im/tapir/primitives/privacypass" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" "git.openprivacy.ca/openprivacy/log" ) diff --git a/applications/tokenboard/client.go b/applications/tokenboard/client.go index 13ed6fd..171263e 100644 --- a/applications/tokenboard/client.go +++ b/applications/tokenboard/client.go @@ -1,11 +1,11 @@ package tokenboard import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/primitives/auditable" - "cwtch.im/tapir/primitives/privacypass" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/primitives/auditable" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" "git.openprivacy.ca/openprivacy/log" ) diff --git a/applications/tokenboard/common.go b/applications/tokenboard/common.go index ba746e1..9c9385a 100644 --- a/applications/tokenboard/common.go +++ b/applications/tokenboard/common.go @@ -1,8 +1,8 @@ package tokenboard import ( - "cwtch.im/tapir/primitives/auditable" - "cwtch.im/tapir/primitives/privacypass" + "git.openprivacy.ca/cwtch.im/tapir/primitives/auditable" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" ) // AppHandler allows clients to react to specific events. diff --git a/applications/tokenboard/server.go b/applications/tokenboard/server.go index 54bd3cc..39c6df4 100644 --- a/applications/tokenboard/server.go +++ b/applications/tokenboard/server.go @@ -3,11 +3,11 @@ package tokenboard // NOTE: This is a sketch implementation, Not suitable for production use. The real auditable store is still being designed. import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/primitives/auditable" - "cwtch.im/tapir/primitives/privacypass" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/primitives/auditable" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" "git.openprivacy.ca/openprivacy/log" ) diff --git a/applications/tokenboard/tokenboard_integration_test.go b/applications/tokenboard/tokenboard_integration_test.go index 81617ad..0446206 100644 --- a/applications/tokenboard/tokenboard_integration_test.go +++ b/applications/tokenboard/tokenboard_integration_test.go @@ -1,13 +1,13 @@ package tokenboard import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/networks/tor" - "cwtch.im/tapir/primitives" - "cwtch.im/tapir/primitives/auditable" - "cwtch.im/tapir/primitives/privacypass" "errors" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/networks/tor" + "git.openprivacy.ca/cwtch.im/tapir/primitives" + "git.openprivacy.ca/cwtch.im/tapir/primitives/auditable" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" "git.openprivacy.ca/openprivacy/connectivity" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "git.openprivacy.ca/openprivacy/log" diff --git a/applications/transcript_app.go b/applications/transcript_app.go index 5a89f95..d11b096 100644 --- a/applications/transcript_app.go +++ b/applications/transcript_app.go @@ -1,8 +1,8 @@ package applications import ( - "cwtch.im/tapir" - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" ) diff --git a/go.mod b/go.mod index 3125992..79b95b7 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module cwtch.im/tapir +module git.openprivacy.ca/cwtch.im/tapir require ( git.openprivacy.ca/openprivacy/connectivity v1.4.0 diff --git a/networks/tor/BaseOnionService.go b/networks/tor/BaseOnionService.go index f7aec1d..c6a30a8 100644 --- a/networks/tor/BaseOnionService.go +++ b/networks/tor/BaseOnionService.go @@ -2,10 +2,10 @@ package tor import ( "crypto/rand" - "cwtch.im/tapir" - "cwtch.im/tapir/primitives" "encoding/base64" "errors" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "git.openprivacy.ca/openprivacy/connectivity" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" @@ -23,6 +23,7 @@ type BaseOnionService struct { lock sync.Mutex } +// Metrics provide metrics for services func (s *BaseOnionService) Metrics() tapir.ServiceMetrics { s.lock.Lock() defer s.lock.Unlock() diff --git a/primitives/auditable/auditablestore.go b/primitives/auditable/auditablestore.go index a4574a2..90910a6 100644 --- a/primitives/auditable/auditablestore.go +++ b/primitives/auditable/auditablestore.go @@ -3,11 +3,11 @@ package auditable // WARNING NOTE: This is a sketch implementation, Not suitable for production use. The real auditable store is still being designed. import ( - "cwtch.im/tapir/persistence" - "cwtch.im/tapir/primitives" - "cwtch.im/tapir/primitives/core" "encoding/base64" "errors" + "git.openprivacy.ca/cwtch.im/tapir/persistence" + "git.openprivacy.ca/cwtch.im/tapir/primitives" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" "sync" diff --git a/primitives/auditable/auditablestore_test.go b/primitives/auditable/auditablestore_test.go index 2e0623f..aeae0fb 100644 --- a/primitives/auditable/auditablestore_test.go +++ b/primitives/auditable/auditablestore_test.go @@ -1,9 +1,9 @@ package auditable import ( - "cwtch.im/tapir/persistence" - "cwtch.im/tapir/primitives" "fmt" + "git.openprivacy.ca/cwtch.im/tapir/persistence" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "git.openprivacy.ca/openprivacy/log" "os" "testing" diff --git a/primitives/identity.go b/primitives/identity.go index 1ac8995..b63e6a8 100644 --- a/primitives/identity.go +++ b/primitives/identity.go @@ -2,7 +2,7 @@ package primitives import ( "crypto/rand" - "cwtch.im/tapir/utils" + "git.openprivacy.ca/cwtch.im/tapir/utils" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "golang.org/x/crypto/ed25519" ) diff --git a/primitives/privacypass/dlogeq.go b/primitives/privacypass/dlogeq.go index c57dafc..438a4f3 100644 --- a/primitives/privacypass/dlogeq.go +++ b/primitives/privacypass/dlogeq.go @@ -2,7 +2,7 @@ package privacypass import ( "crypto/rand" - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" ristretto "github.com/gtank/ristretto255" ) diff --git a/primitives/privacypass/token.go b/primitives/privacypass/token.go index 8bc9a77..e4ffc0d 100644 --- a/primitives/privacypass/token.go +++ b/primitives/privacypass/token.go @@ -3,8 +3,8 @@ package privacypass import ( "crypto/hmac" "crypto/rand" - "cwtch.im/tapir/primitives/core" "fmt" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" ristretto "github.com/gtank/ristretto255" diff --git a/primitives/privacypass/token_test.go b/primitives/privacypass/token_test.go index bca04cd..8033a6e 100644 --- a/primitives/privacypass/token_test.go +++ b/primitives/privacypass/token_test.go @@ -1,8 +1,8 @@ package privacypass import ( - "cwtch.im/tapir/persistence" - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir/persistence" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" "github.com/gtank/ristretto255" "golang.org/x/crypto/sha3" diff --git a/primitives/privacypass/tokenserver.go b/primitives/privacypass/tokenserver.go index c5036d2..72a279b 100644 --- a/primitives/privacypass/tokenserver.go +++ b/primitives/privacypass/tokenserver.go @@ -3,10 +3,10 @@ package privacypass import ( "crypto/hmac" "crypto/rand" - "cwtch.im/tapir/persistence" - "cwtch.im/tapir/primitives/core" "encoding/hex" "fmt" + "git.openprivacy.ca/cwtch.im/tapir/persistence" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" ristretto "github.com/gtank/ristretto255" "golang.org/x/crypto/sha3" "sync" diff --git a/service.go b/service.go index f010179..f7b5408 100644 --- a/service.go +++ b/service.go @@ -2,8 +2,8 @@ package tapir import ( "crypto/rand" - "cwtch.im/tapir/primitives" "encoding/binary" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "git.openprivacy.ca/openprivacy/connectivity" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" @@ -12,6 +12,7 @@ import ( "sync" ) +// ServiceMetrics are metrics for servers... type ServiceMetrics struct { ConnectionCount int } diff --git a/testing/tapir_integration_test.go b/testing/tapir_integration_test.go index b5116ce..36c883f 100644 --- a/testing/tapir_integration_test.go +++ b/testing/tapir_integration_test.go @@ -1,10 +1,10 @@ package testing import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/networks/tor" - "cwtch.im/tapir/primitives" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/networks/tor" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "git.openprivacy.ca/openprivacy/connectivity" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "git.openprivacy.ca/openprivacy/log" diff --git a/testing/tapir_malicious_remote_integration_test.go b/testing/tapir_malicious_remote_integration_test.go index 1574bd9..80244e9 100644 --- a/testing/tapir_malicious_remote_integration_test.go +++ b/testing/tapir_malicious_remote_integration_test.go @@ -1,10 +1,10 @@ package testing import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/networks/tor" - "cwtch.im/tapir/primitives" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/networks/tor" + "git.openprivacy.ca/cwtch.im/tapir/primitives" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" @@ -25,7 +25,6 @@ func TestTapirMaliciousRemote(t *testing.T) { builder := new(torProvider.TorrcBuilder) builder.WithHashedPassword("tapir-integration-test").Build("./tor/torrc") - // Connect to Tor acn, err := torProvider.NewTorACNWithAuth("./", "", 9051, torProvider.HashedPasswordAuthenticator{Password: "tapir-integration-test"}) if err != nil {