slidge-whatsapp 0.2.5__cp313-cp313-manylinux_2_36_aarch64.whl → 0.2.7__cp313-cp313-manylinux_2_36_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of slidge-whatsapp might be problematic. Click here for more details.
- slidge_whatsapp/config.py +3 -0
- slidge_whatsapp/event.go +31 -26
- slidge_whatsapp/gateway.go +13 -9
- slidge_whatsapp/gateway.py +2 -2
- slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +135 -135
- slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +108 -108
- slidge_whatsapp/generated/whatsapp.c +954 -954
- slidge_whatsapp/generated/whatsapp.go +602 -602
- slidge_whatsapp/generated/whatsapp.py +783 -783
- slidge_whatsapp/generated/whatsapp_go.h +135 -135
- slidge_whatsapp/go.mod +15 -12
- slidge_whatsapp/go.sum +35 -29
- slidge_whatsapp/media/media.go +21 -11
- slidge_whatsapp/session.go +73 -66
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn.go +4 -4
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn_darwin.go +0 -5
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +3 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +40 -20
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +14 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +2 -2
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/fun.go +10 -2
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib.go +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_unix.go +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_windows.go +1 -1
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -7
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/callback.go +2 -1
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +8510 -5090
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +344 -150
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3.go +57 -23
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.c +4 -0
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/.gitignore +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/LICENSE +202 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/README.md +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid.go +35 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_gccgo.go +26 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.c +23 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.go +22 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.go +35 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.s +18 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.go +28 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.s +44 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/goid_slow.go +24 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_gccgo_go1.8.go +17 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +38 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.5.go +57 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.6.go +43 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.9.go +37 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/CONTRIBUTING.md +43 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/README.md +31 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/console.go +20 -5
- slidge_whatsapp/vendor/github.com/rs/zerolog/log/log.go +131 -0
- slidge_whatsapp/vendor/github.com/rs/zerolog/log.go +1 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/sampler.go +4 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/writer.go +9 -0
- slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupCipher.go +17 -6
- slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go +17 -7
- slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go +4 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/libsignal/logger/DefaultLogger.go +2 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/libsignal/session/Session.go +41 -17
- slidge_whatsapp/vendor/go.mau.fi/libsignal/session/SessionCipher.go +64 -30
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go +5 -3
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go +6 -4
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go +6 -4
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SessionStore.go +8 -6
- slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go +7 -5
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/connlog.go +257 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/database.go +309 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/iter.go +233 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/json.go +47 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/log.go +129 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/massinsert.go +164 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/queryhelper.go +137 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/reflectscan.go +30 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/transaction.go +180 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgrades.go +250 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgradetable.go +331 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exerrors/dualerror.go +33 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exerrors/must.go +23 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/cors.go +32 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +64 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +36 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/middleware.go +30 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +37 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +76 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +88 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/returnonce.go +25 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/ringbuffer.go +139 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncmap.go +94 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncset.go +136 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/callermarshal.go +28 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/defaults.go +32 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/generics.go +45 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/writer.go +81 -0
- slidge_whatsapp/vendor/go.mau.fi/util/ptr/ptr.go +43 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +27 -26
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/encode.go +4 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/keys.go +5 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +27 -25
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +40 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/broadcast.go +5 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +119 -37
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +29 -11
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +63 -30
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +74 -34
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +61 -31
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +188 -152
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaconn.go +5 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaretry.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +444 -135
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +118 -31
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +78 -42
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +7 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair.go +42 -18
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/prekeys.go +9 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/privacysettings.go +10 -11
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.go +39 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.go +354 -175
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.proto +5 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +170 -15
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.go +29 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.go +13 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.go +344 -31
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.proto +26 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.pb.go → WACompanionReg.pb.go} +184 -89
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.proto → WACompanionReg.proto} +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.go +173 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.go +78 -16
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.proto +5 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +7428 -2151
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +373 -44
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +456 -135
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +14 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.go +162 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.go +32 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.go +192 -52
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.proto +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.go +60 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.go +39 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.go +61 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +800 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +72 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1344 -438
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +52 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.go +27 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.go +59 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +382 -78
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +563 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +25 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +39 -21
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +261 -75
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +28 -16
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +3 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +85 -43
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/signal.go +75 -88
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +86 -65
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/lidmap.go +186 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +291 -167
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +155 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/03-message-secrets.sql +11 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/04-privacy-tokens.sql +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/05-account-jid-format.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/06-facebook-uuid.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/07-account-lid.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/08-lid-mapping.sql +5 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/09-decryption-buffer.sql +10 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/upgrades.go +22 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +107 -56
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/botmap.go +210 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +13 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/group.go +15 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +7 -8
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +18 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/update.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/upload.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +47 -29
- slidge_whatsapp/vendor/golang.org/x/exp/LICENSE +27 -0
- slidge_whatsapp/vendor/golang.org/x/exp/PATENTS +22 -0
- slidge_whatsapp/vendor/golang.org/x/exp/constraints/constraints.go +54 -0
- slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/guts.go +50 -0
- slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/httplex.go +347 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/.gitignore +2 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/ascii.go +53 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/ciphers.go +641 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/client_conn_pool.go +311 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +122 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +61 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/databuffer.go +149 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/errors.go +145 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/flow.go +120 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +1702 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +170 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/encode.go +245 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/hpack.go +523 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/huffman.go +226 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/static_table.go +188 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/tables.go +403 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +432 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/pipe.go +184 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +3350 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +20 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +3287 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/unencrypted.go +32 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/write.go +381 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched.go +251 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_priority.go +451 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_random.go +77 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_roundrobin.go +119 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/go118.go +13 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/idna10.0.0.go +769 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/idna9.0.0.go +717 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/pre_go118.go +11 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/punycode.go +217 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables10.0.0.go +4559 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables11.0.0.go +4653 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables12.0.0.go +4733 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables13.0.0.go +4959 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables15.0.0.go +5144 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/tables9.0.0.go +4486 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trie.go +51 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trie12.0.0.go +30 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trie13.0.0.go +30 -0
- slidge_whatsapp/vendor/golang.org/x/net/idna/trieval.go +119 -0
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/ascii.go +53 -0
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/headermap.go +115 -0
- slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/request.go +467 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +148 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_linux.go +16 -26
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +84 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +20 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +84 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +20 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/security_windows.go +44 -5
- slidge_whatsapp/vendor/golang.org/x/sys/windows/syscall_windows.go +4 -2
- slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +239 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +9 -0
- slidge_whatsapp/vendor/golang.org/x/text/LICENSE +27 -0
- slidge_whatsapp/vendor/golang.org/x/text/PATENTS +22 -0
- slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule.go +336 -0
- slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go +11 -0
- slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go +14 -0
- slidge_whatsapp/vendor/golang.org/x/text/transform/transform.go +709 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bidi.go +359 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bracket.go +335 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/core.go +1071 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/prop.go +206 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go +1815 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +1887 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go +1923 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go +1955 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go +2042 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go +1781 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/trieval.go +48 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/composition.go +512 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/forminfo.go +279 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/input.go +109 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/iter.go +458 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/normalize.go +610 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/readwriter.go +125 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go +7657 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +7693 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go +7710 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables13.0.0.go +7760 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go +7907 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go +7637 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/transform.go +88 -0
- slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/trie.go +54 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +3 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +16 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/{strings_unsafe_go121.go → strings_unsafe.go} +0 -2
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
- slidge_whatsapp/vendor/google.golang.org/protobuf/proto/merge.go +6 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +2 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/{value_unsafe_go121.go → value_unsafe.go} +0 -2
- slidge_whatsapp/vendor/modules.txt +52 -13
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/METADATA +1 -1
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/RECORD +330 -184
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/WHEEL +1 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/CNAME +0 -1
- slidge_whatsapp/vendor/github.com/rs/zerolog/_config.yml +0 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.raw +0 -23
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.raw +0 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.raw +0 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go +0 -296
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +0 -94
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +0 -98
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/LICENSE +0 -0
- {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/entry_points.txt +0 -0
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
package serialize
|
|
10
10
|
|
|
11
11
|
import (
|
|
12
|
-
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
13
|
-
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
14
12
|
reflect "reflect"
|
|
15
13
|
sync "sync"
|
|
14
|
+
|
|
15
|
+
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
16
|
+
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
16
17
|
)
|
|
17
18
|
|
|
18
19
|
const (
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
package serialize
|
|
10
10
|
|
|
11
11
|
import (
|
|
12
|
-
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
13
|
-
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
14
12
|
reflect "reflect"
|
|
15
13
|
sync "sync"
|
|
14
|
+
|
|
15
|
+
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
16
|
+
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
16
17
|
)
|
|
17
18
|
|
|
18
19
|
const (
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
package session
|
|
3
3
|
|
|
4
4
|
import (
|
|
5
|
+
"context"
|
|
5
6
|
"fmt"
|
|
6
7
|
|
|
7
8
|
"go.mau.fi/libsignal/ecc"
|
|
@@ -56,9 +57,9 @@ func NewBuilderFromSignal(signalStore store.SignalProtocol,
|
|
|
56
57
|
// used to encrypt/decrypt messages in that session.
|
|
57
58
|
//
|
|
58
59
|
// Sessions are built from one of three different vectors:
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
60
|
+
// - PreKeyBundle retrieved from a server.
|
|
61
|
+
// - PreKeySignalMessage received from a client.
|
|
62
|
+
// - KeyExchangeMessage sent to or received from a client.
|
|
62
63
|
//
|
|
63
64
|
// Sessions are constructed per recipientId + deviceId tuple.
|
|
64
65
|
// Remote logical users are identified by their recipientId,
|
|
@@ -75,22 +76,28 @@ type Builder struct {
|
|
|
75
76
|
|
|
76
77
|
// Process builds a new session from a session record and pre
|
|
77
78
|
// key signal message.
|
|
78
|
-
func (b *Builder) Process(sessionRecord *record.Session, message *protocol.PreKeySignalMessage) (unsignedPreKeyID *optional.Uint32, err error) {
|
|
79
|
+
func (b *Builder) Process(ctx context.Context, sessionRecord *record.Session, message *protocol.PreKeySignalMessage) (unsignedPreKeyID *optional.Uint32, err error) {
|
|
79
80
|
|
|
80
81
|
// Check to see if the keys are trusted.
|
|
81
82
|
theirIdentityKey := message.IdentityKey()
|
|
82
|
-
|
|
83
|
+
trusted, err := b.identityKeyStore.IsTrustedIdentity(ctx, b.remoteAddress, theirIdentityKey)
|
|
84
|
+
if err != nil {
|
|
85
|
+
return nil, err
|
|
86
|
+
}
|
|
87
|
+
if !trusted {
|
|
83
88
|
return nil, signalerror.ErrUntrustedIdentity
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
// Use version 3 of the signal/axolotl protocol.
|
|
87
|
-
unsignedPreKeyID, err = b.processV3(sessionRecord, message)
|
|
92
|
+
unsignedPreKeyID, err = b.processV3(ctx, sessionRecord, message)
|
|
88
93
|
if err != nil {
|
|
89
94
|
return nil, err
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
// Save the identity key to our identity store.
|
|
93
|
-
b.identityKeyStore.SaveIdentity(b.remoteAddress, theirIdentityKey)
|
|
98
|
+
if err := b.identityKeyStore.SaveIdentity(ctx, b.remoteAddress, theirIdentityKey); err != nil {
|
|
99
|
+
return nil, err
|
|
100
|
+
}
|
|
94
101
|
|
|
95
102
|
// Return the unsignedPreKeyID
|
|
96
103
|
return unsignedPreKeyID, nil
|
|
@@ -99,7 +106,7 @@ func (b *Builder) Process(sessionRecord *record.Session, message *protocol.PreKe
|
|
|
99
106
|
// ProcessV3 builds a new session from a session record and pre key
|
|
100
107
|
// signal message. After a session is constructed in this way, the embedded
|
|
101
108
|
// SignalMessage can be decrypted.
|
|
102
|
-
func (b *Builder) processV3(sessionRecord *record.Session,
|
|
109
|
+
func (b *Builder) processV3(ctx context.Context, sessionRecord *record.Session,
|
|
103
110
|
message *protocol.PreKeySignalMessage) (unsignedPreKeyID *optional.Uint32, err error) {
|
|
104
111
|
|
|
105
112
|
logger.Debug("Processing message with PreKeyID: ", message.PreKeyID())
|
|
@@ -114,7 +121,10 @@ func (b *Builder) processV3(sessionRecord *record.Session,
|
|
|
114
121
|
}
|
|
115
122
|
|
|
116
123
|
// Load our signed prekey from our signed prekey store.
|
|
117
|
-
ourSignedPreKeyRecord := b.signedPreKeyStore.LoadSignedPreKey(message.SignedPreKeyID())
|
|
124
|
+
ourSignedPreKeyRecord, err := b.signedPreKeyStore.LoadSignedPreKey(ctx, message.SignedPreKeyID())
|
|
125
|
+
if err != nil {
|
|
126
|
+
return nil, err
|
|
127
|
+
}
|
|
118
128
|
if ourSignedPreKeyRecord == nil {
|
|
119
129
|
return nil, fmt.Errorf("%w with ID %d", signalerror.ErrNoSignedPreKey, message.SignedPreKeyID())
|
|
120
130
|
}
|
|
@@ -131,7 +141,10 @@ func (b *Builder) processV3(sessionRecord *record.Session,
|
|
|
131
141
|
// Set our one time pre key with the one from our prekey store
|
|
132
142
|
// if the message contains a valid pre key id
|
|
133
143
|
if !message.PreKeyID().IsEmpty {
|
|
134
|
-
oneTimePreKey := b.preKeyStore.LoadPreKey(message.PreKeyID().Value)
|
|
144
|
+
oneTimePreKey, err := b.preKeyStore.LoadPreKey(ctx, message.PreKeyID().Value)
|
|
145
|
+
if err != nil {
|
|
146
|
+
return nil, err
|
|
147
|
+
}
|
|
135
148
|
if oneTimePreKey == nil {
|
|
136
149
|
return nil, fmt.Errorf("%w with ID %d", signalerror.ErrNoOneTimeKeyFound, message.PreKeyID().Value)
|
|
137
150
|
}
|
|
@@ -158,7 +171,7 @@ func (b *Builder) processV3(sessionRecord *record.Session,
|
|
|
158
171
|
sessionState.SetRootKey(derivedKeys.RootKey)
|
|
159
172
|
|
|
160
173
|
// Set the session's registration ids and base key
|
|
161
|
-
sessionState.SetLocalRegistrationID(b.identityKeyStore.
|
|
174
|
+
sessionState.SetLocalRegistrationID(b.identityKeyStore.GetLocalRegistrationID())
|
|
162
175
|
sessionState.SetRemoteRegistrationID(message.RegistrationID())
|
|
163
176
|
sessionState.SetSenderBaseKey(message.BaseKey().Serialize())
|
|
164
177
|
|
|
@@ -171,9 +184,13 @@ func (b *Builder) processV3(sessionRecord *record.Session,
|
|
|
171
184
|
|
|
172
185
|
// ProcessBundle builds a new session from a PreKeyBundle retrieved
|
|
173
186
|
// from a server.
|
|
174
|
-
func (b *Builder) ProcessBundle(preKey *prekey.Bundle) error {
|
|
187
|
+
func (b *Builder) ProcessBundle(ctx context.Context, preKey *prekey.Bundle) error {
|
|
175
188
|
// Check to see if the keys are trusted.
|
|
176
|
-
|
|
189
|
+
trusted, err := b.identityKeyStore.IsTrustedIdentity(ctx, b.remoteAddress, preKey.IdentityKey())
|
|
190
|
+
if err != nil {
|
|
191
|
+
return err
|
|
192
|
+
}
|
|
193
|
+
if !trusted {
|
|
177
194
|
return signalerror.ErrUntrustedIdentity
|
|
178
195
|
}
|
|
179
196
|
|
|
@@ -191,7 +208,10 @@ func (b *Builder) ProcessBundle(preKey *prekey.Bundle) error {
|
|
|
191
208
|
}
|
|
192
209
|
|
|
193
210
|
// Load our session and generate keys.
|
|
194
|
-
sessionRecord := b.sessionStore.LoadSession(b.remoteAddress)
|
|
211
|
+
sessionRecord, err := b.sessionStore.LoadSession(ctx, b.remoteAddress)
|
|
212
|
+
if err != nil {
|
|
213
|
+
return err
|
|
214
|
+
}
|
|
195
215
|
if sessionRecord == nil {
|
|
196
216
|
return fmt.Errorf("LoadSession returned nil")
|
|
197
217
|
}
|
|
@@ -254,7 +274,7 @@ func (b *Builder) ProcessBundle(preKey *prekey.Bundle) error {
|
|
|
254
274
|
|
|
255
275
|
// Set the local registration ID based on the registration id in our identity key store.
|
|
256
276
|
sessionState.SetLocalRegistrationID(
|
|
257
|
-
b.identityKeyStore.
|
|
277
|
+
b.identityKeyStore.GetLocalRegistrationID(),
|
|
258
278
|
)
|
|
259
279
|
|
|
260
280
|
// Set the remote registration ID based on the given prekey bundle registrationID.
|
|
@@ -268,8 +288,12 @@ func (b *Builder) ProcessBundle(preKey *prekey.Bundle) error {
|
|
|
268
288
|
)
|
|
269
289
|
|
|
270
290
|
// Store the session in our session store and save the identity in our identity store.
|
|
271
|
-
b.sessionStore.StoreSession(b.remoteAddress, sessionRecord)
|
|
272
|
-
|
|
291
|
+
if err := b.sessionStore.StoreSession(ctx, b.remoteAddress, sessionRecord); err != nil {
|
|
292
|
+
return err
|
|
293
|
+
}
|
|
294
|
+
if err := b.identityKeyStore.SaveIdentity(ctx, b.remoteAddress, preKey.IdentityKey()); err != nil {
|
|
295
|
+
return err
|
|
296
|
+
}
|
|
273
297
|
|
|
274
298
|
return nil
|
|
275
299
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package session
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"context"
|
|
4
5
|
"fmt"
|
|
5
6
|
|
|
6
7
|
"go.mau.fi/libsignal/cipher"
|
|
@@ -65,8 +66,11 @@ type Cipher struct {
|
|
|
65
66
|
|
|
66
67
|
// Encrypt will take the given message in bytes and return an object that follows
|
|
67
68
|
// the CiphertextMessage interface.
|
|
68
|
-
func (d *Cipher) Encrypt(plaintext []byte) (protocol.CiphertextMessage, error) {
|
|
69
|
-
sessionRecord := d.sessionStore.LoadSession(d.remoteAddress)
|
|
69
|
+
func (d *Cipher) Encrypt(ctx context.Context, plaintext []byte) (protocol.CiphertextMessage, error) {
|
|
70
|
+
sessionRecord, err := d.sessionStore.LoadSession(ctx, d.remoteAddress)
|
|
71
|
+
if err != nil {
|
|
72
|
+
return nil, err
|
|
73
|
+
}
|
|
70
74
|
if sessionRecord == nil {
|
|
71
75
|
return nil, fmt.Errorf("LoadSession returned nil")
|
|
72
76
|
}
|
|
@@ -125,79 +129,109 @@ func (d *Cipher) Encrypt(plaintext []byte) (protocol.CiphertextMessage, error) {
|
|
|
125
129
|
}
|
|
126
130
|
|
|
127
131
|
sessionState.SetSenderChainKey(chainKey.NextKey())
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
trusted, err := d.identityKeyStore.IsTrustedIdentity(ctx, d.remoteAddress, sessionState.RemoteIdentityKey())
|
|
133
|
+
if err != nil {
|
|
134
|
+
return nil, err
|
|
135
|
+
}
|
|
136
|
+
if !trusted {
|
|
137
|
+
return nil, signalerror.ErrUntrustedIdentity
|
|
138
|
+
}
|
|
139
|
+
if err := d.identityKeyStore.SaveIdentity(ctx, d.remoteAddress, sessionState.RemoteIdentityKey()); err != nil {
|
|
140
|
+
return nil, err
|
|
141
|
+
}
|
|
142
|
+
if err := d.sessionStore.StoreSession(ctx, d.remoteAddress, sessionRecord); err != nil {
|
|
143
|
+
return nil, err
|
|
130
144
|
}
|
|
131
|
-
d.identityKeyStore.SaveIdentity(d.remoteAddress, sessionState.RemoteIdentityKey())
|
|
132
|
-
d.sessionStore.StoreSession(d.remoteAddress, sessionRecord)
|
|
133
145
|
return ciphertextMessage, nil
|
|
134
146
|
}
|
|
135
147
|
|
|
136
148
|
// Decrypt decrypts the given message using an existing session that
|
|
137
149
|
// is stored in the session store.
|
|
138
|
-
func (d *Cipher) Decrypt(ciphertextMessage *protocol.SignalMessage) ([]byte, error) {
|
|
139
|
-
plaintext, _, err := d.DecryptAndGetKey(ciphertextMessage)
|
|
150
|
+
func (d *Cipher) Decrypt(ctx context.Context, ciphertextMessage *protocol.SignalMessage) ([]byte, error) {
|
|
151
|
+
plaintext, _, err := d.DecryptAndGetKey(ctx, ciphertextMessage)
|
|
140
152
|
|
|
141
153
|
return plaintext, err
|
|
142
154
|
}
|
|
143
155
|
|
|
144
156
|
// DecryptAndGetKey decrypts the given message using an existing session that
|
|
145
157
|
// is stored in the session store and returns the message keys used for encryption.
|
|
146
|
-
func (d *Cipher) DecryptAndGetKey(ciphertextMessage *protocol.SignalMessage) ([]byte, *message.Keys, error) {
|
|
147
|
-
|
|
158
|
+
func (d *Cipher) DecryptAndGetKey(ctx context.Context, ciphertextMessage *protocol.SignalMessage) ([]byte, *message.Keys, error) {
|
|
159
|
+
contains, err := d.sessionStore.ContainsSession(ctx, d.remoteAddress)
|
|
160
|
+
if err != nil {
|
|
161
|
+
return nil, nil, err
|
|
162
|
+
}
|
|
163
|
+
if !contains {
|
|
148
164
|
return nil, nil, fmt.Errorf("%w %s", signalerror.ErrNoSessionForUser, d.remoteAddress.String())
|
|
149
165
|
}
|
|
150
166
|
|
|
151
167
|
// Load the session record from our session store and decrypt the message.
|
|
152
|
-
sessionRecord := d.sessionStore.LoadSession(d.remoteAddress)
|
|
168
|
+
sessionRecord, err := d.sessionStore.LoadSession(ctx, d.remoteAddress)
|
|
169
|
+
if err != nil {
|
|
170
|
+
return nil, nil, err
|
|
171
|
+
}
|
|
153
172
|
if sessionRecord == nil {
|
|
154
173
|
return nil, nil, fmt.Errorf("LoadSession returned nil")
|
|
155
174
|
}
|
|
156
|
-
plaintext, messageKeys, err := d.DecryptWithRecord(sessionRecord, ciphertextMessage)
|
|
175
|
+
plaintext, messageKeys, err := d.DecryptWithRecord(ctx, sessionRecord, ciphertextMessage)
|
|
157
176
|
if err != nil {
|
|
158
177
|
return nil, nil, err
|
|
159
178
|
}
|
|
160
179
|
|
|
161
|
-
|
|
162
|
-
|
|
180
|
+
trusted, err := d.identityKeyStore.IsTrustedIdentity(ctx, d.remoteAddress, sessionRecord.SessionState().RemoteIdentityKey())
|
|
181
|
+
if err != nil {
|
|
182
|
+
return nil, nil, err
|
|
183
|
+
}
|
|
184
|
+
if !trusted {
|
|
185
|
+
return nil, nil, signalerror.ErrUntrustedIdentity
|
|
186
|
+
}
|
|
187
|
+
if err := d.identityKeyStore.SaveIdentity(ctx, d.remoteAddress, sessionRecord.SessionState().RemoteIdentityKey()); err != nil {
|
|
188
|
+
return nil, nil, err
|
|
163
189
|
}
|
|
164
|
-
d.identityKeyStore.SaveIdentity(d.remoteAddress, sessionRecord.SessionState().RemoteIdentityKey())
|
|
165
190
|
|
|
166
191
|
// Store the session record in our session store.
|
|
167
|
-
d.sessionStore.StoreSession(d.remoteAddress, sessionRecord)
|
|
192
|
+
if err := d.sessionStore.StoreSession(ctx, d.remoteAddress, sessionRecord); err != nil {
|
|
193
|
+
return nil, nil, err
|
|
194
|
+
}
|
|
168
195
|
return plaintext, messageKeys, nil
|
|
169
196
|
}
|
|
170
197
|
|
|
171
|
-
func (d *Cipher) DecryptMessage(ciphertextMessage *protocol.PreKeySignalMessage) ([]byte, error) {
|
|
172
|
-
plaintext, _, err := d.DecryptMessageReturnKey(ciphertextMessage)
|
|
198
|
+
func (d *Cipher) DecryptMessage(ctx context.Context, ciphertextMessage *protocol.PreKeySignalMessage) ([]byte, error) {
|
|
199
|
+
plaintext, _, err := d.DecryptMessageReturnKey(ctx, ciphertextMessage)
|
|
173
200
|
return plaintext, err
|
|
174
201
|
}
|
|
175
202
|
|
|
176
|
-
func (d *Cipher) DecryptMessageReturnKey(ciphertextMessage *protocol.PreKeySignalMessage) ([]byte, *message.Keys, error) {
|
|
203
|
+
func (d *Cipher) DecryptMessageReturnKey(ctx context.Context, ciphertextMessage *protocol.PreKeySignalMessage) ([]byte, *message.Keys, error) {
|
|
177
204
|
// Load or create session record for this session.
|
|
178
|
-
sessionRecord := d.sessionStore.LoadSession(d.remoteAddress)
|
|
205
|
+
sessionRecord, err := d.sessionStore.LoadSession(ctx, d.remoteAddress)
|
|
206
|
+
if err != nil {
|
|
207
|
+
return nil, nil, err
|
|
208
|
+
}
|
|
179
209
|
if sessionRecord == nil {
|
|
180
210
|
return nil, nil, fmt.Errorf("LoadSession returned nil")
|
|
181
211
|
}
|
|
182
|
-
unsignedPreKeyID, err := d.builder.Process(sessionRecord, ciphertextMessage)
|
|
212
|
+
unsignedPreKeyID, err := d.builder.Process(ctx, sessionRecord, ciphertextMessage)
|
|
183
213
|
if err != nil {
|
|
184
214
|
return nil, nil, err
|
|
185
215
|
}
|
|
186
|
-
plaintext, keys, err := d.DecryptWithRecord(sessionRecord, ciphertextMessage.WhisperMessage())
|
|
216
|
+
plaintext, keys, err := d.DecryptWithRecord(ctx, sessionRecord, ciphertextMessage.WhisperMessage())
|
|
187
217
|
if err != nil {
|
|
188
218
|
return nil, nil, err
|
|
189
219
|
}
|
|
190
220
|
// Store the session record in our session store.
|
|
191
|
-
d.sessionStore.StoreSession(d.remoteAddress, sessionRecord)
|
|
221
|
+
if err := d.sessionStore.StoreSession(ctx, d.remoteAddress, sessionRecord); err != nil {
|
|
222
|
+
return nil, nil, err
|
|
223
|
+
}
|
|
192
224
|
if !unsignedPreKeyID.IsEmpty {
|
|
193
|
-
d.preKeyStore.RemovePreKey(unsignedPreKeyID.Value)
|
|
225
|
+
if err := d.preKeyStore.RemovePreKey(ctx, unsignedPreKeyID.Value); err != nil {
|
|
226
|
+
return nil, nil, err
|
|
227
|
+
}
|
|
194
228
|
}
|
|
195
229
|
return plaintext, keys, nil
|
|
196
230
|
}
|
|
197
231
|
|
|
198
232
|
// DecryptWithKey will decrypt the given message using the given symmetric key. This
|
|
199
233
|
// can be used when decrypting messages at a later time if the message key was saved.
|
|
200
|
-
func (d *Cipher) DecryptWithKey(ciphertextMessage *protocol.SignalMessage, key *message.Keys) ([]byte, error) {
|
|
234
|
+
func (d *Cipher) DecryptWithKey(ctx context.Context, ciphertextMessage *protocol.SignalMessage, key *message.Keys) ([]byte, error) {
|
|
201
235
|
logger.Debug("Decrypting ciphertext body: ", ciphertextMessage.Body())
|
|
202
236
|
plaintext, err := decrypt(key, ciphertextMessage.Body())
|
|
203
237
|
if err != nil {
|
|
@@ -209,13 +243,13 @@ func (d *Cipher) DecryptWithKey(ciphertextMessage *protocol.SignalMessage, key *
|
|
|
209
243
|
}
|
|
210
244
|
|
|
211
245
|
// DecryptWithRecord decrypts the given message using the given session record.
|
|
212
|
-
func (d *Cipher) DecryptWithRecord(sessionRecord *record.Session, ciphertext *protocol.SignalMessage) ([]byte, *message.Keys, error) {
|
|
246
|
+
func (d *Cipher) DecryptWithRecord(ctx context.Context, sessionRecord *record.Session, ciphertext *protocol.SignalMessage) ([]byte, *message.Keys, error) {
|
|
213
247
|
logger.Debug("Decrypting ciphertext with record: ", sessionRecord)
|
|
214
248
|
previousStates := sessionRecord.PreviousSessionStates()
|
|
215
249
|
sessionState := sessionRecord.SessionState()
|
|
216
250
|
|
|
217
251
|
// Try and decrypt the message with the current session state.
|
|
218
|
-
plaintext, messageKeys, err := d.DecryptWithState(sessionState, ciphertext)
|
|
252
|
+
plaintext, messageKeys, err := d.DecryptWithState(ctx, sessionState, ciphertext)
|
|
219
253
|
|
|
220
254
|
// If we received an error using the current session state, loop
|
|
221
255
|
// through all previous states.
|
|
@@ -223,7 +257,7 @@ func (d *Cipher) DecryptWithRecord(sessionRecord *record.Session, ciphertext *pr
|
|
|
223
257
|
logger.Warning(err)
|
|
224
258
|
for i, state := range previousStates {
|
|
225
259
|
// Try decrypting the message with previous states
|
|
226
|
-
plaintext, messageKeys, err = d.DecryptWithState(state, ciphertext)
|
|
260
|
+
plaintext, messageKeys, err = d.DecryptWithState(ctx, state, ciphertext)
|
|
227
261
|
if err != nil {
|
|
228
262
|
continue
|
|
229
263
|
}
|
|
@@ -245,7 +279,7 @@ func (d *Cipher) DecryptWithRecord(sessionRecord *record.Session, ciphertext *pr
|
|
|
245
279
|
}
|
|
246
280
|
|
|
247
281
|
// DecryptWithState decrypts the given message with the given session state.
|
|
248
|
-
func (d *Cipher) DecryptWithState(sessionState *record.State, ciphertextMessage *protocol.SignalMessage) ([]byte, *message.Keys, error) {
|
|
282
|
+
func (d *Cipher) DecryptWithState(ctx context.Context, sessionState *record.State, ciphertextMessage *protocol.SignalMessage) ([]byte, *message.Keys, error) {
|
|
249
283
|
logger.Debug("Decrypting ciphertext with session state: ", sessionState)
|
|
250
284
|
if !sessionState.HasSenderChain() {
|
|
251
285
|
logger.Error("Unable to decrypt message with state: ", signalerror.ErrUninitializedSession)
|
|
@@ -278,7 +312,7 @@ func (d *Cipher) DecryptWithState(sessionState *record.State, ciphertextMessage
|
|
|
278
312
|
return nil, nil, fmt.Errorf("failed to verify ciphertext MAC: %w", err)
|
|
279
313
|
}
|
|
280
314
|
|
|
281
|
-
plaintext, err := d.DecryptWithKey(ciphertextMessage, messageKeys)
|
|
315
|
+
plaintext, err := d.DecryptWithKey(ctx, ciphertextMessage, messageKeys)
|
|
282
316
|
if err != nil {
|
|
283
317
|
return nil, nil, err
|
|
284
318
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
package store
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"context"
|
|
5
|
+
|
|
4
6
|
"go.mau.fi/libsignal/keys/identity"
|
|
5
7
|
"go.mau.fi/libsignal/protocol"
|
|
6
8
|
)
|
|
@@ -14,10 +16,10 @@ type IdentityKey interface {
|
|
|
14
16
|
//
|
|
15
17
|
// Clients should maintain a registration ID, a random number between 1 and 16380
|
|
16
18
|
// that's generated once at install time.
|
|
17
|
-
|
|
19
|
+
GetLocalRegistrationID() uint32
|
|
18
20
|
|
|
19
21
|
// Save a remote client's identity key in our identity store.
|
|
20
|
-
SaveIdentity(address *protocol.SignalAddress, identityKey *identity.Key)
|
|
22
|
+
SaveIdentity(ctx context.Context, address *protocol.SignalAddress, identityKey *identity.Key) error
|
|
21
23
|
|
|
22
24
|
// Verify a remote client's identity key.
|
|
23
25
|
//
|
|
@@ -25,5 +27,5 @@ type IdentityKey interface {
|
|
|
25
27
|
// 'trust on first use'. This means that an identity key is considered 'trusted'
|
|
26
28
|
// if there is no entry for the recipient in the local store, or if it matches the
|
|
27
29
|
// saved key for a recipient in the local store.
|
|
28
|
-
IsTrustedIdentity(address *protocol.SignalAddress, identityKey *identity.Key) bool
|
|
30
|
+
IsTrustedIdentity(ctx context.Context, address *protocol.SignalAddress, identityKey *identity.Key) (bool, error)
|
|
29
31
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
package store
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"context"
|
|
5
|
+
|
|
4
6
|
"go.mau.fi/libsignal/keys/message"
|
|
5
7
|
)
|
|
6
8
|
|
|
@@ -8,14 +10,14 @@ import (
|
|
|
8
10
|
// of message keys.
|
|
9
11
|
type MessageKey interface {
|
|
10
12
|
// Load a local message key by id
|
|
11
|
-
LoadMessageKey(keyID uint32) *message.Keys
|
|
13
|
+
LoadMessageKey(ctx context.Context, keyID uint32) (*message.Keys, error)
|
|
12
14
|
|
|
13
15
|
// Store a local message key
|
|
14
|
-
StoreMessageKey(keyID uint32, key *message.Keys)
|
|
16
|
+
StoreMessageKey(ctx context.Context, keyID uint32, key *message.Keys) error
|
|
15
17
|
|
|
16
18
|
// Check to see if the store contains a message key with id.
|
|
17
|
-
ContainsMessageKey(keyID uint32) bool
|
|
19
|
+
ContainsMessageKey(ctx context.Context, keyID uint32) (bool, error)
|
|
18
20
|
|
|
19
21
|
// Delete a message key from local storage.
|
|
20
|
-
RemoveMessageKey(keyID uint32)
|
|
22
|
+
RemoveMessageKey(ctx context.Context, keyID uint32) error
|
|
21
23
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
package store
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"context"
|
|
5
|
+
|
|
4
6
|
"go.mau.fi/libsignal/state/record"
|
|
5
7
|
)
|
|
6
8
|
|
|
@@ -8,14 +10,14 @@ import (
|
|
|
8
10
|
// of PreKeyRecords
|
|
9
11
|
type PreKey interface {
|
|
10
12
|
// Load a local PreKeyRecord
|
|
11
|
-
LoadPreKey(preKeyID uint32) *record.PreKey
|
|
13
|
+
LoadPreKey(ctx context.Context, preKeyID uint32) (*record.PreKey, error)
|
|
12
14
|
|
|
13
15
|
// Store a local PreKeyRecord
|
|
14
|
-
StorePreKey(preKeyID uint32, preKeyRecord *record.PreKey)
|
|
16
|
+
StorePreKey(ctx context.Context, preKeyID uint32, preKeyRecord *record.PreKey) error
|
|
15
17
|
|
|
16
18
|
// Check to see if the store contains a PreKeyRecord
|
|
17
|
-
ContainsPreKey(preKeyID uint32) bool
|
|
19
|
+
ContainsPreKey(ctx context.Context, preKeyID uint32) (bool, error)
|
|
18
20
|
|
|
19
21
|
// Delete a PreKeyRecord from local storage.
|
|
20
|
-
RemovePreKey(preKeyID uint32)
|
|
22
|
+
RemovePreKey(ctx context.Context, preKeyID uint32) error
|
|
21
23
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
package store
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"context"
|
|
5
|
+
|
|
4
6
|
"go.mau.fi/libsignal/protocol"
|
|
5
7
|
"go.mau.fi/libsignal/state/record"
|
|
6
8
|
)
|
|
@@ -8,10 +10,10 @@ import (
|
|
|
8
10
|
// Session store is an interface for the persistent storage of session
|
|
9
11
|
// state information for remote clients.
|
|
10
12
|
type Session interface {
|
|
11
|
-
LoadSession(address *protocol.SignalAddress) *record.Session
|
|
12
|
-
GetSubDeviceSessions(name string) []uint32
|
|
13
|
-
StoreSession(remoteAddress *protocol.SignalAddress, record *record.Session)
|
|
14
|
-
ContainsSession(remoteAddress *protocol.SignalAddress) bool
|
|
15
|
-
DeleteSession(remoteAddress *protocol.SignalAddress)
|
|
16
|
-
DeleteAllSessions()
|
|
13
|
+
LoadSession(ctx context.Context, address *protocol.SignalAddress) (*record.Session, error)
|
|
14
|
+
GetSubDeviceSessions(ctx context.Context, name string) ([]uint32, error)
|
|
15
|
+
StoreSession(ctx context.Context, remoteAddress *protocol.SignalAddress, record *record.Session) error
|
|
16
|
+
ContainsSession(ctx context.Context, remoteAddress *protocol.SignalAddress) (bool, error)
|
|
17
|
+
DeleteSession(ctx context.Context, remoteAddress *protocol.SignalAddress) error
|
|
18
|
+
DeleteAllSessions(ctx context.Context) error
|
|
17
19
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
package store
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"context"
|
|
5
|
+
|
|
4
6
|
"go.mau.fi/libsignal/state/record"
|
|
5
7
|
)
|
|
6
8
|
|
|
@@ -8,17 +10,17 @@ import (
|
|
|
8
10
|
// store signed PreKeys.
|
|
9
11
|
type SignedPreKey interface {
|
|
10
12
|
// LoadSignedPreKey loads a local SignedPreKeyRecord
|
|
11
|
-
LoadSignedPreKey(signedPreKeyID uint32) *record.SignedPreKey
|
|
13
|
+
LoadSignedPreKey(ctx context.Context, signedPreKeyID uint32) (*record.SignedPreKey, error)
|
|
12
14
|
|
|
13
15
|
// LoadSignedPreKeys loads all local SignedPreKeyRecords
|
|
14
|
-
LoadSignedPreKeys() []*record.SignedPreKey
|
|
16
|
+
LoadSignedPreKeys(ctx context.Context) ([]*record.SignedPreKey, error)
|
|
15
17
|
|
|
16
18
|
// Store a local SignedPreKeyRecord
|
|
17
|
-
StoreSignedPreKey(signedPreKeyID uint32, record *record.SignedPreKey)
|
|
19
|
+
StoreSignedPreKey(ctx context.Context, signedPreKeyID uint32, record *record.SignedPreKey) error
|
|
18
20
|
|
|
19
21
|
// Check to see if store contains the given record
|
|
20
|
-
ContainsSignedPreKey(signedPreKeyID uint32) bool
|
|
22
|
+
ContainsSignedPreKey(ctx context.Context, signedPreKeyID uint32) (bool, error)
|
|
21
23
|
|
|
22
24
|
// Delete a SignedPreKeyRecord from local storage
|
|
23
|
-
RemoveSignedPreKey(signedPreKeyID uint32)
|
|
25
|
+
RemoveSignedPreKey(ctx context.Context, signedPreKeyID uint32) error
|
|
24
26
|
}
|