Commit Graph

26 Commits

Author SHA1 Message Date
Max Radermacher
90769ea381
Swiftify OWSDeviceProvisioner 2023-02-13 12:12:16 -08:00
Evan Hahn
370ff654e7
Change license to AGPL
Change license to AGPL

This commit:

- Updates the `LICENSE` file

- Start every file with something like:

      // Copyright YEAR_FIRST_PUBLISHED Signal Messenger, LLC
      // SPDX-License-Identifier: AGPL-3.0-only

---

First, I removed existing license headers with this Ruby 3.1.2 script:

    require 'set'

    EXTENSIONS_TO_CHECK = Set['.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift']

    same = 0
    different = 0

    all_files = `git ls-files`.lines.map { |line| line.strip }
    all_files.each do |relative_path|
      if relative_path == 'Pods'
        next
      end

      unless EXTENSIONS_TO_CHECK.include? File.extname(relative_path)
        next
      end

      path = File.expand_path(relative_path)

      contents = File.read(path)
      new_contents = contents.sub(/\/\/\n\/\/  Copyright .*\n\/\/\n\n/, '')

      if contents == new_contents
        same += 1
      else
        different += 1
      end

      File.write(path, new_contents)
    end

    puts "updated #{different} file(s), left #{same} untouched"

I'm sure this script could be improved, but it worked well enough.

Then, I created `Scripts/lint/lint-license-headers` and ran it to auto-
fix a lot of files. This changed the mode of some files, but I think
that's actually desirable. For example,
`SignalServiceKit/src/Util/AppContext.m` previously had a mode of
`0755/-rwxr-xr-x`, and it's now `0644/-rw-r--r--`.

Then I fixed some stragglers and updated the precommit script.

See [a similar change in the Desktop app][0].

[0]: 8bfaf598af
2022-10-13 08:25:37 -05:00
Evan Hahn
f997e5c7a4 Remove some tests that were never run
I added these tests in da322d3bf9, but we
decided that they're not worth it.

Also, it seems I forgot to add them to the project! So they were never
run anyway, outside of the times I ran them while developing.
2022-08-25 11:14:43 -05:00
Evan Hahn
da322d3bf9 Add "urgent" boolean to outgoing messages
To improve message reliability, we're adding an urgency flag to outgoing
messages. For example, outgoing calls are urgent, but delivery receipts
are not. [Android][] and [Desktop][] have already done this work.

At a high level, I added an `isUrgent` property to `TSOutgoingMessage`s.
It defaults to `true`. Some subclasses, like
`OWSReceiptsForSenderMessage`, override it to return `false`.

Builds off of a few other commits (not necessary to understand this
commit, but might be useful for posterity):

- e858a0d916
- 8c6d2ebe8c
- 402b117221
- 2ba0cd764d
- 266a4663e9
- 8e5009bbf7

[Android]: dc04c8ed98
[Desktop]: 06190b1434
2022-08-18 07:35:41 -05:00
Nora Trapp
05313c3725 Update to LibSignalClient v0.15.0 2022-03-24 11:55:45 -07:00
Jordan Rose
1c252fd6f6 Add PNI-related fields to the ProvisioningMessage proto
This allows linked devices to receive the PNI identity key as part of
provisioning.
2022-03-18 13:03:55 -07:00
Jordan Rose
0d302834c8 SSK: Port OWSDeviceProvisioner (and OWSProvisioningMessage) to Swift
While here, clean up some overzealous uses of 'try!' in
OWSProvisioningCipher---this data comes from another device and
therefore can't be trusted.
2022-03-17 12:25:39 -07:00
Matthew Chen
fcdca12cf5 Deprecate REST, Part 1
* Port socket manager to Swift.
* Clean up HTTP request success/failure state & errors.
* Rework network manager.
* Rework HTTP errors.
* Rework errors "properties": isRetryable, etc.
* Fix test breakage.
2021-08-18 14:25:36 -03:00
Matthew Chen
718120f725 Fix test imports. 2021-06-07 11:41:43 -04:00
Matthew Chen
37052a302a Fix build warnings around imports. 2021-06-07 11:11:30 -04:00
Jordan Rose
afcfff317f SSK: Convert OWSProvisioningCipher to Swift for SignalClient HKDF 2021-01-28 12:03:49 -08:00
Nora Trapp
57a810658a Goodbye iOS 10 2020-05-27 17:34:32 -07:00
Matthew Chen
7246c613d5 Fix more build warnings. 2020-04-10 13:17:08 -03:00
Matthew Chen
d4e544003c Fix OWSDeviceProvisionerTest. 2019-08-16 11:06:01 -03:00
Michael Kirk
a44f74a7bf fixup tests 2019-06-20 17:44:15 -06:00
Michael Kirk
373c3b0d61 method for testing only exists in iOS10+ 2019-05-22 16:03:07 -04:00
Matthew Chen
c6ef7f18e7 Improve test logging. 2018-10-16 13:01:24 -04:00
Matthew Chen
7fd15d2fd9 Add server certificate methods to UD manager. 2018-10-02 13:24:00 -04:00
Matthew Chen
3738155c81 Fix build breakage from SMK. 2018-10-01 09:08:02 -04:00
Matthew Chen
25239ca608 Respond to CR. 2018-09-10 17:43:17 -05:00
Matthew Chen
3935b019f4 Add base class for tests. 2018-09-10 17:30:18 -05:00
Michael Kirk
495830f08d Fixup some SSK tests
Still more to do...
2018-08-31 11:03:27 -06:00
Michael Kirk
6d92413931 WIP: Run SSK tests
This just configures them to run. They're very broken at the moment.
2018-08-31 12:35:32 -04:00
Michael Kirk
ce2a4422e3 fix desktop linking for some users
// FREEBIE
2017-09-25 17:00:50 -04:00
Michael Kirk
1f7b6f61c6 Regression test for provisioning cipher
// FREEBIE
2017-08-30 09:47:29 -04:00
Michael Kirk
ccb4a88742 Import SSK (and history) into Signal-iOS
git remote add ssk ../SignalServiceKit
git remote update
git merge -s ours --allow-unrelated-histories --no-commit ssk/master
git read-tree --prefix=SignalServiceKit -u ssk/master
git commit
2017-07-21 13:55:01 -04:00