13 Commits
Author SHA1 Message Date
Gus Cairo 9ad2ac038e Add visionOS support (#244) 2025-04-08 13:35:11 +00:00
Gus Cairo 4c305e3205 Add macCatalyst to available platforms (#242) 2025-04-08 13:25:54 +01:00
Gus Cairo bd5987524c Replace platforms from Package manifest with availability guards (#232)
Minimum deployment versions in package manifests can be problematic for
libraries, because changing them or adding them to an existing package
that doesn't already use them forces SemVer breaking majors.

Furthermore, depending on a new library that specifies minimum
deployment targets would force the adopting library to also have to add
these platforms to its manifest (which would in turn force a major).

This PR removes the platforms stanza from the package manifest and
replaces it with availability guards where necessary.
`swift-certificates` needed the platforms stanza because `swift-crypto`
forced it onto its adopters. After
https://github.com/apple/swift-crypto/pull/331, this isn't needed
anymore.
2025-03-10 14:31:15 +00:00
Nicholas KimandNicholas Kim 821085981b Tag CMS signer identifier implicitly (#218)
As pointed out in
https://github.com/apple/swift-certificates/issues/203, the
SignerIdentifier in PKCS#7 CMS should be implicitly tagged while the
currently swift-certificates explicitly tags it. This PR contains
changes for SignerIdentifier of SubjectKeyIdentifier type to be
implicitly tagged.

[RFC 5652 §
12.1](https://datatracker.ietf.org/doc/html/rfc5652#section-12.1):
```
SignerIdentifier ::= CHOICE {
  issuerAndSerialNumber IssuerAndSerialNumber,
  subjectKeyIdentifier [0] SubjectKeyIdentifier }
  ```
  
  
  Resolves: https://github.com/apple/swift-certificates/issues/203

---------

Co-authored-by: Nicholas Kim <nicholas.kim@kakaobank.com>
2025-01-14 15:02:28 +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 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
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
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
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 cf59bc50c7 Cryptographic Message Syntax ASN.1 de/serialisation 2023-02-02 11:52:35 +01:00
David Nadoba ef35326c8a CryptographicMessageSyntax types 2023-02-02 11:00:05 +01:00