Swiftpack.co - nferruzzi/openssl as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by nferruzzi.
nferruzzi/openssl 0.0.7
All inclusive Swift package to use OpenSSL 1.1.1d from Swift (include Mac arm)
⭐️ 6
🕓 20 weeks ago
.package(url: "https://github.com/nferruzzi/openssl.git", from: "0.0.7")

openssl 1.1.1 for Swift 5.x

All inclusive Swift package to import OpenSSL 1.1.1h from Swift and ObjC.

The binary xcframework is provided via zip as required by Swift Package, built using the openssl-apple project.

Included platforms: Mac (arm, x86), iOS, WatchOS, tvOS and simulators.

This packages is based on:

  1. XCFramework build script: https://github.com/keeshux/openssl-apple
  2. OpenSSL shim and inline functions: https://github.com/Kitura/OpenSSL

Tips:

If you make your own version of the frameworks don't forget their symbolic links:

  • create a zip using --symlinks ie: zip --symlinks -r openssl_1_1_1d.xcframework.zip openssl.xcframework
  • or copy the xcframework using cp -R ...

otherwise you may experience codes-signing problems due to bogus frameworks.

Example

...
    dependencies: [
        .package(name: "openssl", url: "https://github.com/nferruzzi/openssl", from: "0.0.2"),
    ],
    targets: [
        .target(
            name: "MyApp",
            dependencies: [.product(name: "OpenSSL", package: "openssl")]),
    ]

and then you can

import OpenSSL
...
        OpenSSL_SSL_init()
        ERR_load_CRYPTO_strings()

GitHub

link
Stars: 6
Last commit: 20 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.0.7 Xcode 15.1 #3 + visionos x86 sim
20 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics