diff options
author | Kegsay <kegan@matrix.org> | 2020-06-04 11:50:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 11:50:57 +0100 |
commit | 097cdf879cb83324e238ee489354e87d77ee4dc9 (patch) | |
tree | f415d916f20431cbb86de797fd3a475d0394a51b | |
parent | e7d1ac84c32a10f8deb7bcfc94531386312179c7 (diff) |
s/Base64String/Base64Bytes/g (#1093)
* s/Base64String/Base64Bytes/g
Requires https://github.com/matrix-org/gomatrixserverlib/pull/203 to land first
* update gmsl
-rw-r--r-- | clientapi/auth/storage/accounts/sqlite3/constraint_wasm.go | 2 | ||||
-rw-r--r-- | clientapi/threepid/invites.go | 2 | ||||
-rw-r--r-- | cmd/dendrite-demo-libp2p/mdnslistener.go | 2 | ||||
-rw-r--r-- | cmd/dendritejs/keyfetcher.go | 2 | ||||
-rw-r--r-- | federationapi/routing/keys.go | 2 | ||||
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 4 | ||||
-rw-r--r-- | serverkeyapi/storage/postgres/keydb.go | 2 | ||||
-rw-r--r-- | serverkeyapi/storage/sqlite3/keydb.go | 2 |
9 files changed, 10 insertions, 10 deletions
diff --git a/clientapi/auth/storage/accounts/sqlite3/constraint_wasm.go b/clientapi/auth/storage/accounts/sqlite3/constraint_wasm.go index b5077c07..0dd5b1fe 100644 --- a/clientapi/auth/storage/accounts/sqlite3/constraint_wasm.go +++ b/clientapi/auth/storage/accounts/sqlite3/constraint_wasm.go @@ -18,4 +18,4 @@ package sqlite3 func isConstraintError(err error) bool { return false -}
\ No newline at end of file +} diff --git a/clientapi/threepid/invites.go b/clientapi/threepid/invites.go index 8fed9956..8f173bf8 100644 --- a/clientapi/threepid/invites.go +++ b/clientapi/threepid/invites.go @@ -279,7 +279,7 @@ func queryIDServerPubKey(ctx context.Context, idServerName string, keyID string) } var pubKeyRes struct { - PublicKey gomatrixserverlib.Base64String `json:"public_key"` + PublicKey gomatrixserverlib.Base64Bytes `json:"public_key"` } if resp.StatusCode != http.StatusOK { diff --git a/cmd/dendrite-demo-libp2p/mdnslistener.go b/cmd/dendrite-demo-libp2p/mdnslistener.go index 01705cf3..c30aaa33 100644 --- a/cmd/dendrite-demo-libp2p/mdnslistener.go +++ b/cmd/dendrite-demo-libp2p/mdnslistener.go @@ -43,7 +43,7 @@ func (n *mDNSListener) HandlePeerFound(p peer.AddrInfo) { KeyID: "ed25519:p2pdemo", }: { VerifyKey: gomatrixserverlib.VerifyKey{ - Key: gomatrixserverlib.Base64String(raw), + Key: gomatrixserverlib.Base64Bytes(raw), }, ValidUntilTS: math.MaxUint64 >> 1, ExpiredTS: gomatrixserverlib.PublicKeyNotExpired, diff --git a/cmd/dendritejs/keyfetcher.go b/cmd/dendritejs/keyfetcher.go index 0073b7e6..cef04537 100644 --- a/cmd/dendritejs/keyfetcher.go +++ b/cmd/dendritejs/keyfetcher.go @@ -62,7 +62,7 @@ func (f *libp2pKeyFetcher) FetchKeys( if err != nil { return nil, fmt.Errorf("Failed to extract raw bytes from public key: %w", err) } - b64Key := gomatrixserverlib.Base64String(pubKeyBytes) + b64Key := gomatrixserverlib.Base64Bytes(pubKeyBytes) res[req] = gomatrixserverlib.PublicKeyLookupResult{ VerifyKey: gomatrixserverlib.VerifyKey{ Key: b64Key, diff --git a/federationapi/routing/keys.go b/federationapi/routing/keys.go index 79cc1f82..a1dd0fd0 100644 --- a/federationapi/routing/keys.go +++ b/federationapi/routing/keys.go @@ -44,7 +44,7 @@ func localKeys(cfg *config.Dendrite, validUntil time.Time) (*gomatrixserverlib.S keys.VerifyKeys = map[gomatrixserverlib.KeyID]gomatrixserverlib.VerifyKey{ cfg.Matrix.KeyID: { - Key: gomatrixserverlib.Base64String(publicKey), + Key: gomatrixserverlib.Base64Bytes(publicKey), }, } @@ -18,7 +18,7 @@ require ( github.com/matrix-org/go-http-js-libp2p v0.0.0-20200518170932-783164aeeda4 github.com/matrix-org/go-sqlite3-js v0.0.0-20200522092705-bc8506ccbcf3 github.com/matrix-org/gomatrix v0.0.0-20190528120928-7df988a63f26 - github.com/matrix-org/gomatrixserverlib v0.0.0-20200604085359-baf0c20ac96f + github.com/matrix-org/gomatrixserverlib v0.0.0-20200604102917-067fd074d64b github.com/matrix-org/naffka v0.0.0-20200422140631-181f1ee7401f github.com/matrix-org/util v0.0.0-20190711121626-527ce5ddefc7 github.com/mattn/go-sqlite3 v2.0.2+incompatible @@ -356,8 +356,8 @@ github.com/matrix-org/go-sqlite3-js v0.0.0-20200522092705-bc8506ccbcf3 h1:Yb+Wlf github.com/matrix-org/go-sqlite3-js v0.0.0-20200522092705-bc8506ccbcf3/go.mod h1:e+cg2q7C7yE5QnAXgzo512tgFh1RbQLC0+jozuegKgo= github.com/matrix-org/gomatrix v0.0.0-20190528120928-7df988a63f26 h1:Hr3zjRsq2bhrnp3Ky1qgx/fzCtCALOoGYylh2tpS9K4= github.com/matrix-org/gomatrix v0.0.0-20190528120928-7df988a63f26/go.mod h1:3fxX6gUjWyI/2Bt7J1OLhpCzOfO/bB3AiX0cJtEKud0= -github.com/matrix-org/gomatrixserverlib v0.0.0-20200604085359-baf0c20ac96f h1:G0B8Yu/5RVg4PiNhr9Adw3g7RLmQ95wnOL7bz6tUKrU= -github.com/matrix-org/gomatrixserverlib v0.0.0-20200604085359-baf0c20ac96f/go.mod h1:JsAzE1Ll3+gDWS9JSUHPJiiyAksvOOnGWF2nXdg4ZzU= +github.com/matrix-org/gomatrixserverlib v0.0.0-20200604102917-067fd074d64b h1:VuAs44UxWAGQVtZRAdjHocw+jkZ12oZPaWA1qaUDkz4= +github.com/matrix-org/gomatrixserverlib v0.0.0-20200604102917-067fd074d64b/go.mod h1:JsAzE1Ll3+gDWS9JSUHPJiiyAksvOOnGWF2nXdg4ZzU= github.com/matrix-org/naffka v0.0.0-20200422140631-181f1ee7401f h1:pRz4VTiRCO4zPlEMc3ESdUOcW4PXHH4Kj+YDz1XyE+Y= github.com/matrix-org/naffka v0.0.0-20200422140631-181f1ee7401f/go.mod h1:y0oDTjZDv5SM9a2rp3bl+CU+bvTRINQsdb7YlDql5Go= github.com/matrix-org/util v0.0.0-20190711121626-527ce5ddefc7 h1:ntrLa/8xVzeSs8vHFHK25k0C+NV74sYMJnNSg5NoSRo= diff --git a/serverkeyapi/storage/postgres/keydb.go b/serverkeyapi/storage/postgres/keydb.go index da3a4d37..6282e13b 100644 --- a/serverkeyapi/storage/postgres/keydb.go +++ b/serverkeyapi/storage/postgres/keydb.go @@ -60,7 +60,7 @@ func NewDatabase( } value := gomatrixserverlib.PublicKeyLookupResult{ VerifyKey: gomatrixserverlib.VerifyKey{ - Key: gomatrixserverlib.Base64String(serverKey), + Key: gomatrixserverlib.Base64Bytes(serverKey), }, ValidUntilTS: gomatrixserverlib.AsTimestamp(time.Now().Add(100 * 365 * 24 * time.Hour)), ExpiredTS: gomatrixserverlib.PublicKeyNotExpired, diff --git a/serverkeyapi/storage/sqlite3/keydb.go b/serverkeyapi/storage/sqlite3/keydb.go index e8cb78bd..ab423cff 100644 --- a/serverkeyapi/storage/sqlite3/keydb.go +++ b/serverkeyapi/storage/sqlite3/keydb.go @@ -65,7 +65,7 @@ func NewDatabase( } value := gomatrixserverlib.PublicKeyLookupResult{ VerifyKey: gomatrixserverlib.VerifyKey{ - Key: gomatrixserverlib.Base64String(serverKey), + Key: gomatrixserverlib.Base64Bytes(serverKey), }, ValidUntilTS: gomatrixserverlib.AsTimestamp(time.Now().Add(100 * 365 * 24 * time.Hour)), ExpiredTS: gomatrixserverlib.PublicKeyNotExpired, |