From 941e966ccf57245720f8db627672affd5bd47da3 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 1 Mar 2023 10:35:09 +0000 Subject: [PATCH] Add README and collateral --- .spi.yml | 4 ++++ README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- SECURITY.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 .spi.yml create mode 100644 SECURITY.md diff --git a/.spi.yml b/.spi.yml new file mode 100644 index 0000000..6470dd9 --- /dev/null +++ b/.spi.yml @@ -0,0 +1,4 @@ +version: 1 +builder: + configs: + - documentation_targets: [X509] diff --git a/README.md b/README.md index 63b6782..a0046bd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,48 @@ # swift-certificates -A description of this package. +A library for working with X.509 certificates. + +## Overview + +X.509 certificates are a commonly-used identity format to cryptographically +attest to the identity of an actor in a system. They form part of the X.509 +standard created by the ITU-T for defining a public key infrastructure (PKI). +X.509-style PKIs are commonly used in cases where it is necessary to delegate +the authority to attest to an actor's identity to a small number of trusted +parties (called Certificate Authorities). + +The most common usage of X.509 certificates today is as part of the WebPKI, +where they are used to secure TLS connections to websites. X.509 certificates +are also used in a wide range of other TLS-based communications, as well as +in code signing infrastructure. + +This module makes it possible to serialize, deserialize, create, and interact +with X.509 certificates. This is an essential building-block for a wide range +of PKI applications. It enables building verifiers, interacting with +certificate authorities, authenticating peers, and more. + +## Supported Versions + +This library was introduced with support for Swift 5.7 or later. + +## Getting Started + +To use swift-certificates, add the following dependency to your Package.swift: + +```swift +dependencies: [ + .package(url: "https://github.com/apple/swift-certificates.git", upToNextMinor(from: "0.1.0")) +] +``` + +Note that this repository does not have a 1.0 tag yet, so the API is not stable. + +You can then add the specific product dependency to your target: + +```swift +dependencies: [ + .product(name: "X509", package: "swift-certificates"), +] +``` + +For detailed usage and API documentation, check [the documentation](https://swiftpackageindex.com/apple/swift-certificates/main/documentation/x509). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..03975a4 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,44 @@ +# Security + +This document specifies the security process for the Swift Certificates project. + +## Disclosures + +### Private Disclosure Process + +The Swift Certificates core team asks that known and suspected vulnerabilities be +privately and responsibly disclosed by emailing +[sswg-security-reports@forums.swift.org](mailto:sswg-security-reports@forums.swift.org) +with all the required detail. +**Do not file a public issue.** + +#### When to report a vulnerability + +* You think you have discovered a potential security vulnerability in Swift Certificates. +* You are unsure how a vulnerability affects Swift Certificates. + +#### What happens next? + +* A member of the team will acknowledge receipt of the report within 3 + working days (United States). This may include a request for additional + information about reproducing the vulnerability. +* We will privately inform the Swift Server Work Group ([SSWG][sswg]) of the + vulnerability within 10 days of the report as per their [security + guidelines][sswg-security]. +* Once we have identified a fix we may ask you to validate it. We aim to do this + within 30 days. In some cases this may not be possible, for example when the + vulnerability exists at the protocol level and the industry must coordinate on + the disclosure process. +* If a CVE number is required, one will be requested from [MITRE][mitre] + providing you with full credit for the discovery. +* We will decide on a planned release date and let you know when it is. +* Prior to release, we will inform major dependents that a security-related + patch is impending. +* Once the fix has been released we will publish a security advisory on GitHub + and the [SSWG][sswg] will announce the vulnerability on the [Swift + forums][swift-forums-sec]. + +[sswg]: https://github.com/swift-server/sswg +[sswg-security]: https://github.com/swift-server/sswg/blob/main/process/incubation.md#security-best-practices +[swift-forums-sec]: https://forums.swift.org/c/server/security-updates/ +[mitre]: https://cveform.mitre.org/