mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
crypto: log active driver
This commit is contained in:
parent
bdb9e22a43
commit
69869f7cb5
4 changed files with 8 additions and 0 deletions
|
|
@ -16,6 +16,8 @@ import (
|
|||
)
|
||||
|
||||
func init() {
|
||||
olm.Driver = "goolm"
|
||||
|
||||
olm.GetVersion = func() (major, minor, patch uint8) {
|
||||
return 3, 2, 15
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ import (
|
|||
var pickleKey = []byte("maunium.net/go/mautrix/crypto/olm")
|
||||
|
||||
func init() {
|
||||
olm.Driver = "libolm"
|
||||
|
||||
olm.GetVersion = func() (major, minor, patch uint8) {
|
||||
C.olm_get_library_version(
|
||||
(*C.uint8_t)(unsafe.Pointer(&major)),
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import (
|
|||
"go.mau.fi/util/exzerolog"
|
||||
|
||||
"maunium.net/go/mautrix"
|
||||
"maunium.net/go/mautrix/crypto/olm"
|
||||
"maunium.net/go/mautrix/crypto/ssss"
|
||||
"maunium.net/go/mautrix/event"
|
||||
"maunium.net/go/mautrix/id"
|
||||
|
|
@ -159,6 +160,7 @@ func (mach *OlmMachine) Load(ctx context.Context) (err error) {
|
|||
zerolog.Ctx(ctx).Debug().
|
||||
Str("machine_ptr", fmt.Sprintf("%p", mach)).
|
||||
Str("account_ptr", fmt.Sprintf("%p", mach.account.Internal)).
|
||||
Str("olm_driver", olm.Driver).
|
||||
Msg("Loaded olm account")
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ type Account interface {
|
|||
RemoveOneTimeKeys(s Session) error
|
||||
}
|
||||
|
||||
var Driver = "none"
|
||||
|
||||
var InitBlankAccount func() Account
|
||||
var InitNewAccount func() (Account, error)
|
||||
var InitNewAccountFromPickled func(pickled, key []byte) (Account, error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue