Giter Club home page Giter Club logo

gmopenssl's Introduction

GMOpenSSL

Version License Platform

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

版本映射

GMOpenSSL 版本 OpenSSL 版本 支持架构 Bitcode 兼容iOS版本
2.2.0 1.1.1i x86_64 arm64 arm64e armv7 armv7s 包含 >= iOS 8.0
2.2.1 1.1.1i arm64 arm64e 包含 >= iOS 8.0
2.2.3 1.1.1i x86_64 arm64 arm64e 包含 >= iOS 8.0

CocoaPods

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

pod 'GMOpenSSL'

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

自定义编译 OpenSSL

如果编译的静态库不能满足需求,可以自行运行脚本编译。工程目录下有一个名称为 OpenSSL_BUILD 的文件夹,依次执行 cd 切换到当前目录下,然后执行./build-libssl.sh,待执行完毕再执行./create-openssl-framework.sh,即可看到编译完成的 openssl.framwork。

打包完成的静态库并未暴露国密的头文件,解压缩下载的 openssl 压缩包,如 openssl-1.1.1i.tar.gz,将 include/crypto/ 路径下的 sm2.h、sm3.h,sm4.h 都拖到 openssl.framework/Headers 文件夹下即可。

opensslconf.h 头文件条件编译末尾做如下修改

# error Unable to determine target or target not included in OpenSSL build

修改为:

# include <openssl/opensslconf_ios_arm64.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.