David Nadoba
66143b83e0
Move ExpressibleByArrayLiteral conformance of _TinyArray to the declaring module ( #157 )
...
Motivation
Nightly compilers start complaining about retroactive conformances.
Modifications
- move conformance to declaring module
- optimise code to not allocate
Result
no warning, optimal generated code for:
```swift
func foo1(int: Int) -> _TinyArray<Int> {
[int]
}
```
compiles down to:
```
output.foo1(int: Swift.Int) -> output._TinyArray<Swift.Int>:
mov rax, rdi
xor edx, edx
ret
```
https://godbolt.org/z/a91fPe6or
2023-12-05 18:19:37 +00:00
David Zech
5afc92197a
Add Expanded CMS Support ( #151 )
...
* Support BER Encoded CMS
* Support Attached CMS
* Support Signed Attributes CMS
2023-10-25 16:19:41 +01:00
David Nadoba
3c33085404
Support loading trust root CAs on Linux ( #136 )
...
* Support loading trust roots on Linux
* Fix linux
* run `swift-format`
* Apply review feedback
* Implement `_TinyArray2`
* fix tests
* Update benchmarks for _TinyArray2
* run swift-format
* use two properties instead of TinyArray2
* remove usage of `_TinyArray2` and rename `insert` to `append`
* remove TinyArray2 and rename TinyArray1 back to just TinyArray
* run swift-format
* fix tests
* Fix review comments
2023-10-18 14:01:10 +01:00
David Nadoba
50ec4771c2
Add the diagnosticCallback to CMS.isValidSignature ( #135 )
...
* Allow setting `diagnosticCallback ` for `CMS.isValidSignature`
* swift-format
2023-09-18 15:44:29 +01:00
David Nadoba
45ad9935c7
Adopt apple/swift-format ( #121 )
...
* Adopt `apple/swift-format`
* install swift-format
* set `UseSynthesizedInitializer` to `false` until bug is fixed https://github.com/apple/swift-format/issues/591
* fix license header
* Fix license header
2023-08-16 11:17:34 +01:00
David Nadoba and Cory Benfield
147d854c38
Policy Builder ( #79 )
...
* experiment with policy builder
* convert tests to use new policy builder
* Add AnyPolicy
* deprecate PolicySet
* revert swift tools version
* code review
* run ./scripts/update_cmakelists.sh
* add tests
* Fix Swift 5.7
* add documentation
---------
Co-authored-by: Cory Benfield <lukasa@apple.com >
2023-05-09 11:16:59 +01:00
Cory Benfield
678756a659
Expose a CMSSignature type ( #65 )
...
There are some use-cases where interrogating the structure of a CMS
signature is necessary. This patch adds an SPI for looking at a CMS
signature.
As with the rest of our CMS operations, we're not willing to commit to
an API shape yet, so this patch doesn't provide one. Instead, users need
to opt-in to using the unstable API.
2023-04-13 18:30:47 +01:00
Joey
842de7e8ba
Documentation - Typos ( #56 )
2023-04-11 00:45:16 -07:00
Cory Benfield
78c495a58d
Apply code review feedback
2023-03-06 13:44:54 +00:00
Cory Benfield
5b7666f8ef
Support additional intermediates
2023-03-06 13:44:54 +00:00
Cory Benfield
d1cd7fe8c2
Provide the signer
2023-03-06 13:44:54 +00:00
Cory Benfield
e61c4ecf0a
CMS Signing support
...
This patch adds support for basic CMS operations. We aren't sure that
the API surface here is right, so for now we're going to provide this
under an SPI guard so that we can make any amendments we might need.
2023-03-06 13:44:54 +00:00
David Nadoba
0abe1f8330
Remove unused errors
2023-02-10 12:09:53 +01:00
David Nadoba
987848d4e9
Properly support SET OF fields.
2023-02-09 09:33:31 +01:00
Cory Benfield
0d95324c80
Un-namespace the extensions.
...
We've received API review feedback that is critical of us having the
extensions inside a namespace. This patch extracts them from that
namespace.
2023-02-07 11:26:50 +00:00
Cory Benfield
b408daf0f8
Update to swift-asn1 new error type
2023-02-06 11:02:45 +00:00
David Nadoba
c33a826019
Fix review comments
2023-02-02 15:32:51 +01:00
David Nadoba
f153e0ba7b
Use new DER.optionalImplicitlyTagged from swift-asn1 0.4.0
2023-02-02 15:17:13 +01:00
David Nadoba
a92d6e8918
It doesn’t make sense to decode as an implicitly taggable type if the type does not conform to DERImplicitlyTaggable
2023-02-02 11:52:35 +01:00
David Nadoba
cf59bc50c7
Cryptographic Message Syntax ASN.1 de/serialisation
2023-02-02 11:52:35 +01:00
David Nadoba
d41079b50d
Use struct instead of enum for CMSContentInfo and document unsupported CMS properties
2023-02-02 11:06:26 +01:00
David Nadoba
ef35326c8a
CryptographicMessageSyntax types
2023-02-02 11:00:05 +01:00