Motivation:
When using only the CryptoKit API on Apple platforms we have always
thunked through to the CryptoKit interface and implementation. However,
we didn't do a thorough job of preventing the BoringSSL target from
getting compiled and linked.
We can do a better job now, which will save compile times and binary
sizes in many cases.
Modifications:
- Change Package.swift to express a target specific dependency in most
cases.
- Preserve a development mode which overrides that target specific
dependency.
- Add the missing compile guards.
Results:
Smaller binaries and faster compiles on Apple platforms.
Motivation:
CryptoKit supports the compressed key format: we should as well.
Modifications:
Extend the constructors of public keys to tolerate the compressed
representation.
Result:
Users holding compressed keys can use them.
Motivation:
The various Apple SoS projects are currently dropping Swift 5.1 support.
Swift Crypto should do the same. While we're here, let's add CI for 5.4,
5.5 nightlies, and main nightlies.
Modifications:
- Remove 5.1 dockerfile.
- Stop claiming we support 5.1.
- Add 5.4, 5.5, and main dockerfiles.
- Updated Swift Format to 5.2.
- Associated formatting changes.
Result:
Better test matrix and support matrix.
When building swift-crypto from source for a toolchain build, it is
convenient to build it without building up a toolchain image. This
additional knob allows for building swift-crypto with the build
artifacts of previous builds, allowing building up a toolchain image
while chaining multiple builds together.
Co-authored-by: tomer doron <tomer@apple.com>
Resolves [issue#51](https://github.com/apple/swift-crypto/issues/51).
In Swift 5.3, a warning is viewed on Linux because `memset_s` implemented in this module returns `Void`.
This commit let the function return the same type with Darwin.
Motivation:
At WWDC 2020 Apple updated the CryptoKit APIs. This PR brings those new
APIs to Swift Crypto. This brings Swift Crypto up-to-date with the
latest CryptoKit API support, including PEM/DER key support and HKDF API
extensions.
Modifications:
- Bring forward the CryptoKit API files
- Update to have API match the WWDC seed.
Result:
Users will have access to the seed APIs.
Motiviation:
One `let` was hiding as a `var` and a few `#file` parameters have been
forwarded to (now) `#filePath` ones.
Modification:
- make the `var` a `let`
- silence the `#file`/`#filePath` warning by adding `(#file)` because we
can't forward them properly right now
(https://bugs.swift.org/browse/SR-12934). That's okay because even on
the Swift master branch, `#file` == `#filePath`.
Result:
No warnings in newer Swift compilers.
* 1) Adding gyb to scripts
2) Adding warning in gyb files about gyb overwritting manual edits to gyb generated swift files
3) Updated README with gyb instructions
4) Adding script for running all gyb generation
5) Adding CI check for discrepancies in gyb generated files
* Updating Dockerfile