diff --git a/ACKNOWLEDGMENTS.md b/ACKNOWLEDGMENTS.md index 39114812ae..507bde5506 100644 --- a/ACKNOWLEDGMENTS.md +++ b/ACKNOWLEDGMENTS.md @@ -6404,7 +6404,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ``` -## libcrux-intrinsics 0.0.2, libcrux-ml-kem 0.0.2-alpha.3, libcrux-platform 0.0.2, libcrux-sha3 0.0.2 +## libcrux-intrinsics 0.0.2, libcrux-ml-kem 0.0.2, libcrux-platform 0.0.2, libcrux-sha3 0.0.2 ``` Apache License @@ -7312,133 +7312,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ``` -## dunce 1.0.5 - -``` -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. - -``` - ## boring-sys 4.15.0 ``` @@ -7779,7 +7652,7 @@ DEALINGS IN THE SOFTWARE. ``` -## backtrace 0.3.74, cc 1.2.18, cfg-if 1.0.0, cmake 0.1.48, jobserver 0.1.33, openssl-probe 0.1.6, pkg-config 0.3.32, rustc-demangle 0.1.24, scoped-tls 1.0.1, socket2 0.5.9 +## backtrace 0.3.74, cc 1.2.18, cfg-if 1.0.0, cmake 0.1.48, openssl-probe 0.1.6, pkg-config 0.3.32, rustc-demangle 0.1.24, scoped-tls 1.0.1, socket2 0.5.9 ``` Copyright (c) 2014 Alex Crichton @@ -10987,7 +10860,7 @@ SOFTWARE. ``` -## anstream 0.6.18, anstyle-query 1.1.2, clap 4.5.35, colorchoice 1.0.3, env_filter 0.1.3, env_logger 0.11.8, is_terminal_polyfill 1.70.1, toml_datetime 0.6.8, toml_edit 0.22.24 +## anstream 0.6.18, anstyle-query 1.1.2, clap 4.5.35, colorchoice 1.0.3, env_filter 0.1.3, env_logger 0.11.8, is_terminal_polyfill 1.70.1 ``` Copyright (c) Individual contributors @@ -11124,7 +10997,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ``` -## rand 0.8.5, rand_chacha 0.3.1, rand_core 0.6.4 +## rand 0.8.5, rand 0.9.0, rand_chacha 0.3.1, rand_chacha 0.9.0, rand_core 0.6.4, rand_core 0.9.3 ``` Copyright 2018 Developers of the Rand project @@ -11826,7 +11699,7 @@ SOFTWARE. ``` -## cesu8 1.1.0, pqcrypto-internals 0.2.10, pqcrypto-kyber 0.7.9, pqcrypto-kyber 0.8.1, pqcrypto-traits 0.3.5 +## cesu8 1.1.0 ``` MIT License @@ -11960,7 +11833,7 @@ SOFTWARE. ``` -## curve25519-dalek-derive 0.1.1, adler2 2.0.0, anyhow 1.0.97, async-trait 0.1.88, atomic-waker 1.1.2, auto_enums 0.8.7, derive_utils 0.15.0, displaydoc 0.2.5, dyn-clone 1.0.19, fastrand 2.3.0, home 0.5.9, itoa 1.0.15, linkme-impl 0.3.32, linkme 0.3.32, linux-raw-sys 0.4.15, linux-raw-sys 0.9.3, minimal-lexical 0.2.1, num_enum 0.7.3, num_enum_derive 0.7.3, once_cell 1.21.3, paste 1.0.15, pin-project-internal 1.1.10, pin-project-lite 0.2.16, pin-project 1.1.10, prettyplease 0.2.32, proc-macro-crate 3.3.0, proc-macro2 1.0.94, quote 1.0.40, rustc-hash 1.1.0, rustix 0.38.44, rustix 1.0.5, rustversion 1.0.20, semver 1.0.26, send_wrapper 0.6.0, serde 1.0.219, serde_derive 1.0.219, serde_json 1.0.140, syn-mid 0.6.0, syn 2.0.100, thiserror-impl 1.0.69, thiserror-impl 2.0.12, thiserror 1.0.69, thiserror 2.0.12, unicode-ident 1.0.18, utf-8 0.7.6 +## curve25519-dalek-derive 0.1.1, adler2 2.0.0, anyhow 1.0.97, async-trait 0.1.88, atomic-waker 1.1.2, auto_enums 0.8.7, derive_utils 0.15.0, displaydoc 0.2.5, dyn-clone 1.0.19, fastrand 2.3.0, home 0.5.9, itoa 1.0.15, linkme-impl 0.3.32, linkme 0.3.32, linux-raw-sys 0.4.15, linux-raw-sys 0.9.3, minimal-lexical 0.2.1, once_cell 1.21.3, paste 1.0.15, pin-project-internal 1.1.10, pin-project-lite 0.2.16, pin-project 1.1.10, prettyplease 0.2.32, proc-macro2 1.0.94, quote 1.0.40, rustc-hash 1.1.0, rustix 0.38.44, rustix 1.0.5, rustversion 1.0.20, semver 1.0.26, send_wrapper 0.6.0, serde 1.0.219, serde_derive 1.0.219, serde_json 1.0.140, syn-mid 0.6.0, syn 2.0.100, thiserror-impl 1.0.69, thiserror-impl 2.0.12, thiserror 1.0.69, thiserror 2.0.12, unicode-ident 1.0.18, utf-8 0.7.6 ``` Permission is hereby granted, free of charge, to any @@ -11989,30 +11862,6 @@ DEALINGS IN THE SOFTWARE. ``` -## winnow 0.7.4 - -``` -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - ## android_system_properties 0.1.5 ``` diff --git a/package.json b/package.json index c3c49739ac..279c1481f1 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "@react-aria/utils": "3.25.3", "@react-spring/web": "9.7.5", "@react-types/shared": "3.27.0", - "@signalapp/libsignal-client": "0.70.0", + "@signalapp/libsignal-client": "0.71.0", "@signalapp/quill-cjs": "2.1.2", "@signalapp/ringrtc": "2.52.0", "@signalapp/sqlcipher": "2.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1370744905..c4bff8df76 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -126,8 +126,8 @@ importers: specifier: 3.27.0 version: 3.27.0(react@18.3.1) '@signalapp/libsignal-client': - specifier: 0.70.0 - version: 0.70.0 + specifier: 0.71.0 + version: 0.71.0 '@signalapp/quill-cjs': specifier: 2.1.2 version: 2.1.2 @@ -2537,8 +2537,8 @@ packages: '@signalapp/libsignal-client@0.60.2': resolution: {integrity: sha512-tU4kNP/yCwkFntb2ahXOSQJtzdy+YifAB2yv5hw0qyKSidRHLn6bYiz4Zo2tjxLDRoBLAUxCRsQramStiqNZdA==} - '@signalapp/libsignal-client@0.70.0': - resolution: {integrity: sha512-V2b8PVQM8+HbJhX7uuq7dR7V+71p1xzcpnx091za1fiLrdvK6/wzfEmpeAh8+6VYoJEQ8Gi3DyToIT0frTFIGA==} + '@signalapp/libsignal-client@0.71.0': + resolution: {integrity: sha512-rify1IfbpW7Di8pnbB3Oylp+bCg8FsKj0DaPmUVIqzbgJybgNm6GTVmgO6SqYBw6cH36hVnb+bacL7+KPTeqaA==} '@signalapp/mock-server@11.3.0': resolution: {integrity: sha512-X/yqrDySJ51bRngjMJrIGDhOU/LQ7OI9vJFNrs0835bgdBPGQO1pyufndzKLJpPehMECzGIP0UCE9YZU1X6NIg==} @@ -12034,7 +12034,7 @@ snapshots: type-fest: 4.26.1 uuid: 8.3.2 - '@signalapp/libsignal-client@0.70.0': + '@signalapp/libsignal-client@0.71.0': dependencies: node-gyp-build: 4.8.4 type-fest: 4.26.1 diff --git a/ts/LibSignalStores.ts b/ts/LibSignalStores.ts index d8c9c2dbae..8aac535521 100644 --- a/ts/LibSignalStores.ts +++ b/ts/LibSignalStores.ts @@ -15,6 +15,7 @@ import type { SignedPreKeyRecord, Uuid, PrivateKey, + IdentityChange, } from '@signalapp/libsignal-client'; import { IdentityKeyStore, @@ -145,7 +146,10 @@ export class IdentityKeys extends IdentityKeyStore { return PublicKey.deserialize(Buffer.from(key)); } - async saveIdentity(name: ProtocolAddress, key: PublicKey): Promise { + async saveIdentity( + name: ProtocolAddress, + key: PublicKey + ): Promise { const encodedAddress = encodeAddress(name); const publicKey = key.serialize(); diff --git a/ts/SignalProtocolStore.ts b/ts/SignalProtocolStore.ts index 7b4a668f68..8340347322 100644 --- a/ts/SignalProtocolStore.ts +++ b/ts/SignalProtocolStore.ts @@ -8,6 +8,7 @@ import { EventEmitter } from 'events'; import { Direction, + IdentityChange, IdentityKeyPair, KyberPreKeyRecord, PreKeyRecord, @@ -1947,7 +1948,7 @@ export class SignalProtocolStore extends EventEmitter { publicKey: Uint8Array, nonblockingApproval = false, { zone = GLOBAL_ZONE, noOverwrite = false }: SaveIdentityOptions = {} - ): Promise { + ): Promise { if (!this.identityKeys) { throw new Error('saveIdentity: this.identityKeys not yet cached!'); } @@ -1994,11 +1995,11 @@ export class SignalProtocolStore extends EventEmitter { 'saveIdentity' ); - return false; + return IdentityChange.NewOrUnchanged; } if (noOverwrite) { - return false; + return IdentityChange.NewOrUnchanged; } const identityKeyChanged = !constantTimeEqual( @@ -2013,7 +2014,7 @@ export class SignalProtocolStore extends EventEmitter { if (isOurIdentifier && identityKeyChanged) { log.warn(`${logId}: ignoring identity for ourselves`); - return false; + return IdentityChange.NewOrUnchanged; } log.info(`${logId}: Replacing existing identity...`); @@ -2058,7 +2059,7 @@ export class SignalProtocolStore extends EventEmitter { zone, }); - return true; + return IdentityChange.ReplacedExisting; } if (this.#isNonBlockingApprovalRequired(identityRecord)) { log.info(`${logId}: Setting approval status...`); @@ -2066,10 +2067,10 @@ export class SignalProtocolStore extends EventEmitter { identityRecord.nonblockingApproval = nonblockingApproval; await this.#_saveIdentityKey(identityRecord); - return false; + return IdentityChange.NewOrUnchanged; } - return false; + return IdentityChange.NewOrUnchanged; } ); } diff --git a/ts/services/profiles.ts b/ts/services/profiles.ts index 02d5dbf5fa..05e0324b15 100644 --- a/ts/services/profiles.ts +++ b/ts/services/profiles.ts @@ -6,6 +6,7 @@ import type { ProfileKeyCredentialRequestContext, } from '@signalapp/libsignal-client/zkgroup'; import PQueue from 'p-queue'; +import { IdentityChange } from '@signalapp/libsignal-client'; import type { ReadonlyDeep } from 'type-fest'; import type { ConversationModel } from '../models/conversations'; @@ -834,12 +835,13 @@ export async function updateIdentityKey( return false; } - const changed = await window.textsecure.storage.protocol.saveIdentity( + const saveOutcome = await window.textsecure.storage.protocol.saveIdentity( new Address(serviceId, 1), identityKey, false, { noOverwrite } ); + const changed = saveOutcome === IdentityChange.ReplacedExisting; if (changed) { log.info(`updateIdentityKey(${serviceId}): changed`); // save identity will close all sessions except for .1, so we