GithubHelp home page GithubHelp logo

wuting0521 / gmopenssl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from muzipiao/gmopenssl

0.0 0.0 0.0 157.49 MB

openssl 1.1.1u 的 framework 版本,发布至 cocoapods,方便集成。

License: MIT License

Shell 0.13% Ruby 0.03% C 99.61% Objective-C 0.21% Swift 0.02% Makefile 0.01%

gmopenssl's Introduction

GMOpenSSL

Pod Version Platform Carthage compatible SwiftPM compatible Mac Catalyst compatible License

cocoapods 不支持直接集成 OpenSSL,将 OpenSSL 源码编译为 framework,并发布至 cocoapods,名称为 GMOpenSSL,方便通过 cocoapods 集成。

版本映射

GMOpenSSL 版本 OpenSSL 版本 支持架构 Bitcode 兼容版本
3.0.3 1.1.1u x86_64 arm64 不包含 iOS>= iOS 9.0, OSX>=10.13
2.2.9 1.1.1q x86_64 arm64 包含 >= iOS 9.0
2.2.4 1.1.1l x86_64 arm64 arm64e armv7 armv7s 包含 >= iOS 8.0

CocoaPods

CocoaPods 是最简单方便的集成方法,编辑 Podfile 文件,添加

pod 'GMOpenSSL'

然后执行 pod install 即可,默认最新版本。

Swift Package Manager

GMOpenSSL 支持 SwiftPM,在工程中使用,点击 File -> Swift Packages -> Add Package Dependency,输入 https://github.com/muzipiao/GMOpenSSL.git,或者在 Xcode 中添加 GitHub 账号,搜索 GMOpenSSL 即可。

如果在组件库中使用,更新 Package.swift 文件:

dependencies: [
    .package(url: "https://github.com/muzipiao/GMOpenSSL.git", from: "3.0.3")
],

自定义编译 OpenSSL

如果编译的静态库不能满足需求,可以自行运行脚本编译。工程目录下有一个名称为 OpenSSL_BUILD 的文件夹,依次执行 cd 切换到当前目录下,然后执行make即可,待执行完毕,即可看到编译完成的 OpenSSL_BUILD/Frameworks/OpenSSL.xcframwork。静态库在对应平台的 lib 文件夹下,如iphoneos/lib/libcrypto.a

编译工程依赖开源项目OpenSSL,由于此项目未暴露国密头文件,本目录与原项目有小量改动;主要改动为将 OpenSSL 源码 include/crypto/ 路径下的 sm2.h、sm3.h,sm4.h 都拷贝至项目。

gmopenssl's People

Contributors

muzipiao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.