Swiftpack.co -  OuterCorner/OpenSSL as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
OuterCorner/OpenSSL
An iOS and macOS compatible OpenSSL dynamic framework
.package(url: "https://github.com/OuterCorner/OpenSSL.git", from: "1.1.1+210909.0")

OpenSSL.framework

Platforms Carthage License

This project neatly packs OpenSSL into a dynamic framework for iOS and macOS.

Current OpenSSL version used: 1.1.1l

Installation

You have a few different options:

Manual installation

  • Include the OpenSSL.xcodeproj as a dependency in your project. This is what the projects under Examples/ are doing. Doing this means OpenSSL will be compiled alongside your project, including after every clean (building OpenSSL can take a while).
  • Use a pre-built OpenSSL.xcframework. You can find them under Releases.

SwiftPM

In your Package.swift, add OpenSSL as a dependency:

dependencies: [
  .package(url: "https://github.com/OuterCorner/OpenSSL", from: "1.1.1")
],

Associate the dependency with your target:

targets: [
  .target(name: "App", dependencies: ["OpenSSL"])
]

Usage

After importing the umbrella header:

#import <OpenSSL/OpenSSL.h>

You can simply start using OpenSSL APIs as usual.

Byte buffer[128];
    
int rc = RAND_bytes(buffer, sizeof(buffer));

See example projects under Examples/.

Issues

When including this framework in your project you'll have to set Allow Non-modular Includes In Framework Modules to YES.

CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES

This is needed because the current version of OpenSSL's public headers reference system headers.

License

This project is licensed under the MIT License - see LICENSE.

Note the underlying OpenSSL library LICENSE still applies when using this project.

Acknowledgments

The build scripts for this project were based on:

GitHub

link
Stars: 4
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

Enabled bitcode
2 weeks ago

• Enabled bitcode for both macOS and iOS. • Updated to OpenSSL 1.1.1l

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