catbird
catbird copied to clipboard
Add scripts to generate certificate and add it to the macOS Keychain and iOS Keychain
trafficstars
Scripts/generate-self-signed-certificate.sh — generates self signed certificate (root-ca.pem) using Scripts/cert.config config file.
Scripts/extract-certificate-from-keychain.sh — extracts certificate from the local macOS Keychain
Scripts/add-certificate-to-system-keychain.sh — adds a certificate to the local macOS Keychain
Scripts/add-certificate-to-ios-keychain.sh — adds a certificate to the booted iOS Simulator
Closes #41
I checked like this
import NIOSSL
// ...
try app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
certificateChain: NIOSSLCertificate.fromPEMFile("cert.pem").map { .certificate($0) },
privateKey: .file("cert.key")
)