mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-09 22:42:58 +00:00
s/Base64String/Base64Bytes/g (#1093)
* s/Base64String/Base64Bytes/g Requires https://github.com/matrix-org/gomatrixserverlib/pull/203 to land first * update gmsl
This commit is contained in:
parent
e7d1ac84c3
commit
097cdf879c
@ -18,4 +18,4 @@ package sqlite3
|
||||
|
||||
func isConstraintError(err error) bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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),
|
||||
},
|
||||
}
|
||||
|
||||
|
2
go.mod
2
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
|
||||
|
4
go.sum
4
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=
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user