diff --git a/clientapi/auth/storage/accounts/sqlite3/constraint_wasm.go b/clientapi/auth/storage/accounts/sqlite3/constraint_wasm.go index b5077c070..0dd5b1fea 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 8fed99565..8f173bf8a 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 01705cf39..c30aaa331 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 0073b7e6b..cef045372 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 79cc1f82c..a1dd0fd09 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), }, } diff --git a/go.mod b/go.mod index 5510e8e0e..e40fbc507 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 5df03cbaa..72f14ca02 100644 --- a/go.sum +++ b/go.sum @@ -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 da3a4d370..6282e13bb 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 e8cb78bd6..ab423cff6 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,