Skip to content

Commit

Permalink
Renew certificates in tests (#731)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzahrmalik authored Mar 29, 2024
1 parent 83f015b commit 36292f9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
8 changes: 6 additions & 2 deletions Tests/AsyncHTTPClientTests/AsyncAwaitEndToEndTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ final class AsyncAwaitEndToEndTests: XCTestCase {
XCTAsyncTest(timeout: 5) {
/// key + cert was created with the following code (depends on swift-certificates)
/// ```
/// import X509
/// import CryptoKit
/// import Foundation
///
/// let privateKey = P384.Signing.PrivateKey()
/// let name = try DistinguishedName {
/// OrganizationName("Self Signed")
Expand All @@ -524,13 +528,13 @@ final class AsyncAwaitEndToEndTests: XCTestCase {
/// serialNumber: .init(),
/// publicKey: .init(privateKey.publicKey),
/// notValidBefore: Date(),
/// notValidAfter: Date() + .days(365),
/// notValidAfter: Date().advanced(by: 365 * 24 * 3600),
/// issuer: name,
/// subject: name,
/// signatureAlgorithm: .ecdsaWithSHA384,
/// extensions: try .init {
/// SubjectAlternativeNames([.dnsName("example.com")])
/// ExtendedKeyUsage([.serverAuth])
/// try ExtendedKeyUsage([.serverAuth])
/// },
/// issuerPrivateKey: .init(privateKey)
/// )
Expand Down
14 changes: 7 additions & 7 deletions Tests/AsyncHTTPClientTests/Resources/example.com.cert.pem
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-----BEGIN CERTIFICATE-----
MIIBwzCCAUmgAwIBAgIVAIFK2HEjRjd9rH6Szp3jT52U4wYjMAoGCCqGSM49BAMD
MIIBxDCCAUmgAwIBAgIVAPY31L1kyEnjO1E4inpE7+SYRO9mMAoGCCqGSM49BAMD
MCoxFDASBgNVBAoMC1NlbGYgU2lnbmVkMRIwEAYDVQQDDAlsb2NhbGhvc3QwHhcN
MjMwMzI5MTE1ODQwWhcNMjQwMzI4MTE1ODQwWjAqMRQwEgYDVQQKDAtTZWxmIFNp
MjQwMzI4MjI0MDUyWhcNMjUwMzI4MjI0MDUyWjAqMRQwEgYDVQQKDAtTZWxmIFNp
Z25lZDESMBAGA1UEAwwJbG9jYWxob3N0MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE
SiOrOD8CbOyvj0yg+ArayukRCjw9AAaW3lsrsiRsSaqRxDcZ7+uR5nt2FUXc25mD
Ap+adz4g5gigpIUaVQc69AgMavYFCHF3Tb0TF1D4yAFLk8GFuWqxHDuqCQaGoyS5
o2i+uiLtMu0Jzsk3oEUnfoM9n44/aV9UeOXxyDs57i2E13HrJeWIXACetybkB+Q8
Poab6ohbskTwrS7WN3tFgoGdRBCKQow/rTECdezR/fdz2cGADaBN+CNMuFSnFSr5
oy8wLTAWBgNVHREEDzANggtleGFtcGxlLmNvbTATBgNVHSUEDDAKBggrBgEFBQcD
ATAKBggqhkjOPQQDAwNoADBlAjALdKj7fq0Hvv69KUdMGvpHBaqRq+4+X4T1gAm/
Z09XPB3BAd9z3Ov7fMnc65iKRwICMQCxxu0rBJUmR9v1BINxA4S1EPH0S/U5ysTp
Wu1n1LZ3C5ooxMiO50cPuWupaB2LElY=
ATAKBggqhkjOPQQDAwNpADBmAjEAwF5OlUBOloDTIAxgaSSvHBMSVOE1rY5hUlkT
kQ+dQFeUe3Fn+Er5ohvkt+qVOQ5yAjEAt9s5b/Iz+JmWxKKUyExHob6QHEuuHmJy
AKdrn20Ply60bb8qxGYHhwhoyV2MZYVV
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDAbqzPBHiy/SoUXTlYl
F0q3AK+N5wvpb93vS8jdRYAY2BIKIQOurw4WLp0qVxKgYGqhZANiAARKI6s4PwJs
7K+PTKD4CtrK6REKPD0ABpbeWyuyJGxJqpHENxnv65Hme3YVRdzbmYMCn5p3PiDm
CKCkhRpVBzr0CAxq9gUIcXdNvRMXUPjIAUuTwYW5arEcO6oJBoajJLk=
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDDhC5OSjPQeYRm4irIH
z4EyM/NbJsX39SlI6J4/q0Syt0BwojgJKhCWfeveanbIjbWhZANiAASjaL66Iu0y
7QnOyTegRSd+gz2fjj9pX1R45fHIOznuLYTXcesl5YhcAJ63JuQH5Dw+hpvqiFuy
RPCtLtY3e0WCgZ1EEIpCjD+tMQJ17NH993PZwYANoE34I0y4VKcVKvk=
-----END PRIVATE KEY-----

0 comments on commit 36292f9

Please sign in to comment.