├── .github └── workflows │ └── build.yml ├── .gitignore ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── RELEASE.md ├── THANKS ├── archive ├── README.md └── release-template.md ├── build.sh ├── clean.sh ├── curl ├── curlbuild-ios-universal.h ├── libcurl-build.sh └── sslv3.patch ├── example ├── README.md ├── iOS Test App │ ├── LICENSE │ ├── README.md │ ├── iOS Test App.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── iOS Test App.xcscheme │ ├── iOS Test App │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── cacert.pem │ │ ├── iOS Test App.entitlements │ │ └── main.m │ ├── include │ │ ├── curl │ │ │ ├── curl.h │ │ │ ├── curlbuild.README │ │ │ ├── curlbuild.h │ │ │ ├── curlrules.h │ │ │ ├── curlver.h │ │ │ ├── easy.h │ │ │ ├── header.h │ │ │ ├── mprintf.h │ │ │ ├── multi.h │ │ │ ├── options.h │ │ │ ├── stdcheaders.h │ │ │ ├── system.h │ │ │ ├── typecheck-gcc.h │ │ │ ├── urlapi.h │ │ │ └── websockets.h │ │ └── openssl │ │ │ ├── aes.h │ │ │ ├── asn1.h │ │ │ ├── asn1_mac.h │ │ │ ├── asn1err.h │ │ │ ├── asn1t.h │ │ │ ├── async.h │ │ │ ├── asyncerr.h │ │ │ ├── bio.h │ │ │ ├── bioerr.h │ │ │ ├── blowfish.h │ │ │ ├── bn.h │ │ │ ├── bnerr.h │ │ │ ├── buffer.h │ │ │ ├── buffererr.h │ │ │ ├── camellia.h │ │ │ ├── cast.h │ │ │ ├── cmac.h │ │ │ ├── cmp.h │ │ │ ├── cmp_util.h │ │ │ ├── cmperr.h │ │ │ ├── cms.h │ │ │ ├── cmserr.h │ │ │ ├── comp.h │ │ │ ├── comperr.h │ │ │ ├── conf.h │ │ │ ├── conf_api.h │ │ │ ├── conferr.h │ │ │ ├── configuration.h │ │ │ ├── conftypes.h │ │ │ ├── core.h │ │ │ ├── core_dispatch.h │ │ │ ├── core_names.h │ │ │ ├── core_object.h │ │ │ ├── crmf.h │ │ │ ├── crmferr.h │ │ │ ├── crypto.h │ │ │ ├── cryptoerr.h │ │ │ ├── cryptoerr_legacy.h │ │ │ ├── ct.h │ │ │ ├── cterr.h │ │ │ ├── decoder.h │ │ │ ├── decodererr.h │ │ │ ├── des.h │ │ │ ├── des_old.h │ │ │ ├── dh.h │ │ │ ├── dherr.h │ │ │ ├── dsa.h │ │ │ ├── dsaerr.h │ │ │ ├── dso.h │ │ │ ├── dtls1.h │ │ │ ├── e_os2.h │ │ │ ├── ebcdic.h │ │ │ ├── ec.h │ │ │ ├── ecdh.h │ │ │ ├── ecdsa.h │ │ │ ├── ecerr.h │ │ │ ├── encoder.h │ │ │ ├── encodererr.h │ │ │ ├── engine.h │ │ │ ├── engineerr.h │ │ │ ├── err.h │ │ │ ├── ess.h │ │ │ ├── esserr.h │ │ │ ├── evp.h │ │ │ ├── evperr.h │ │ │ ├── fips_names.h │ │ │ ├── fipskey.h │ │ │ ├── hmac.h │ │ │ ├── http.h │ │ │ ├── httperr.h │ │ │ ├── idea.h │ │ │ ├── kdf.h │ │ │ ├── kdferr.h │ │ │ ├── krb5_asn.h │ │ │ ├── kssl.h │ │ │ ├── lhash.h │ │ │ ├── macros.h │ │ │ ├── md2.h │ │ │ ├── md4.h │ │ │ ├── md5.h │ │ │ ├── mdc2.h │ │ │ ├── modes.h │ │ │ ├── obj_mac.h │ │ │ ├── objects.h │ │ │ ├── objectserr.h │ │ │ ├── ocsp.h │ │ │ ├── ocsperr.h │ │ │ ├── opensslconf.h │ │ │ ├── opensslv.h │ │ │ ├── ossl_typ.h │ │ │ ├── param_build.h │ │ │ ├── params.h │ │ │ ├── pem.h │ │ │ ├── pem2.h │ │ │ ├── pemerr.h │ │ │ ├── pkcs12.h │ │ │ ├── pkcs12err.h │ │ │ ├── pkcs7.h │ │ │ ├── pkcs7err.h │ │ │ ├── pqueue.h │ │ │ ├── prov_ssl.h │ │ │ ├── proverr.h │ │ │ ├── provider.h │ │ │ ├── rand.h │ │ │ ├── rand_drbg.h │ │ │ ├── randerr.h │ │ │ ├── rc2.h │ │ │ ├── rc4.h │ │ │ ├── rc5.h │ │ │ ├── ripemd.h │ │ │ ├── rsa.h │ │ │ ├── rsaerr.h │ │ │ ├── safestack.h │ │ │ ├── seed.h │ │ │ ├── self_test.h │ │ │ ├── sha.h │ │ │ ├── srp.h │ │ │ ├── srtp.h │ │ │ ├── ssl.h │ │ │ ├── ssl2.h │ │ │ ├── ssl23.h │ │ │ ├── ssl3.h │ │ │ ├── sslerr.h │ │ │ ├── sslerr_legacy.h │ │ │ ├── stack.h │ │ │ ├── store.h │ │ │ ├── storeerr.h │ │ │ ├── symhacks.h │ │ │ ├── tls1.h │ │ │ ├── trace.h │ │ │ ├── ts.h │ │ │ ├── tserr.h │ │ │ ├── txt_db.h │ │ │ ├── types.h │ │ │ ├── ui.h │ │ │ ├── ui_compat.h │ │ │ ├── uierr.h │ │ │ ├── whrlpool.h │ │ │ ├── x509.h │ │ │ ├── x509_vfy.h │ │ │ ├── x509err.h │ │ │ ├── x509v3.h │ │ │ └── x509v3err.h │ └── screenshot.png ├── macOS Test App │ ├── README.md │ ├── macOS Test App.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── macOS Test App │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── macOS_Test_App.entitlements │ │ └── main.m └── tvOS Test App │ ├── README.md │ ├── tvOS Test App.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── tvOS Test App │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── App Icon & Top Shelf Image.brandassets │ │ ├── App Icon - App Store.imagestack │ │ │ ├── Back.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Front.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ └── Middle.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ ├── App Icon.imagestack │ │ │ ├── Back.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Front.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ └── Middle.imagestacklayer │ │ │ │ ├── Content.imageset │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── Top Shelf Image Wide.imageset │ │ │ └── Contents.json │ │ └── Top Shelf Image.imageset │ │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── latest.sh ├── nghttp2 ├── README.md ├── automake-build.sh └── nghttp2-build.sh ├── openssl ├── openssl-build-phase1.sh ├── openssl-build-phase2.sh └── openssl-build.sh └── stage.sh /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # Build on MacOS 2 | 3 | name: build 4 | 5 | # Controls when the workflow will run 6 | on: 7 | # Triggers the workflow on push or pull request except for documentation changes 8 | push: 9 | paths-ignore: 10 | - '**.md' 11 | pull_request: 12 | paths-ignore: 13 | - '**.md' 14 | 15 | # Allow from the Actions tab 16 | workflow_dispatch: 17 | 18 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 19 | jobs: 20 | # This workflow contains a single job called "build" 21 | build: 22 | # The type of runner that the job will run on 23 | runs-on: macos-14 24 | 25 | # Steps represent a sequence of tasks that will be executed as part of the job 26 | steps: 27 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 28 | - uses: actions/checkout@v2 29 | 30 | # Runs a single command using the runners shell 31 | - name: Run build script 32 | run: bash build.sh -y 33 | 34 | # Build test iOS App - Clean 35 | - name: Prep Test iOS App 36 | run: xcodebuild clean -project "example/iOS Test App/iOS Test App.xcodeproj" 37 | 38 | # Build test iOS App - Build 39 | - name: Build Test iOS App 40 | run: xcodebuild build -project "example/iOS Test App/iOS Test App.xcodeproj" -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO -arch x86_64 41 | 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.o 4 | *.so 5 | 6 | # Packages # 7 | ############ 8 | # it's better to unpack these files and commit the raw source 9 | # git has its own built in compression methods 10 | *.7z 11 | *.dmg 12 | *.gz 13 | *.iso 14 | *.jar 15 | *.rar 16 | *.tar 17 | *.zip 18 | *.tgz 19 | 20 | # Logs 21 | ###################### 22 | *.log 23 | 24 | # OS generated files 25 | ###################### 26 | .DS_Store 27 | .DS_Store? 28 | ._* 29 | .Spotlight-V100 30 | .Trashes 31 | ehthumbs.db 32 | Thumbs.db 33 | 34 | # Xcode 35 | ######### 36 | xcuserdata/ 37 | 38 | # Local build scripts 39 | ###################### 40 | iCurlHTTP.sh 41 | cURLtv.sh 42 | *.orig 43 | test.sh 44 | 45 | # Build Artifacts 46 | ###################### 47 | archive/ 48 | libcrypto.a 49 | libcurl.a 50 | libnghttp2.a 51 | libssl.a 52 | libcurl_Catalyst.a 53 | libnghttp2_Catalyst.a 54 | openssl-ios-x86_64-maccatalyst.a 55 | releases 56 | sandbox/ 57 | example/iOS\ Test\ App/libs/ 58 | example/iOS\ Test\ App/include/ 59 | example/tvOS\ Test\ App/libs/ 60 | example/tvOS\ Test\ App/include/ 61 | example/macOS\ Test\ App/include/ 62 | example/macOS\ Test\ App/libs/ 63 | cacert.pem 64 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "git.ignoreLimitWarning": true, 3 | "cmake.configureOnOpen": false 4 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016-2020 Jason A. Cox, @jasonacox and contributors, see THANKS. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | # RELEASE NOTES 2 | 3 | ## 1.0.1 - Catalyst Fix 4 | 5 | * Fix build issue where bitcode compile was happening for Catalyst target. 6 | * Bitcode compile is now deprecated. The build script disables it. This is in prep to remove all bitcode logic from the script in the next release. 7 | 8 | ## 1.0.0 - Platform Builds 9 | 10 | * Updated build script to allow building for single platform targets: macOS, iOS or tvOS. Specify with `-p ` switch. Default build is for "all" as it has been. 11 | ```bash 12 | # Examples 13 | 14 | ./build.sh -p macos # Build only for macOS 15 | ./build.sh -p ios # Build only for iOS 16 | ./build.sh -p tvos # Build only for tvOS 17 | ./build.sh # Build for all - macOS, iOS and tvOS 18 | 19 | # Disable Confirmation (auto-Yes) 20 | ./build.sh -y 21 | ``` 22 | 23 | * Added [examples apps](https://github.com/jasonacox/Build-OpenSSL-cURL/tree/master/example) for tvOS and macOS. 24 | Image 25 | 26 | -------------------------------------------------------------------------------- /THANKS: -------------------------------------------------------------------------------- 1 | Thanks to the following for their direct and/or indirect contributions to 2 | create and improve the scripts in this project. 3 | 4 | Author: Jason Cox, @jasonacox, https://github.com/jasonacox/Build-OpenSSL-cURL 5 | 6 | If your name is not listed and you have contributed, please edit and 7 | submit a pull request. 8 | 9 | ## Library Authors 10 | 11 | * Daniel Stenberg, @bagder, author and maintainer of cURL and libcurl 12 | https://daniel.haxx.se/ 13 | * OpenSSL Software Foundation, maintainer of OpenSSL 14 | https://www.openssl.org/ 15 | * Tatsuhiro Tsujikawa, @tatsuhiro_t, author and maintainer of nghttp2 library and tools 16 | https://github.com/nghttp2/nghttp2 17 | 18 | ## Maintainer 19 | 20 | * Jason Cox, @jasonacox 21 | https://github.com/jasonacox/Build-OpenSSL-cURL 22 | 23 | ## Contributors 24 | 25 | * Preston Jennings, @prestonj, Fixed Mac target build (was building for iOS not OSX) #2 26 | * TosSense, @tossense, Fixed typo and add a header example of curlbuild.h #13 27 | * Jbfitb, @jbfitb, Added armv7s to lipo for libcrypto and libssl #25 28 | * Sammy Lan, @SammyLan, Added support for -b(disablebitcode) option #37 29 | * Tom Peeters, @Tommy2d, Mac Catalyst build support and separated binaries for simulators #42 #45 30 | * Foster Brereton, @fosterbrereton, Increased compilation speed using all cores #48 31 | * Mo Farajmandi, @mofarajmandi, Added support for XCFramework and Apple Silicon tvOS Simulator #51 32 | 33 | ## Reference Projects 34 | 35 | * Felix Schwarz, IOSPIRIT GmbH, @@felix_schwarz. 36 | https://gist.github.com/c61c0f7d9ab60f53ebb0.git 37 | * Bochun Bai 38 | https://github.com/sinofool/build-libcurl-ios 39 | * Stefan Arentz 40 | https://github.com/st3fan/ios-openssl 41 | * Felix Schulze 42 | https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh 43 | * James Moore 44 | https://gist.github.com/foozmeat/5154962 45 | * Peter Steinberger, PSPDFKit GmbH, @steipete. 46 | https://gist.github.com/felix-schwarz/c61c0f7d9ab60f53ebb0 47 | 48 | ## Issues and Feedback 49 | 50 | * Thanks to all of you who submit feedback and create issue tickets to help us improve the build script! 51 | -------------------------------------------------------------------------------- /archive/README.md: -------------------------------------------------------------------------------- 1 | # Build-OpenSSL-cURL Binaries 2 | 3 | The `build.sh` script stores the builds in this archive directory. The directory names are based on the version of the releases of OpenSSL, nghttp2 and libcurl and include the libraries for MacOS, Mac Catalyst, iOS and tvOS. 4 | 5 | ## Build Your Own or Use These 6 | 7 | See the `build.sh` script in parent directory. 8 | 9 | ## Download Compressed Archives 10 | 11 | Previous builds can be downloaded form the Github releases for this project: https://github.com/jasonacox/Build-OpenSSL-cURL/releases 12 | 13 | ## Archive 14 | 15 | This directory contains the curl and openssl headers (in the `include` folder), the various *.a and xcframework libraries built along with a MacOS binary for `curl` and `openssl`. 16 | 17 | archive 18 | |__ bin/ 19 | │   |__ curl* 20 | │   |__ curl-arm64* 21 | │   |__ curl-x86_64* 22 | │   |__ openssl* 23 | │   |__ openssl-arm64* 24 | │   |__ openssl-x86_64* 25 | | 26 | |__ cacert.pem 27 | | 28 | |__ include/ 29 | │   |__ curl/ 30 | │   |__ openssl/ 31 | | 32 | |__ lib/ 33 | │   |__ Catalyst/ 34 | │   |__ MacOS/ 35 | │   |__ iOS/ 36 | │   |__ iOS-fat/ 37 | │   |__ iOS-simulator/ 38 | │   |__ tvOS/ 39 | │   |__ tvOS-simulator/ 40 | | 41 | |__ xcframework/ 42 | |__ libcrypto.xcframework/ 43 | |__ libcurl.xcframework/ 44 | |__ libnghttp2.xcframework/ 45 | |__ libssl.xcframework/ 46 | 47 | ## License 48 | 49 | The MIT License is used for this project. See LICENSE file. 50 | -------------------------------------------------------------------------------- /archive/release-template.md: -------------------------------------------------------------------------------- 1 | # Release ZZZLIBCURL Library and Headers 2 | 3 | This release includes cURL, OpenSSL and Nghttp2 libraries and header files for MacOS, Mac Catalyst, iOS and tvOS projects. 4 | 5 | ## Build Command 6 | 7 | ./build.sh ZZZCMDS 8 | 9 | ## Versions 10 | 11 | LIBCURL="ZZZLIBCURL" # https://curl.haxx.se/download.html 12 | OPENSSL="ZZZOPENSSL" # https://www.openssl.org/source/ 13 | NGHTTP2="ZZZNGHTTP2" # https://nghttp2.org/ 14 | 15 | ## Archive 16 | 17 | This directory contains the curl and openssl headers (in the `include` folder), the *.a libraries and XCFrameworks along with MacOS executable binaries for `curl` and `openssl` (intel x86_64 and Apple silicon arm64). 18 | 19 | |__libcurl-ZZZLIBCURL-openssl-ZZZOPENSSL-nghttp2-ZZZNGHTTP2 20 | | 21 | |__ bin/ 22 | │   |__ curl* (universal binary) 23 | │   |__ curl-arm64* 24 | │   |__ curl-x86_64* 25 | │   |__ openssl* (universal binary) 26 | │   |__ openssl-arm64* 27 | │   |__ openssl-x86_64* 28 | | 29 | |__ cacert.pem 30 | | 31 | |__ include/ 32 | │   |__ curl/ 33 | │   |__ openssl/ 34 | | 35 | |__ lib/ 36 | │   |__ Catalyst/ 37 | │   |__ MacOS/ 38 | │   |__ iOS/ 39 | │   |__ iOS-fat/ 40 | │   |__ iOS-simulator/ 41 | │   |__ tvOS/ 42 | │   |__ tvOS-simulator/ 43 | | 44 | |__ xcframework/ 45 | |__ libcrypto.xcframework/ 46 | │   |__ ios-arm64_arm64e_armv7_armv7s/ 47 | │   |__ ios-arm64_i386_x86_64-simulator/ 48 | │   |__ tvos-arm64/ 49 | │   |__ tvos-arm64_x86_64-simulator/ 50 | |__ libcurl.xcframework/ 51 | │   |__ ios-arm64_arm64e_armv7_armv7s/ 52 | │   |__ ios-arm64_i386_x86_64-simulator/ 53 | │   |__ tvos-arm64/ 54 | │   |__ tvos-arm64_x86_64-simulator/ 55 | |__ libnghttp2.xcframework/ 56 | │   |__ ios-arm64_arm64e_armv7_armv7s/ 57 | │   |__ ios-arm64_i386_x86_64-simulator/ 58 | │   |__ tvos-arm64/ 59 | │   |__ tvos-arm64_x86_64-simulator/ 60 | |__ libssl.xcframework/ 61 | |__ ios-arm64_arm64e_armv7_armv7s/ 62 | |__ ios-arm64_i386_x86_64-simulator/ 63 | |__ tvos-arm64/ 64 | |__ tvos-arm64_x86_64-simulator/ 65 | 66 | ## Usage 67 | 68 | ## Usage 69 | 70 | 1. Copy headers to your project. 71 | 2. Import **XCFrameworks**: Import appropriate *xcframework* folders into your project in Xcode. 72 | Alternative: Import appropriate libraries: "libssl.a", "libcrypto.a", "libcurl.a", "libnghttp2.a" 73 | 3. Reference Headers. 74 | 4. If required, specify the flag "-lz" in "Other Linker Flags" (OTHER_LDFLAGS) setting in the "Linking" section in the Build settings of the target. 75 | 5. Initialize curl in your code: 76 | 77 | ```cpp 78 | #include 79 | 80 | (void)foo { 81 | CURL* cURL = curl_easy_init(); 82 | // ... 83 | } 84 | ``` 85 | -------------------------------------------------------------------------------- /clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Cleaning Build-OpenSSL-cURL" 3 | rm -fr curl/curl-* curl/include curl/lib openssl/openssl-1* openssl/openssl-3* openssl/openssl-ios* openssl/Mac openssl/iOS* openssl/tvOS* openssl/Catalyst nghttp2/nghttp2-1* nghttp2/Mac nghttp2/iOS* nghttp2/tvOS* nghttp2/lib nghttp2/Catalyst example/iOS\ Test\ App/build/* *.tgz *.pkg nghttp2/pkg-config* /tmp/curl /tmp/openssl /tmp/pkg_config 4 | -------------------------------------------------------------------------------- /curl/sslv3.patch: -------------------------------------------------------------------------------- 1 | --- openssl.c 2022-05-30 01:05:13.000000000 -0700 2 | +++ openssl.c.2 2022-05-30 01:25:52.000000000 -0700 3 | @@ -2709,8 +2709,9 @@ 4 | failf(data, "No SSLv2 support"); 5 | return CURLE_NOT_BUILT_IN; 6 | case CURL_SSLVERSION_SSLv3: 7 | - failf(data, "No SSLv3 support"); 8 | - return CURLE_NOT_BUILT_IN; 9 | + req_method = SSLv3_client_method(); 10 | + /* use_sni(FALSE); */ 11 | + break; 12 | default: 13 | failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); 14 | return CURLE_SSL_CONNECT_ERROR; 15 | @@ -2798,9 +2799,18 @@ 16 | 17 | switch(ssl_version) { 18 | case CURL_SSLVERSION_SSLv2: 19 | - case CURL_SSLVERSION_SSLv3: 20 | return CURLE_NOT_BUILT_IN; 21 | 22 | + case CURL_SSLVERSION_SSLv3: 23 | + SSL_CTX_set_min_proto_version(backend->ctx, SSL3_VERSION); 24 | + SSL_CTX_set_max_proto_version(backend->ctx, SSL3_VERSION); 25 | + ctx_options |= SSL_OP_NO_SSLv2; 26 | + ctx_options |= SSL_OP_NO_TLSv1; 27 | + ctx_options |= SSL_OP_NO_TLSv1_1; 28 | + ctx_options |= SSL_OP_NO_TLSv1_2; 29 | + ctx_options |= SSL_OP_NO_TLSv1_3; 30 | + break; 31 | + 32 | /* "--tlsv" options mean TLS >= version */ 33 | case CURL_SSLVERSION_DEFAULT: 34 | case CURL_SSLVERSION_TLSv1: /* TLS >= version 1.0 */ 35 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # Example Apps 2 | 3 | These three example Xcode projects show how to incorporate the OpenSSL+Curl libraries into your code. 4 | 5 | ## iOS 6 | 7 | The iOS Build [iOS Test App](./iOS%20Test%20App/) 8 | 9 | image 10 | image 11 | 12 | ## tvOS 13 | 14 | The tvOS Build [tvOS Test App](./tvOS%20Test%20App/) 15 | 16 | Image 17 | 18 | ## macOS 19 | 20 | The macOS Build [macOS Test App](./macOS%20Test%20App/) 21 | 22 | Image 23 | 24 | ## Build Notes 25 | 26 | The Test Apps will not build without the required files in the `libs` and `include` folders. These are created during the build and will be installed by the script: 27 | 28 | ```bash 29 | ./build.sh 30 | ``` 31 | 32 | If you are setting up a new Xcode project, there are a few things you will need to do, including adding the required xcframework (lib) files and include path. Note, these are all set up for you already in the Test xcodeproj files. 33 | 34 | ### Add to Project 35 | 36 | You will need to add the xcframework files (libs) and header files (include). You will also need to add libz.tbd to the Xcode project ("General"). 37 | 38 | Image 39 | 40 | You will also need to import the `cacert.pem` certificate bundle file into your project if you plan to use HTTPS (openssl) for certificate verification. 41 | 42 | ### Sandbox Settings for macOS 43 | 44 | For macOS builds, you will need to allow "Outgoing Connection (Client)" in the "Signing & Capabilities" of the project target "Sandbox" settings. 45 | 46 | Image 47 | 48 | You will also need to add libz.tbd, libldap.tbd, CoreFoundation.framework, and SystemConfiguration.framework to the Xcode project ("General") to prevent build errors. 49 | 50 | Image 51 | -------------------------------------------------------------------------------- /example/iOS Test App/LICENSE: -------------------------------------------------------------------------------- 1 | COPYRIGHT AND PERMISSION NOTICE 2 | 3 | Copyright (c) 2016 Jason A. Cox, @jasonacox 4 | 5 | All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | -------------------------------------------------------------------------------- /example/iOS Test App/README.md: -------------------------------------------------------------------------------- 1 | # iOS Test App 2 | 3 | This is a test app for iOS using the curl, openssl and nghttp2 libraries. 4 | 5 | ## Build Instructions 6 | 7 | The `libs` and `include` folders will be created during the build. These are required to build and run the Test application in Xcode. Build the libraries with this command: 8 | 9 | ```bash 10 | # Build Mac Catalyst Support for iOS Target 15.0 11 | ./build.sh -m -u 15.0 12 | 13 | # Minimum build support 14 | ./build.sh -p ios 15 | ``` 16 | 17 | Load and build the project using Xcode. Example lib binaries (xcframework)and header files are included but will be replaced when you run the build script. 18 | 19 | ## Screenshots 20 | 21 | iOS Test Build 22 | 23 | image 24 | image 25 | 26 | Mac Catalyst Build 27 | 28 | image 29 | image 30 | 31 | 32 | ## New Project Setup Details 33 | 34 | If you are setting up a new Xcode project, there are few things you will need to set up. These are all set up for you already in the xcodeproj file: 35 | 36 | * You will also need to add the xcframework files (libs) and header files (include). You will also need to add libz.tbd to the Xcode project ("General"). 37 | Image 38 | 39 | -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App.xcodeproj/xcshareddata/xcschemes/iOS Test App.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // 4 | // iOS TEST APP - This is a test app for iOS using the curl, openssl and nghttp2 libraries 5 | // @jasonacox/Build-OpenSSL-cURL 6 | // 7 | // Created by Jason A. Cox on 11/19/16. 8 | // 9 | // COPYRIGHT AND PERMISSION NOTICE 10 | // 11 | // Copyright (c) 2014-2022 Jason A. Cox, jason@jasonacox.com, and contributors, 12 | // see the THANKS file. 13 | // 14 | // All rights reserved. 15 | // 16 | // Permission is hereby granted, free of charge, to any person obtaining a copy 17 | // of this software and associated documentation files (the "Software"), to deal 18 | // in the Software without restriction, including without limitation the rights 19 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | // copies of the Software, and to permit persons to whom the Software is 21 | // furnished to do so, subject to the following conditions: 22 | // 23 | // The above copyright notice and this permission notice shall be included in all 24 | // copies or substantial portions of the Software. 25 | // 26 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | // SOFTWARE. 33 | // 34 | 35 | 36 | 37 | #import 38 | #import 39 | #import 40 | 41 | @interface AppDelegate : UIResponder 42 | 43 | @property (strong, nonatomic) UIWindow *window; 44 | 45 | 46 | @end 47 | 48 | -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | iOS cURL Test App 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | Main 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // iOS Test App 4 | // 5 | // Created by Jason A. Cox on 11/19/16. 6 | // 7 | // COPYRIGHT AND PERMISSION NOTICE 8 | // 9 | // Copyright (c) 2014-2022 Jason A. Cox, jasonacox@me.com, and many contributors, 10 | // see the THANKS file. 11 | // 12 | // All rights reserved. 13 | // 14 | // Permission is hereby granted, free of charge, to any person obtaining a copy 15 | // of this software and associated documentation files (the "Software"), to deal 16 | // in the Software without restriction, including without limitation the rights 17 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | // copies of the Software, and to permit persons to whom the Software is 19 | // furnished to do so, subject to the following conditions: 20 | // 21 | // The above copyright notice and this permission notice shall be included in all 22 | // copies or substantial portions of the Software. 23 | // 24 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30 | // SOFTWARE. 31 | // 32 | 33 | 34 | #import 35 | #import 36 | #import 37 | 38 | @interface ViewController : UIViewController 39 | { 40 | IBOutlet UITextField *_urlText; // user field for URL address 41 | IBOutlet UITextView *_resultText; // user field for resulting cURL data 42 | IBOutlet UIButton *_getButton; // user button to start GET 43 | IBOutlet UILabel *_appTitle; // application title to update for version 44 | 45 | // CURL global data 46 | CURL *_curl; // curl handle 47 | NSData *_dataToSend; 48 | size_t _dataToSendBookmark; 49 | NSMutableData *_dataReceived; 50 | NSString *cacertPath; // path to cacert.pem file 51 | } 52 | 53 | @property (retain, nonatomic) UITextField *_urlText; 54 | @property (retain, nonatomic) UITextView *_resultText; 55 | @property (retain, nonatomic) UIButton *_getButton; 56 | @property (retain, nonatomic) UILabel *_appTitle; 57 | 58 | - (IBAction)Get: (id)sender; // action method to run GET 59 | 60 | @end 61 | 62 | -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App/iOS Test App.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/iOS Test App/iOS Test App/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // iOS Test App 4 | // 5 | // Created by Jason on 11/19/16. 6 | // Copyright © 2016-2022 Jason Cox. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/iOS Test App/include/curl/curlbuild.README: -------------------------------------------------------------------------------- 1 | Two edits are needed for these header files to work for iOS. 2 | 3 | 163,164d162 4 | < // ADD Condition for 64 Bit 5 | < #ifdef __LP64__ 6 | < #define CURL_SIZEOF_LONG 8 7 | < #else 8 | < #define CURL_SIZEOF_LONG 4 9 | < #endif 10 | < 11 | 181,183c175 12 | < //#define CURL_TYPEOF_CURL_OFF_T long 13 | < //ADD Condition for 64 Bit 14 | < #define CURL_TYPEOF_CURL_OFF_T int64_t 15 | --- 16 | > #define CURL_TYPEOF_CURL_OFF_T long 17 | -------------------------------------------------------------------------------- /example/iOS Test App/include/curl/curlver.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_CURLVER_H 2 | #define CURLINC_CURLVER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | /* This header file contains nothing but libcurl version info, generated by 28 | a script at release-time. This was made its own header file in 7.11.2 */ 29 | 30 | /* This is the global package copyright */ 31 | #define LIBCURL_COPYRIGHT "Daniel Stenberg, ." 32 | 33 | /* This is the version number of the libcurl package from which this header 34 | file origins: */ 35 | #define LIBCURL_VERSION "8.11.1" 36 | 37 | /* The numeric version number is also available "in parts" by using these 38 | defines: */ 39 | #define LIBCURL_VERSION_MAJOR 8 40 | #define LIBCURL_VERSION_MINOR 11 41 | #define LIBCURL_VERSION_PATCH 1 42 | 43 | /* This is the numeric version of the libcurl version number, meant for easier 44 | parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will 45 | always follow this syntax: 46 | 47 | 0xXXYYZZ 48 | 49 | Where XX, YY and ZZ are the main version, release and patch numbers in 50 | hexadecimal (using 8 bits each). All three numbers are always represented 51 | using two digits. 1.2 would appear as "0x010200" while version 9.11.7 52 | appears as "0x090b07". 53 | 54 | This 6-digit (24 bits) hexadecimal number does not show pre-release number, 55 | and it is always a greater number in a more recent release. It makes 56 | comparisons with greater than and less than work. 57 | 58 | Note: This define is the full hex number and _does not_ use the 59 | CURL_VERSION_BITS() macro since curl's own configure script greps for it 60 | and needs it to contain the full number. 61 | */ 62 | #define LIBCURL_VERSION_NUM 0x080b01 63 | 64 | /* 65 | * This is the date and time when the full source package was created. The 66 | * timestamp is not stored in git, as the timestamp is properly set in the 67 | * tarballs by the maketgz script. 68 | * 69 | * The format of the date follows this template: 70 | * 71 | * "2007-11-23" 72 | */ 73 | #define LIBCURL_TIMESTAMP "2024-12-11" 74 | 75 | #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) 76 | #define CURL_AT_LEAST_VERSION(x,y,z) \ 77 | (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) 78 | 79 | #endif /* CURLINC_CURLVER_H */ 80 | -------------------------------------------------------------------------------- /example/iOS Test App/include/curl/header.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_HEADER_H 2 | #define CURLINC_HEADER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | struct curl_header { 32 | char *name; /* this might not use the same case */ 33 | char *value; 34 | size_t amount; /* number of headers using this name */ 35 | size_t index; /* ... of this instance, 0 or higher */ 36 | unsigned int origin; /* see bits below */ 37 | void *anchor; /* handle privately used by libcurl */ 38 | }; 39 | 40 | /* 'origin' bits */ 41 | #define CURLH_HEADER (1<<0) /* plain server header */ 42 | #define CURLH_TRAILER (1<<1) /* trailers */ 43 | #define CURLH_CONNECT (1<<2) /* CONNECT headers */ 44 | #define CURLH_1XX (1<<3) /* 1xx headers */ 45 | #define CURLH_PSEUDO (1<<4) /* pseudo headers */ 46 | 47 | typedef enum { 48 | CURLHE_OK, 49 | CURLHE_BADINDEX, /* header exists but not with this index */ 50 | CURLHE_MISSING, /* no such header exists */ 51 | CURLHE_NOHEADERS, /* no headers at all exist (yet) */ 52 | CURLHE_NOREQUEST, /* no request with this number was used */ 53 | CURLHE_OUT_OF_MEMORY, /* out of memory while processing */ 54 | CURLHE_BAD_ARGUMENT, /* a function argument was not okay */ 55 | CURLHE_NOT_BUILT_IN /* if API was disabled in the build */ 56 | } CURLHcode; 57 | 58 | CURL_EXTERN CURLHcode curl_easy_header(CURL *easy, 59 | const char *name, 60 | size_t index, 61 | unsigned int origin, 62 | int request, 63 | struct curl_header **hout); 64 | 65 | CURL_EXTERN struct curl_header *curl_easy_nextheader(CURL *easy, 66 | unsigned int origin, 67 | int request, 68 | struct curl_header *prev); 69 | 70 | #ifdef __cplusplus 71 | } /* end of extern "C" */ 72 | #endif 73 | 74 | #endif /* CURLINC_HEADER_H */ 75 | -------------------------------------------------------------------------------- /example/iOS Test App/include/curl/mprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_MPRINTF_H 2 | #define CURLINC_MPRINTF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #include 28 | #include /* needed for FILE */ 29 | #include "curl.h" /* for CURL_EXTERN */ 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #ifndef CURL_TEMP_PRINTF 36 | #if (defined(__GNUC__) || defined(__clang__) || \ 37 | defined(__IAR_SYSTEMS_ICC__)) && \ 38 | defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ 39 | !defined(CURL_NO_FMT_CHECKS) 40 | #if defined(__MINGW32__) && !defined(__clang__) 41 | #if defined(__MINGW_PRINTF_FORMAT) /* mingw-w64 3.0.0+. Needs stdio.h. */ 42 | #define CURL_TEMP_PRINTF(fmt, arg) \ 43 | __attribute__((format(__MINGW_PRINTF_FORMAT, fmt, arg))) 44 | #else 45 | #define CURL_TEMP_PRINTF(fmt, arg) 46 | #endif 47 | #else 48 | #define CURL_TEMP_PRINTF(fmt, arg) \ 49 | __attribute__((format(printf, fmt, arg))) 50 | #endif 51 | #else 52 | #define CURL_TEMP_PRINTF(fmt, arg) 53 | #endif 54 | #endif 55 | 56 | CURL_EXTERN int curl_mprintf(const char *format, ...) 57 | CURL_TEMP_PRINTF(1, 2); 58 | CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...) 59 | CURL_TEMP_PRINTF(2, 3); 60 | CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...) 61 | CURL_TEMP_PRINTF(2, 3); 62 | CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, 63 | const char *format, ...) 64 | CURL_TEMP_PRINTF(3, 4); 65 | CURL_EXTERN int curl_mvprintf(const char *format, va_list args) 66 | CURL_TEMP_PRINTF(1, 0); 67 | CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args) 68 | CURL_TEMP_PRINTF(2, 0); 69 | CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args) 70 | CURL_TEMP_PRINTF(2, 0); 71 | CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, 72 | const char *format, va_list args) 73 | CURL_TEMP_PRINTF(3, 0); 74 | CURL_EXTERN char *curl_maprintf(const char *format, ...) 75 | CURL_TEMP_PRINTF(1, 2); 76 | CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args) 77 | CURL_TEMP_PRINTF(1, 0); 78 | 79 | #undef CURL_TEMP_PRINTF 80 | 81 | #ifdef __cplusplus 82 | } /* end of extern "C" */ 83 | #endif 84 | 85 | #endif /* CURLINC_MPRINTF_H */ 86 | -------------------------------------------------------------------------------- /example/iOS Test App/include/curl/options.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_OPTIONS_H 2 | #define CURLINC_OPTIONS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | typedef enum { 32 | CURLOT_LONG, /* long (a range of values) */ 33 | CURLOT_VALUES, /* (a defined set or bitmask) */ 34 | CURLOT_OFF_T, /* curl_off_t (a range of values) */ 35 | CURLOT_OBJECT, /* pointer (void *) */ 36 | CURLOT_STRING, /* (char * to null-terminated buffer) */ 37 | CURLOT_SLIST, /* (struct curl_slist *) */ 38 | CURLOT_CBPTR, /* (void * passed as-is to a callback) */ 39 | CURLOT_BLOB, /* blob (struct curl_blob *) */ 40 | CURLOT_FUNCTION /* function pointer */ 41 | } curl_easytype; 42 | 43 | /* Flag bits */ 44 | 45 | /* "alias" means it is provided for old programs to remain functional, 46 | we prefer another name */ 47 | #define CURLOT_FLAG_ALIAS (1<<0) 48 | 49 | /* The CURLOPTTYPE_* id ranges can still be used to figure out what type/size 50 | to use for curl_easy_setopt() for the given id */ 51 | struct curl_easyoption { 52 | const char *name; 53 | CURLoption id; 54 | curl_easytype type; 55 | unsigned int flags; 56 | }; 57 | 58 | CURL_EXTERN const struct curl_easyoption * 59 | curl_easy_option_by_name(const char *name); 60 | 61 | CURL_EXTERN const struct curl_easyoption * 62 | curl_easy_option_by_id(CURLoption id); 63 | 64 | CURL_EXTERN const struct curl_easyoption * 65 | curl_easy_option_next(const struct curl_easyoption *prev); 66 | 67 | #ifdef __cplusplus 68 | } /* end of extern "C" */ 69 | #endif 70 | #endif /* CURLINC_OPTIONS_H */ 71 | -------------------------------------------------------------------------------- /example/iOS Test App/include/curl/stdcheaders.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_STDCHEADERS_H 2 | #define CURLINC_STDCHEADERS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | size_t fread(void *, size_t, size_t, FILE *); 30 | size_t fwrite(const void *, size_t, size_t, FILE *); 31 | 32 | int strcasecmp(const char *, const char *); 33 | int strncasecmp(const char *, const char *, size_t); 34 | 35 | #endif /* CURLINC_STDCHEADERS_H */ 36 | -------------------------------------------------------------------------------- /example/iOS Test App/include/curl/websockets.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_WEBSOCKETS_H 2 | #define CURLINC_WEBSOCKETS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | struct curl_ws_frame { 32 | int age; /* zero */ 33 | int flags; /* See the CURLWS_* defines */ 34 | curl_off_t offset; /* the offset of this data into the frame */ 35 | curl_off_t bytesleft; /* number of pending bytes left of the payload */ 36 | size_t len; /* size of the current data chunk */ 37 | }; 38 | 39 | /* flag bits */ 40 | #define CURLWS_TEXT (1<<0) 41 | #define CURLWS_BINARY (1<<1) 42 | #define CURLWS_CONT (1<<2) 43 | #define CURLWS_CLOSE (1<<3) 44 | #define CURLWS_PING (1<<4) 45 | #define CURLWS_OFFSET (1<<5) 46 | 47 | /* 48 | * NAME curl_ws_recv() 49 | * 50 | * DESCRIPTION 51 | * 52 | * Receives data from the websocket connection. Use after successful 53 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 54 | */ 55 | CURL_EXTERN CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen, 56 | size_t *recv, 57 | const struct curl_ws_frame **metap); 58 | 59 | /* flags for curl_ws_send() */ 60 | #define CURLWS_PONG (1<<6) 61 | 62 | /* 63 | * NAME curl_ws_send() 64 | * 65 | * DESCRIPTION 66 | * 67 | * Sends data over the websocket connection. Use after successful 68 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 69 | */ 70 | CURL_EXTERN CURLcode curl_ws_send(CURL *curl, const void *buffer, 71 | size_t buflen, size_t *sent, 72 | curl_off_t fragsize, 73 | unsigned int flags); 74 | 75 | /* bits for the CURLOPT_WS_OPTIONS bitmask: */ 76 | #define CURLWS_RAW_MODE (1<<0) 77 | 78 | CURL_EXTERN const struct curl_ws_frame *curl_ws_meta(CURL *curl); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif /* CURLINC_WEBSOCKETS_H */ 85 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/asn1_mac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #error "This file is obsolete; please update your software." 11 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/async.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | 12 | #ifndef OPENSSL_ASYNC_H 13 | # define OPENSSL_ASYNC_H 14 | # pragma once 15 | 16 | # include 17 | # ifndef OPENSSL_NO_DEPRECATED_3_0 18 | # define HEADER_ASYNC_H 19 | # endif 20 | 21 | #if defined(_WIN32) 22 | # if defined(BASETYPES) || defined(_WINDEF_H) 23 | /* application has to include to use this */ 24 | #define OSSL_ASYNC_FD HANDLE 25 | #define OSSL_BAD_ASYNC_FD INVALID_HANDLE_VALUE 26 | # endif 27 | #else 28 | #define OSSL_ASYNC_FD int 29 | #define OSSL_BAD_ASYNC_FD -1 30 | #endif 31 | # include 32 | 33 | 34 | # ifdef __cplusplus 35 | extern "C" { 36 | # endif 37 | 38 | typedef struct async_job_st ASYNC_JOB; 39 | typedef struct async_wait_ctx_st ASYNC_WAIT_CTX; 40 | typedef int (*ASYNC_callback_fn)(void *arg); 41 | 42 | #define ASYNC_ERR 0 43 | #define ASYNC_NO_JOBS 1 44 | #define ASYNC_PAUSE 2 45 | #define ASYNC_FINISH 3 46 | 47 | #define ASYNC_STATUS_UNSUPPORTED 0 48 | #define ASYNC_STATUS_ERR 1 49 | #define ASYNC_STATUS_OK 2 50 | #define ASYNC_STATUS_EAGAIN 3 51 | 52 | int ASYNC_init_thread(size_t max_size, size_t init_size); 53 | void ASYNC_cleanup_thread(void); 54 | 55 | #ifdef OSSL_ASYNC_FD 56 | ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void); 57 | void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx); 58 | int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key, 59 | OSSL_ASYNC_FD fd, 60 | void *custom_data, 61 | void (*cleanup)(ASYNC_WAIT_CTX *, const void *, 62 | OSSL_ASYNC_FD, void *)); 63 | int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key, 64 | OSSL_ASYNC_FD *fd, void **custom_data); 65 | int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd, 66 | size_t *numfds); 67 | int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx, 68 | ASYNC_callback_fn *callback, 69 | void **callback_arg); 70 | int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx, 71 | ASYNC_callback_fn callback, 72 | void *callback_arg); 73 | int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status); 74 | int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx); 75 | int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd, 76 | size_t *numaddfds, OSSL_ASYNC_FD *delfd, 77 | size_t *numdelfds); 78 | int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key); 79 | #endif 80 | 81 | int ASYNC_is_capable(void); 82 | 83 | int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret, 84 | int (*func)(void *), void *args, size_t size); 85 | int ASYNC_pause_job(void); 86 | 87 | ASYNC_JOB *ASYNC_get_current_job(void); 88 | ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job); 89 | void ASYNC_block_pause(void); 90 | void ASYNC_unblock_pause(void); 91 | 92 | 93 | # ifdef __cplusplus 94 | } 95 | # endif 96 | #endif 97 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/asyncerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ASYNCERR_H 12 | # define OPENSSL_ASYNCERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * ASYNC reason codes. 23 | */ 24 | # define ASYNC_R_FAILED_TO_SET_POOL 101 25 | # define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102 26 | # define ASYNC_R_INIT_FAILED 105 27 | # define ASYNC_R_INVALID_POOL_SIZE 103 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/bioerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_BIOERR_H 12 | # define OPENSSL_BIOERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * BIO reason codes. 23 | */ 24 | # define BIO_R_ACCEPT_ERROR 100 25 | # define BIO_R_ADDRINFO_ADDR_IS_NOT_AF_INET 141 26 | # define BIO_R_AMBIGUOUS_HOST_OR_SERVICE 129 27 | # define BIO_R_BAD_FOPEN_MODE 101 28 | # define BIO_R_BROKEN_PIPE 124 29 | # define BIO_R_CONNECT_ERROR 103 30 | # define BIO_R_CONNECT_TIMEOUT 147 31 | # define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107 32 | # define BIO_R_GETSOCKNAME_ERROR 132 33 | # define BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS 133 34 | # define BIO_R_GETTING_SOCKTYPE 134 35 | # define BIO_R_INVALID_ARGUMENT 125 36 | # define BIO_R_INVALID_SOCKET 135 37 | # define BIO_R_IN_USE 123 38 | # define BIO_R_LENGTH_TOO_LONG 102 39 | # define BIO_R_LISTEN_V6_ONLY 136 40 | # define BIO_R_LOOKUP_RETURNED_NOTHING 142 41 | # define BIO_R_MALFORMED_HOST_OR_SERVICE 130 42 | # define BIO_R_NBIO_CONNECT_ERROR 110 43 | # define BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED 143 44 | # define BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED 144 45 | # define BIO_R_NO_PORT_DEFINED 113 46 | # define BIO_R_NO_SUCH_FILE 128 47 | # define BIO_R_NULL_PARAMETER 115 /* unused */ 48 | # define BIO_R_TRANSFER_ERROR 104 49 | # define BIO_R_TRANSFER_TIMEOUT 105 50 | # define BIO_R_UNABLE_TO_BIND_SOCKET 117 51 | # define BIO_R_UNABLE_TO_CREATE_SOCKET 118 52 | # define BIO_R_UNABLE_TO_KEEPALIVE 137 53 | # define BIO_R_UNABLE_TO_LISTEN_SOCKET 119 54 | # define BIO_R_UNABLE_TO_NODELAY 138 55 | # define BIO_R_UNABLE_TO_REUSEADDR 139 56 | # define BIO_R_UNAVAILABLE_IP_FAMILY 145 57 | # define BIO_R_UNINITIALIZED 120 58 | # define BIO_R_UNKNOWN_INFO_TYPE 140 59 | # define BIO_R_UNSUPPORTED_IP_FAMILY 146 60 | # define BIO_R_UNSUPPORTED_METHOD 121 61 | # define BIO_R_UNSUPPORTED_PROTOCOL_FAMILY 131 62 | # define BIO_R_WRITE_TO_READ_ONLY_BIO 126 63 | # define BIO_R_WSASTARTUP 122 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/blowfish.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_BLOWFISH_H 11 | # define OPENSSL_BLOWFISH_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_BLOWFISH_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_BF 22 | # include 23 | # ifdef __cplusplus 24 | extern "C" { 25 | # endif 26 | 27 | # define BF_BLOCK 8 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | 31 | # define BF_ENCRYPT 1 32 | # define BF_DECRYPT 0 33 | 34 | /*- 35 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 36 | * ! BF_LONG has to be at least 32 bits wide. ! 37 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 38 | */ 39 | # define BF_LONG unsigned int 40 | 41 | # define BF_ROUNDS 16 42 | 43 | typedef struct bf_key_st { 44 | BF_LONG P[BF_ROUNDS + 2]; 45 | BF_LONG S[4 * 256]; 46 | } BF_KEY; 47 | 48 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 49 | # ifndef OPENSSL_NO_DEPRECATED_3_0 50 | OSSL_DEPRECATEDIN_3_0 void BF_set_key(BF_KEY *key, int len, 51 | const unsigned char *data); 52 | OSSL_DEPRECATEDIN_3_0 void BF_encrypt(BF_LONG *data, const BF_KEY *key); 53 | OSSL_DEPRECATEDIN_3_0 void BF_decrypt(BF_LONG *data, const BF_KEY *key); 54 | OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char *in, 55 | unsigned char *out, const BF_KEY *key, 56 | int enc); 57 | OSSL_DEPRECATEDIN_3_0 void BF_cbc_encrypt(const unsigned char *in, 58 | unsigned char *out, long length, 59 | const BF_KEY *schedule, 60 | unsigned char *ivec, int enc); 61 | OSSL_DEPRECATEDIN_3_0 void BF_cfb64_encrypt(const unsigned char *in, 62 | unsigned char *out, 63 | long length, const BF_KEY *schedule, 64 | unsigned char *ivec, int *num, 65 | int enc); 66 | OSSL_DEPRECATEDIN_3_0 void BF_ofb64_encrypt(const unsigned char *in, 67 | unsigned char *out, 68 | long length, const BF_KEY *schedule, 69 | unsigned char *ivec, int *num); 70 | OSSL_DEPRECATEDIN_3_0 const char *BF_options(void); 71 | # endif 72 | 73 | # ifdef __cplusplus 74 | } 75 | # endif 76 | # endif 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/bnerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_BNERR_H 12 | # define OPENSSL_BNERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * BN reason codes. 23 | */ 24 | # define BN_R_ARG2_LT_ARG3 100 25 | # define BN_R_BAD_RECIPROCAL 101 26 | # define BN_R_BIGNUM_TOO_LONG 114 27 | # define BN_R_BITS_TOO_SMALL 118 28 | # define BN_R_CALLED_WITH_EVEN_MODULUS 102 29 | # define BN_R_DIV_BY_ZERO 103 30 | # define BN_R_ENCODING_ERROR 104 31 | # define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105 32 | # define BN_R_INPUT_NOT_REDUCED 110 33 | # define BN_R_INVALID_LENGTH 106 34 | # define BN_R_INVALID_RANGE 115 35 | # define BN_R_INVALID_SHIFT 119 36 | # define BN_R_NOT_A_SQUARE 111 37 | # define BN_R_NOT_INITIALIZED 107 38 | # define BN_R_NO_INVERSE 108 39 | # define BN_R_NO_PRIME_CANDIDATE 121 40 | # define BN_R_NO_SOLUTION 116 41 | # define BN_R_NO_SUITABLE_DIGEST 120 42 | # define BN_R_PRIVATE_KEY_TOO_LARGE 117 43 | # define BN_R_P_IS_NOT_PRIME 112 44 | # define BN_R_TOO_MANY_ITERATIONS 113 45 | # define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_BUFFER_H 11 | # define OPENSSL_BUFFER_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_BUFFER_H 17 | # endif 18 | 19 | # include 20 | # ifndef OPENSSL_CRYPTO_H 21 | # include 22 | # endif 23 | # include 24 | 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | # include 31 | # include 32 | 33 | # ifndef OPENSSL_NO_DEPRECATED_3_0 34 | # define BUF_strdup(s) OPENSSL_strdup(s) 35 | # define BUF_strndup(s, size) OPENSSL_strndup(s, size) 36 | # define BUF_memdup(data, size) OPENSSL_memdup(data, size) 37 | # define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) 38 | # define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) 39 | # define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) 40 | # endif 41 | 42 | struct buf_mem_st { 43 | size_t length; /* current number of bytes */ 44 | char *data; 45 | size_t max; /* size of buffer */ 46 | unsigned long flags; 47 | }; 48 | 49 | # define BUF_MEM_FLAG_SECURE 0x01 50 | 51 | BUF_MEM *BUF_MEM_new(void); 52 | BUF_MEM *BUF_MEM_new_ex(unsigned long flags); 53 | void BUF_MEM_free(BUF_MEM *a); 54 | size_t BUF_MEM_grow(BUF_MEM *str, size_t len); 55 | size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len); 56 | void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); 57 | 58 | 59 | # ifdef __cplusplus 60 | } 61 | # endif 62 | #endif 63 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/buffererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_BUFFERERR_H 12 | # define OPENSSL_BUFFERERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * BUF reason codes. 23 | */ 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/cast.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CAST_H 11 | # define OPENSSL_CAST_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_CAST_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_CAST 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define CAST_BLOCK 8 27 | # define CAST_KEY_LENGTH 16 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | 31 | # define CAST_ENCRYPT 1 32 | # define CAST_DECRYPT 0 33 | 34 | # define CAST_LONG unsigned int 35 | 36 | typedef struct cast_key_st { 37 | CAST_LONG data[32]; 38 | int short_key; /* Use reduced rounds for short key */ 39 | } CAST_KEY; 40 | 41 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 42 | # ifndef OPENSSL_NO_DEPRECATED_3_0 43 | OSSL_DEPRECATEDIN_3_0 44 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 45 | OSSL_DEPRECATEDIN_3_0 46 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, 47 | const CAST_KEY *key, int enc); 48 | OSSL_DEPRECATEDIN_3_0 49 | void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); 50 | OSSL_DEPRECATEDIN_3_0 51 | void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); 52 | OSSL_DEPRECATEDIN_3_0 53 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, 54 | long length, const CAST_KEY *ks, unsigned char *iv, 55 | int enc); 56 | OSSL_DEPRECATEDIN_3_0 57 | void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 58 | long length, const CAST_KEY *schedule, 59 | unsigned char *ivec, int *num, int enc); 60 | OSSL_DEPRECATEDIN_3_0 61 | void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 62 | long length, const CAST_KEY *schedule, 63 | unsigned char *ivec, int *num); 64 | # endif 65 | 66 | # ifdef __cplusplus 67 | } 68 | # endif 69 | # endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/cmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CMAC_H 11 | # define OPENSSL_CMAC_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_CMAC_H 17 | # endif 18 | 19 | # ifndef OPENSSL_NO_CMAC 20 | 21 | # ifdef __cplusplus 22 | extern "C" { 23 | # endif 24 | 25 | # include 26 | 27 | # ifndef OPENSSL_NO_DEPRECATED_3_0 28 | /* Opaque */ 29 | typedef struct CMAC_CTX_st CMAC_CTX; 30 | # endif 31 | # ifndef OPENSSL_NO_DEPRECATED_3_0 32 | OSSL_DEPRECATEDIN_3_0 CMAC_CTX *CMAC_CTX_new(void); 33 | OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_cleanup(CMAC_CTX *ctx); 34 | OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_free(CMAC_CTX *ctx); 35 | OSSL_DEPRECATEDIN_3_0 EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); 36 | OSSL_DEPRECATEDIN_3_0 int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); 37 | OSSL_DEPRECATEDIN_3_0 int CMAC_Init(CMAC_CTX *ctx, 38 | const void *key, size_t keylen, 39 | const EVP_CIPHER *cipher, ENGINE *impl); 40 | OSSL_DEPRECATEDIN_3_0 int CMAC_Update(CMAC_CTX *ctx, 41 | const void *data, size_t dlen); 42 | OSSL_DEPRECATEDIN_3_0 int CMAC_Final(CMAC_CTX *ctx, 43 | unsigned char *out, size_t *poutlen); 44 | OSSL_DEPRECATEDIN_3_0 int CMAC_resume(CMAC_CTX *ctx); 45 | # endif 46 | 47 | # ifdef __cplusplus 48 | } 49 | # endif 50 | 51 | # endif 52 | #endif 53 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/cmp_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * Copyright Nokia 2007-2019 4 | * Copyright Siemens AG 2015-2019 5 | * 6 | * Licensed under the Apache License 2.0 (the "License"). You may not use 7 | * this file except in compliance with the License. You can obtain a copy 8 | * in the file LICENSE in the source distribution or at 9 | * https://www.openssl.org/source/license.html 10 | */ 11 | 12 | #ifndef OPENSSL_CMP_UTIL_H 13 | # define OPENSSL_CMP_UTIL_H 14 | # pragma once 15 | 16 | # include 17 | # ifndef OPENSSL_NO_CMP 18 | 19 | # include 20 | # include 21 | 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | int OSSL_CMP_log_open(void); 27 | void OSSL_CMP_log_close(void); 28 | # define OSSL_CMP_LOG_PREFIX "CMP " 29 | 30 | /* 31 | * generalized logging/error callback mirroring the severity levels of syslog.h 32 | */ 33 | typedef int OSSL_CMP_severity; 34 | # define OSSL_CMP_LOG_EMERG 0 35 | # define OSSL_CMP_LOG_ALERT 1 36 | # define OSSL_CMP_LOG_CRIT 2 37 | # define OSSL_CMP_LOG_ERR 3 38 | # define OSSL_CMP_LOG_WARNING 4 39 | # define OSSL_CMP_LOG_NOTICE 5 40 | # define OSSL_CMP_LOG_INFO 6 41 | # define OSSL_CMP_LOG_DEBUG 7 42 | # define OSSL_CMP_LOG_TRACE 8 43 | # define OSSL_CMP_LOG_MAX OSSL_CMP_LOG_TRACE 44 | typedef int (*OSSL_CMP_log_cb_t)(const char *func, const char *file, int line, 45 | OSSL_CMP_severity level, const char *msg); 46 | 47 | int OSSL_CMP_print_to_bio(BIO *bio, const char *component, const char *file, 48 | int line, OSSL_CMP_severity level, const char *msg); 49 | /* use of the logging callback for outputting error queue */ 50 | void OSSL_CMP_print_errors_cb(OSSL_CMP_log_cb_t log_fn); 51 | 52 | # ifdef __cplusplus 53 | } 54 | # endif 55 | # endif /* !defined(OPENSSL_NO_CMP) */ 56 | #endif /* !defined(OPENSSL_CMP_UTIL_H) */ 57 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/comp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_COMP_H 11 | # define OPENSSL_COMP_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_COMP_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_COMP 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | 29 | 30 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 31 | const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx); 32 | int COMP_CTX_get_type(const COMP_CTX* comp); 33 | int COMP_get_type(const COMP_METHOD *meth); 34 | const char *COMP_get_name(const COMP_METHOD *meth); 35 | void COMP_CTX_free(COMP_CTX *ctx); 36 | 37 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 38 | unsigned char *in, int ilen); 39 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 40 | unsigned char *in, int ilen); 41 | 42 | COMP_METHOD *COMP_zlib(void); 43 | 44 | #ifndef OPENSSL_NO_DEPRECATED_1_1_0 45 | # define COMP_zlib_cleanup() while(0) continue 46 | #endif 47 | 48 | # ifdef OPENSSL_BIO_H 49 | # ifdef ZLIB 50 | const BIO_METHOD *BIO_f_zlib(void); 51 | # endif 52 | # endif 53 | 54 | 55 | # ifdef __cplusplus 56 | } 57 | # endif 58 | # endif 59 | #endif 60 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/comperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_COMPERR_H 12 | # define OPENSSL_COMPERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_COMP 21 | 22 | 23 | /* 24 | * COMP reason codes. 25 | */ 26 | # define COMP_R_ZLIB_DEFLATE_ERROR 99 27 | # define COMP_R_ZLIB_INFLATE_ERROR 100 28 | # define COMP_R_ZLIB_NOT_SUPPORTED 101 29 | 30 | # endif 31 | #endif 32 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CONF_API_H 11 | # define OPENSSL_CONF_API_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_CONF_API_H 17 | # endif 18 | 19 | # include 20 | # include 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Up until OpenSSL 0.9.5a, this was new_section */ 27 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 28 | /* Up until OpenSSL 0.9.5a, this was get_section */ 29 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 30 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ 31 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 32 | const char *section); 33 | 34 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 35 | char *_CONF_get_string(const CONF *conf, const char *section, 36 | const char *name); 37 | long _CONF_get_number(const CONF *conf, const char *section, 38 | const char *name); 39 | 40 | int _CONF_new_data(CONF *conf); 41 | void _CONF_free_data(CONF *conf); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif 47 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/conferr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_CONFERR_H 12 | # define OPENSSL_CONFERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * CONF reason codes. 23 | */ 24 | # define CONF_R_ERROR_LOADING_DSO 110 25 | # define CONF_R_INVALID_PRAGMA 122 26 | # define CONF_R_LIST_CANNOT_BE_NULL 115 27 | # define CONF_R_MANDATORY_BRACES_IN_VARIABLE_EXPANSION 123 28 | # define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 29 | # define CONF_R_MISSING_EQUAL_SIGN 101 30 | # define CONF_R_MISSING_INIT_FUNCTION 112 31 | # define CONF_R_MODULE_INITIALIZATION_ERROR 109 32 | # define CONF_R_NO_CLOSE_BRACE 102 33 | # define CONF_R_NO_CONF 105 34 | # define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106 35 | # define CONF_R_NO_SECTION 107 36 | # define CONF_R_NO_SUCH_FILE 114 37 | # define CONF_R_NO_VALUE 108 38 | # define CONF_R_NUMBER_TOO_LARGE 121 39 | # define CONF_R_OPENSSL_CONF_REFERENCES_MISSING_SECTION 124 40 | # define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111 41 | # define CONF_R_RECURSIVE_SECTION_REFERENCE 126 42 | # define CONF_R_RELATIVE_PATH 125 43 | # define CONF_R_SSL_COMMAND_SECTION_EMPTY 117 44 | # define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118 45 | # define CONF_R_SSL_SECTION_EMPTY 119 46 | # define CONF_R_SSL_SECTION_NOT_FOUND 120 47 | # define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 48 | # define CONF_R_UNKNOWN_MODULE_NAME 113 49 | # define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116 50 | # define CONF_R_VARIABLE_HAS_NO_VALUE 104 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/conftypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CONFTYPES_H 11 | # define OPENSSL_CONFTYPES_H 12 | # pragma once 13 | 14 | #ifndef OPENSSL_CONF_H 15 | # include 16 | #endif 17 | 18 | /* 19 | * The contents of this file are deprecated and will be made opaque 20 | */ 21 | struct conf_method_st { 22 | const char *name; 23 | CONF *(*create) (CONF_METHOD *meth); 24 | int (*init) (CONF *conf); 25 | int (*destroy) (CONF *conf); 26 | int (*destroy_data) (CONF *conf); 27 | int (*load_bio) (CONF *conf, BIO *bp, long *eline); 28 | int (*dump) (const CONF *conf, BIO *bp); 29 | int (*is_number) (const CONF *conf, char c); 30 | int (*to_int) (const CONF *conf, char c); 31 | int (*load) (CONF *conf, const char *name, long *eline); 32 | }; 33 | 34 | struct conf_st { 35 | CONF_METHOD *meth; 36 | void *meth_data; 37 | LHASH_OF(CONF_VALUE) *data; 38 | int flag_dollarid; 39 | int flag_abspath; 40 | char *includedir; 41 | OSSL_LIB_CTX *libctx; 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/core_object.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CORE_OBJECT_H 11 | # define OPENSSL_CORE_OBJECT_H 12 | # pragma once 13 | 14 | # ifdef __cplusplus 15 | extern "C" { 16 | # endif 17 | 18 | /*- 19 | * Known object types 20 | * 21 | * These numbers are used as values for the OSSL_PARAM parameter 22 | * OSSL_OBJECT_PARAM_TYPE. 23 | * 24 | * For most of these types, there's a corresponding libcrypto object type. 25 | * The corresponding type is indicated with a comment after the number. 26 | */ 27 | # define OSSL_OBJECT_UNKNOWN 0 28 | # define OSSL_OBJECT_NAME 1 /* char * */ 29 | # define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */ 30 | # define OSSL_OBJECT_CERT 3 /* X509 * */ 31 | # define OSSL_OBJECT_CRL 4 /* X509_CRL * */ 32 | 33 | /* 34 | * The rest of the associated OSSL_PARAM elements is described in core_names.h 35 | */ 36 | 37 | # ifdef __cplusplus 38 | } 39 | # endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/crmferr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_CRMFERR_H 12 | # define OPENSSL_CRMFERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_CRMF 21 | 22 | 23 | /* 24 | * CRMF reason codes. 25 | */ 26 | # define CRMF_R_BAD_PBM_ITERATIONCOUNT 100 27 | # define CRMF_R_CRMFERROR 102 28 | # define CRMF_R_ERROR 103 29 | # define CRMF_R_ERROR_DECODING_CERTIFICATE 104 30 | # define CRMF_R_ERROR_DECRYPTING_CERTIFICATE 105 31 | # define CRMF_R_ERROR_DECRYPTING_SYMMETRIC_KEY 106 32 | # define CRMF_R_FAILURE_OBTAINING_RANDOM 107 33 | # define CRMF_R_ITERATIONCOUNT_BELOW_100 108 34 | # define CRMF_R_MALFORMED_IV 101 35 | # define CRMF_R_NULL_ARGUMENT 109 36 | # define CRMF_R_POPOSKINPUT_NOT_SUPPORTED 113 37 | # define CRMF_R_POPO_INCONSISTENT_PUBLIC_KEY 117 38 | # define CRMF_R_POPO_MISSING 121 39 | # define CRMF_R_POPO_MISSING_PUBLIC_KEY 118 40 | # define CRMF_R_POPO_MISSING_SUBJECT 119 41 | # define CRMF_R_POPO_RAVERIFIED_NOT_ACCEPTED 120 42 | # define CRMF_R_SETTING_MAC_ALGOR_FAILURE 110 43 | # define CRMF_R_SETTING_OWF_ALGOR_FAILURE 111 44 | # define CRMF_R_UNSUPPORTED_ALGORITHM 112 45 | # define CRMF_R_UNSUPPORTED_CIPHER 114 46 | # define CRMF_R_UNSUPPORTED_METHOD_FOR_CREATING_POPO 115 47 | # define CRMF_R_UNSUPPORTED_POPO_METHOD 116 48 | 49 | # endif 50 | #endif 51 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/cryptoerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_CRYPTOERR_H 12 | # define OPENSSL_CRYPTOERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * CRYPTO reason codes. 23 | */ 24 | # define CRYPTO_R_BAD_ALGORITHM_NAME 117 25 | # define CRYPTO_R_CONFLICTING_NAMES 118 26 | # define CRYPTO_R_HEX_STRING_TOO_SHORT 121 27 | # define CRYPTO_R_ILLEGAL_HEX_DIGIT 102 28 | # define CRYPTO_R_INSUFFICIENT_DATA_SPACE 106 29 | # define CRYPTO_R_INSUFFICIENT_PARAM_SIZE 107 30 | # define CRYPTO_R_INSUFFICIENT_SECURE_DATA_SPACE 108 31 | # define CRYPTO_R_INVALID_NEGATIVE_VALUE 122 32 | # define CRYPTO_R_INVALID_NULL_ARGUMENT 109 33 | # define CRYPTO_R_INVALID_OSSL_PARAM_TYPE 110 34 | # define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103 35 | # define CRYPTO_R_PROVIDER_ALREADY_EXISTS 104 36 | # define CRYPTO_R_PROVIDER_SECTION_ERROR 105 37 | # define CRYPTO_R_RANDOM_SECTION_ERROR 119 38 | # define CRYPTO_R_SECURE_MALLOC_FAILURE 111 39 | # define CRYPTO_R_STRING_TOO_LONG 112 40 | # define CRYPTO_R_TOO_MANY_BYTES 113 41 | # define CRYPTO_R_TOO_MANY_RECORDS 114 42 | # define CRYPTO_R_TOO_SMALL_BUFFER 116 43 | # define CRYPTO_R_UNKNOWN_NAME_IN_RANDOM_SECTION 120 44 | # define CRYPTO_R_ZERO_LENGTH_NUMBER 115 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/cterr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_CTERR_H 12 | # define OPENSSL_CTERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_CT 21 | 22 | 23 | /* 24 | * CT reason codes. 25 | */ 26 | # define CT_R_BASE64_DECODE_ERROR 108 27 | # define CT_R_INVALID_LOG_ID_LENGTH 100 28 | # define CT_R_LOG_CONF_INVALID 109 29 | # define CT_R_LOG_CONF_INVALID_KEY 110 30 | # define CT_R_LOG_CONF_MISSING_DESCRIPTION 111 31 | # define CT_R_LOG_CONF_MISSING_KEY 112 32 | # define CT_R_LOG_KEY_INVALID 113 33 | # define CT_R_SCT_FUTURE_TIMESTAMP 116 34 | # define CT_R_SCT_INVALID 104 35 | # define CT_R_SCT_INVALID_SIGNATURE 107 36 | # define CT_R_SCT_LIST_INVALID 105 37 | # define CT_R_SCT_LOG_ID_MISMATCH 114 38 | # define CT_R_SCT_NOT_SET 106 39 | # define CT_R_SCT_UNSUPPORTED_VERSION 115 40 | # define CT_R_UNRECOGNIZED_SIGNATURE_NID 101 41 | # define CT_R_UNSUPPORTED_ENTRY_TYPE 102 42 | # define CT_R_UNSUPPORTED_VERSION 103 43 | 44 | # endif 45 | #endif 46 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/decodererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_DECODERERR_H 12 | # define OPENSSL_DECODERERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OSSL_DECODER reason codes. 23 | */ 24 | # define OSSL_DECODER_R_COULD_NOT_DECODE_OBJECT 101 25 | # define OSSL_DECODER_R_DECODER_NOT_FOUND 102 26 | # define OSSL_DECODER_R_MISSING_GET_PARAMS 100 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/dherr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_DHERR_H 12 | # define OPENSSL_DHERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_DH 21 | 22 | 23 | /* 24 | * DH reason codes. 25 | */ 26 | # define DH_R_BAD_FFC_PARAMETERS 127 27 | # define DH_R_BAD_GENERATOR 101 28 | # define DH_R_BN_DECODE_ERROR 109 29 | # define DH_R_BN_ERROR 106 30 | # define DH_R_CHECK_INVALID_J_VALUE 115 31 | # define DH_R_CHECK_INVALID_Q_VALUE 116 32 | # define DH_R_CHECK_PUBKEY_INVALID 122 33 | # define DH_R_CHECK_PUBKEY_TOO_LARGE 123 34 | # define DH_R_CHECK_PUBKEY_TOO_SMALL 124 35 | # define DH_R_CHECK_P_NOT_PRIME 117 36 | # define DH_R_CHECK_P_NOT_SAFE_PRIME 118 37 | # define DH_R_CHECK_Q_NOT_PRIME 119 38 | # define DH_R_DECODE_ERROR 104 39 | # define DH_R_INVALID_PARAMETER_NAME 110 40 | # define DH_R_INVALID_PARAMETER_NID 114 41 | # define DH_R_INVALID_PUBKEY 102 42 | # define DH_R_INVALID_SECRET 128 43 | # define DH_R_KDF_PARAMETER_ERROR 112 44 | # define DH_R_KEYS_NOT_SET 108 45 | # define DH_R_MISSING_PUBKEY 125 46 | # define DH_R_MODULUS_TOO_LARGE 103 47 | # define DH_R_MODULUS_TOO_SMALL 126 48 | # define DH_R_NOT_SUITABLE_GENERATOR 120 49 | # define DH_R_NO_PARAMETERS_SET 107 50 | # define DH_R_NO_PRIVATE_VALUE 100 51 | # define DH_R_PARAMETER_ENCODING_ERROR 105 52 | # define DH_R_PEER_KEY_ERROR 111 53 | # define DH_R_Q_TOO_LARGE 130 54 | # define DH_R_SHARED_INFO_ERROR 113 55 | # define DH_R_UNABLE_TO_CHECK_GENERATOR 121 56 | 57 | # endif 58 | #endif 59 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/dsaerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_DSAERR_H 12 | # define OPENSSL_DSAERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_DSA 21 | 22 | 23 | /* 24 | * DSA reason codes. 25 | */ 26 | # define DSA_R_BAD_FFC_PARAMETERS 114 27 | # define DSA_R_BAD_Q_VALUE 102 28 | # define DSA_R_BN_DECODE_ERROR 108 29 | # define DSA_R_BN_ERROR 109 30 | # define DSA_R_DECODE_ERROR 104 31 | # define DSA_R_INVALID_DIGEST_TYPE 106 32 | # define DSA_R_INVALID_PARAMETERS 112 33 | # define DSA_R_MISSING_PARAMETERS 101 34 | # define DSA_R_MISSING_PRIVATE_KEY 111 35 | # define DSA_R_MODULUS_TOO_LARGE 103 36 | # define DSA_R_NO_PARAMETERS_SET 107 37 | # define DSA_R_PARAMETER_ENCODING_ERROR 105 38 | # define DSA_R_P_NOT_PRIME 115 39 | # define DSA_R_Q_NOT_PRIME 113 40 | # define DSA_R_SEED_LEN_SMALL 110 41 | # define DSA_R_TOO_MANY_RETRIES 116 42 | 43 | # endif 44 | #endif 45 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/dtls1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_DTLS1_H 11 | # define OPENSSL_DTLS1_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_DTLS1_H 17 | # endif 18 | 19 | # include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | #include 26 | 27 | /* DTLS*_VERSION constants are defined in prov_ssl.h */ 28 | # ifndef OPENSSL_NO_DEPRECATED_3_0 29 | # define DTLS_MIN_VERSION DTLS1_VERSION 30 | # define DTLS_MAX_VERSION DTLS1_2_VERSION 31 | # endif 32 | # define DTLS1_VERSION_MAJOR 0xFE 33 | 34 | /* Special value for method supporting multiple versions */ 35 | # define DTLS_ANY_VERSION 0x1FFFF 36 | 37 | /* lengths of messages */ 38 | 39 | # define DTLS1_COOKIE_LENGTH 255 40 | 41 | # define DTLS1_RT_HEADER_LENGTH 13 42 | 43 | # define DTLS1_HM_HEADER_LENGTH 12 44 | 45 | # define DTLS1_HM_BAD_FRAGMENT -2 46 | # define DTLS1_HM_FRAGMENT_RETRY -3 47 | 48 | # define DTLS1_CCS_HEADER_LENGTH 1 49 | 50 | # define DTLS1_AL_HEADER_LENGTH 2 51 | 52 | # define DTLS1_TMO_ALERT_COUNT 12 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | #endif 58 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_EBCDIC_H 11 | # define OPENSSL_EBCDIC_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_EBCDIC_H 17 | # endif 18 | 19 | # include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | /* Avoid name clashes with other applications */ 26 | # define os_toascii _openssl_os_toascii 27 | # define os_toebcdic _openssl_os_toebcdic 28 | # define ebcdic2ascii _openssl_ebcdic2ascii 29 | # define ascii2ebcdic _openssl_ascii2ebcdic 30 | 31 | extern const unsigned char os_toascii[256]; 32 | extern const unsigned char os_toebcdic[256]; 33 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 34 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | #endif 40 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/ecdsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/encodererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ENCODERERR_H 12 | # define OPENSSL_ENCODERERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OSSL_ENCODER reason codes. 23 | */ 24 | # define OSSL_ENCODER_R_ENCODER_NOT_FOUND 101 25 | # define OSSL_ENCODER_R_INCORRECT_PROPERTY_QUERY 100 26 | # define OSSL_ENCODER_R_MISSING_GET_PARAMS 102 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/engineerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ENGINEERR_H 12 | # define OPENSSL_ENGINEERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_ENGINE 21 | 22 | 23 | /* 24 | * ENGINE reason codes. 25 | */ 26 | # define ENGINE_R_ALREADY_LOADED 100 27 | # define ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER 133 28 | # define ENGINE_R_CMD_NOT_EXECUTABLE 134 29 | # define ENGINE_R_COMMAND_TAKES_INPUT 135 30 | # define ENGINE_R_COMMAND_TAKES_NO_INPUT 136 31 | # define ENGINE_R_CONFLICTING_ENGINE_ID 103 32 | # define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119 33 | # define ENGINE_R_DSO_FAILURE 104 34 | # define ENGINE_R_DSO_NOT_FOUND 132 35 | # define ENGINE_R_ENGINES_SECTION_ERROR 148 36 | # define ENGINE_R_ENGINE_CONFIGURATION_ERROR 102 37 | # define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105 38 | # define ENGINE_R_ENGINE_SECTION_ERROR 149 39 | # define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128 40 | # define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129 41 | # define ENGINE_R_FINISH_FAILED 106 42 | # define ENGINE_R_ID_OR_NAME_MISSING 108 43 | # define ENGINE_R_INIT_FAILED 109 44 | # define ENGINE_R_INTERNAL_LIST_ERROR 110 45 | # define ENGINE_R_INVALID_ARGUMENT 143 46 | # define ENGINE_R_INVALID_CMD_NAME 137 47 | # define ENGINE_R_INVALID_CMD_NUMBER 138 48 | # define ENGINE_R_INVALID_INIT_VALUE 151 49 | # define ENGINE_R_INVALID_STRING 150 50 | # define ENGINE_R_NOT_INITIALISED 117 51 | # define ENGINE_R_NOT_LOADED 112 52 | # define ENGINE_R_NO_CONTROL_FUNCTION 120 53 | # define ENGINE_R_NO_INDEX 144 54 | # define ENGINE_R_NO_LOAD_FUNCTION 125 55 | # define ENGINE_R_NO_REFERENCE 130 56 | # define ENGINE_R_NO_SUCH_ENGINE 116 57 | # define ENGINE_R_UNIMPLEMENTED_CIPHER 146 58 | # define ENGINE_R_UNIMPLEMENTED_DIGEST 147 59 | # define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101 60 | # define ENGINE_R_VERSION_INCOMPATIBILITY 145 61 | 62 | # endif 63 | #endif 64 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/esserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ESSERR_H 12 | # define OPENSSL_ESSERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | /* 20 | * ESS reason codes. 21 | */ 22 | # define ESS_R_EMPTY_ESS_CERT_ID_LIST 107 23 | # define ESS_R_ESS_CERT_DIGEST_ERROR 103 24 | # define ESS_R_ESS_CERT_ID_NOT_FOUND 104 25 | # define ESS_R_ESS_CERT_ID_WRONG_ORDER 105 26 | # define ESS_R_ESS_DIGEST_ALG_UNKNOWN 106 27 | # define ESS_R_ESS_SIGNING_CERTIFICATE_ERROR 102 28 | # define ESS_R_ESS_SIGNING_CERT_ADD_ERROR 100 29 | # define ESS_R_ESS_SIGNING_CERT_V2_ADD_ERROR 101 30 | # define ESS_R_MISSING_SIGNING_CERTIFICATE_ATTRIBUTE 108 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/fips_names.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_FIPS_NAMES_H 11 | # define OPENSSL_FIPS_NAMES_H 12 | # pragma once 13 | 14 | # ifdef __cplusplus 15 | extern "C" { 16 | # endif 17 | 18 | /* 19 | * Parameter names that the FIPS Provider defines 20 | */ 21 | 22 | /* 23 | * The calculated MAC of the module file (Used for FIPS Self Testing) 24 | * Type: OSSL_PARAM_UTF8_STRING 25 | */ 26 | # define OSSL_PROV_FIPS_PARAM_MODULE_MAC "module-mac" 27 | /* 28 | * A version number for the fips install process (Used for FIPS Self Testing) 29 | * Type: OSSL_PARAM_UTF8_STRING 30 | */ 31 | # define OSSL_PROV_FIPS_PARAM_INSTALL_VERSION "install-version" 32 | /* 33 | * The calculated MAC of the install status indicator (Used for FIPS Self Testing) 34 | * Type: OSSL_PARAM_UTF8_STRING 35 | */ 36 | # define OSSL_PROV_FIPS_PARAM_INSTALL_MAC "install-mac" 37 | /* 38 | * The install status indicator (Used for FIPS Self Testing) 39 | * Type: OSSL_PARAM_UTF8_STRING 40 | */ 41 | # define OSSL_PROV_FIPS_PARAM_INSTALL_STATUS "install-status" 42 | 43 | /* 44 | * A boolean that determines if the FIPS conditional test errors result in 45 | * the module entering an error state. 46 | * Type: OSSL_PARAM_UTF8_STRING 47 | */ 48 | # define OSSL_PROV_FIPS_PARAM_CONDITIONAL_ERRORS "conditional-errors" 49 | 50 | /* 51 | * A boolean that determines if the runtime FIPS security checks are performed. 52 | * Type: OSSL_PARAM_UTF8_STRING 53 | */ 54 | # define OSSL_PROV_FIPS_PARAM_SECURITY_CHECKS "security-checks" 55 | 56 | # ifdef __cplusplus 57 | } 58 | # endif 59 | 60 | #endif /* OPENSSL_FIPS_NAMES_H */ 61 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/fipskey.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/fipskey.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #ifndef OPENSSL_FIPSKEY_H 14 | # define OPENSSL_FIPSKEY_H 15 | # pragma once 16 | 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | /* 22 | * The FIPS validation HMAC key, usable as an array initializer. 23 | */ 24 | #define FIPS_KEY_ELEMENTS \ 25 | 0xf4, 0x55, 0x66, 0x50, 0xac, 0x31, 0xd3, 0x54, 0x61, 0x61, 0x0b, 0xac, 0x4e, 0xd8, 0x1b, 0x1a, 0x18, 0x1b, 0x2d, 0x8a, 0x43, 0xea, 0x28, 0x54, 0xcb, 0xae, 0x22, 0xca, 0x74, 0x56, 0x08, 0x13 26 | 27 | /* 28 | * The FIPS validation key, as a string. 29 | */ 30 | #define FIPS_KEY_STRING "f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813" 31 | 32 | # ifdef __cplusplus 33 | } 34 | # endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_HMAC_H 11 | # define OPENSSL_HMAC_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_HMAC_H 17 | # endif 18 | 19 | # include 20 | 21 | # include 22 | 23 | # ifndef OPENSSL_NO_DEPRECATED_3_0 24 | # define HMAC_MAX_MD_CBLOCK 200 /* Deprecated */ 25 | # endif 26 | 27 | # ifdef __cplusplus 28 | extern "C" { 29 | # endif 30 | 31 | # ifndef OPENSSL_NO_DEPRECATED_3_0 32 | OSSL_DEPRECATEDIN_3_0 size_t HMAC_size(const HMAC_CTX *e); 33 | OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void); 34 | OSSL_DEPRECATEDIN_3_0 int HMAC_CTX_reset(HMAC_CTX *ctx); 35 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx); 36 | # endif 37 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 38 | OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx, 39 | const void *key, int len, 40 | const EVP_MD *md); 41 | # endif 42 | # ifndef OPENSSL_NO_DEPRECATED_3_0 43 | OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 44 | const EVP_MD *md, ENGINE *impl); 45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, 46 | size_t len); 47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, 48 | unsigned int *len); 49 | OSSL_DEPRECATEDIN_3_0 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 50 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 51 | OSSL_DEPRECATEDIN_3_0 const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx); 52 | # endif 53 | 54 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 55 | const unsigned char *data, size_t data_len, 56 | unsigned char *md, unsigned int *md_len); 57 | 58 | # ifdef __cplusplus 59 | } 60 | # endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/httperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_HTTPERR_H 12 | # define OPENSSL_HTTPERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * HTTP reason codes. 23 | */ 24 | # define HTTP_R_ASN1_LEN_EXCEEDS_MAX_RESP_LEN 108 25 | # define HTTP_R_CONNECT_FAILURE 100 26 | # define HTTP_R_ERROR_PARSING_ASN1_LENGTH 109 27 | # define HTTP_R_ERROR_PARSING_CONTENT_LENGTH 119 28 | # define HTTP_R_ERROR_PARSING_URL 101 29 | # define HTTP_R_ERROR_RECEIVING 103 30 | # define HTTP_R_ERROR_SENDING 102 31 | # define HTTP_R_FAILED_READING_DATA 128 32 | # define HTTP_R_HEADER_PARSE_ERROR 126 33 | # define HTTP_R_INCONSISTENT_CONTENT_LENGTH 120 34 | # define HTTP_R_INVALID_PORT_NUMBER 123 35 | # define HTTP_R_INVALID_URL_PATH 125 36 | # define HTTP_R_INVALID_URL_SCHEME 124 37 | # define HTTP_R_MAX_RESP_LEN_EXCEEDED 117 38 | # define HTTP_R_MISSING_ASN1_ENCODING 110 39 | # define HTTP_R_MISSING_CONTENT_TYPE 121 40 | # define HTTP_R_MISSING_REDIRECT_LOCATION 111 41 | # define HTTP_R_RECEIVED_ERROR 105 42 | # define HTTP_R_RECEIVED_WRONG_HTTP_VERSION 106 43 | # define HTTP_R_REDIRECTION_FROM_HTTPS_TO_HTTP 112 44 | # define HTTP_R_REDIRECTION_NOT_ENABLED 116 45 | # define HTTP_R_RESPONSE_LINE_TOO_LONG 113 46 | # define HTTP_R_RESPONSE_PARSE_ERROR 104 47 | # define HTTP_R_RETRY_TIMEOUT 129 48 | # define HTTP_R_SERVER_CANCELED_CONNECTION 127 49 | # define HTTP_R_SOCK_NOT_SUPPORTED 122 50 | # define HTTP_R_STATUS_CODE_UNSUPPORTED 114 51 | # define HTTP_R_TLS_NOT_ENABLED 107 52 | # define HTTP_R_TOO_MANY_REDIRECTIONS 115 53 | # define HTTP_R_UNEXPECTED_CONTENT_TYPE 118 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/idea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_IDEA_H 11 | # define OPENSSL_IDEA_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_IDEA_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_IDEA 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define IDEA_BLOCK 8 27 | # define IDEA_KEY_LENGTH 16 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | 31 | typedef unsigned int IDEA_INT; 32 | 33 | # define IDEA_ENCRYPT 1 34 | # define IDEA_DECRYPT 0 35 | 36 | typedef struct idea_key_st { 37 | IDEA_INT data[9][6]; 38 | } IDEA_KEY_SCHEDULE; 39 | #endif 40 | #ifndef OPENSSL_NO_DEPRECATED_3_0 41 | OSSL_DEPRECATEDIN_3_0 const char *IDEA_options(void); 42 | OSSL_DEPRECATEDIN_3_0 void IDEA_ecb_encrypt(const unsigned char *in, 43 | unsigned char *out, 44 | IDEA_KEY_SCHEDULE *ks); 45 | OSSL_DEPRECATEDIN_3_0 void IDEA_set_encrypt_key(const unsigned char *key, 46 | IDEA_KEY_SCHEDULE *ks); 47 | OSSL_DEPRECATEDIN_3_0 void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, 48 | IDEA_KEY_SCHEDULE *dk); 49 | OSSL_DEPRECATEDIN_3_0 void IDEA_cbc_encrypt(const unsigned char *in, 50 | unsigned char *out, long length, 51 | IDEA_KEY_SCHEDULE *ks, 52 | unsigned char *iv, int enc); 53 | OSSL_DEPRECATEDIN_3_0 void IDEA_cfb64_encrypt(const unsigned char *in, 54 | unsigned char *out, long length, 55 | IDEA_KEY_SCHEDULE *ks, 56 | unsigned char *iv, int *num, 57 | int enc); 58 | OSSL_DEPRECATEDIN_3_0 void IDEA_ofb64_encrypt(const unsigned char *in, 59 | unsigned char *out, long length, 60 | IDEA_KEY_SCHEDULE *ks, 61 | unsigned char *iv, int *num); 62 | OSSL_DEPRECATEDIN_3_0 void IDEA_encrypt(unsigned long *in, 63 | IDEA_KEY_SCHEDULE *ks); 64 | #endif 65 | 66 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 67 | # define idea_options IDEA_options 68 | # define idea_ecb_encrypt IDEA_ecb_encrypt 69 | # define idea_set_encrypt_key IDEA_set_encrypt_key 70 | # define idea_set_decrypt_key IDEA_set_decrypt_key 71 | # define idea_cbc_encrypt IDEA_cbc_encrypt 72 | # define idea_cfb64_encrypt IDEA_cfb64_encrypt 73 | # define idea_ofb64_encrypt IDEA_ofb64_encrypt 74 | # define idea_encrypt IDEA_encrypt 75 | # endif 76 | 77 | # ifdef __cplusplus 78 | } 79 | # endif 80 | # endif 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/kdferr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_KDFERR_H 11 | # define OPENSSL_KDFERR_H 12 | # pragma once 13 | 14 | #include 15 | 16 | #endif /* !defined(OPENSSL_KDFERR_H) */ 17 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/md2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_MD2_H 11 | # define OPENSSL_MD2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_MD2_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_MD2 22 | # include 23 | # ifdef __cplusplus 24 | extern "C" { 25 | # endif 26 | 27 | # define MD2_DIGEST_LENGTH 16 28 | 29 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 30 | 31 | typedef unsigned char MD2_INT; 32 | 33 | # define MD2_BLOCK 16 34 | 35 | typedef struct MD2state_st { 36 | unsigned int num; 37 | unsigned char data[MD2_BLOCK]; 38 | MD2_INT cksm[MD2_BLOCK]; 39 | MD2_INT state[MD2_BLOCK]; 40 | } MD2_CTX; 41 | # endif 42 | # ifndef OPENSSL_NO_DEPRECATED_3_0 43 | OSSL_DEPRECATEDIN_3_0 const char *MD2_options(void); 44 | OSSL_DEPRECATEDIN_3_0 int MD2_Init(MD2_CTX *c); 45 | OSSL_DEPRECATEDIN_3_0 int MD2_Update(MD2_CTX *c, const unsigned char *data, 46 | size_t len); 47 | OSSL_DEPRECATEDIN_3_0 int MD2_Final(unsigned char *md, MD2_CTX *c); 48 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD2(const unsigned char *d, size_t n, 49 | unsigned char *md); 50 | # endif 51 | 52 | # ifdef __cplusplus 53 | } 54 | # endif 55 | # endif 56 | #endif 57 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_MD4_H 11 | # define OPENSSL_MD4_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_MD4_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_MD4 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | # define MD4_DIGEST_LENGTH 16 29 | 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | 32 | /*- 33 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 34 | * ! MD4_LONG has to be at least 32 bits wide. ! 35 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 36 | */ 37 | # define MD4_LONG unsigned int 38 | 39 | # define MD4_CBLOCK 64 40 | # define MD4_LBLOCK (MD4_CBLOCK/4) 41 | 42 | typedef struct MD4state_st { 43 | MD4_LONG A, B, C, D; 44 | MD4_LONG Nl, Nh; 45 | MD4_LONG data[MD4_LBLOCK]; 46 | unsigned int num; 47 | } MD4_CTX; 48 | # endif 49 | # ifndef OPENSSL_NO_DEPRECATED_3_0 50 | OSSL_DEPRECATEDIN_3_0 int MD4_Init(MD4_CTX *c); 51 | OSSL_DEPRECATEDIN_3_0 int MD4_Update(MD4_CTX *c, const void *data, size_t len); 52 | OSSL_DEPRECATEDIN_3_0 int MD4_Final(unsigned char *md, MD4_CTX *c); 53 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD4(const unsigned char *d, size_t n, 54 | unsigned char *md); 55 | OSSL_DEPRECATEDIN_3_0 void MD4_Transform(MD4_CTX *c, const unsigned char *b); 56 | # endif 57 | 58 | # ifdef __cplusplus 59 | } 60 | # endif 61 | # endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_MD5_H 11 | # define OPENSSL_MD5_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_MD5_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_MD5 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | # define MD5_DIGEST_LENGTH 16 29 | 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | /* 32 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 33 | * ! MD5_LONG has to be at least 32 bits wide. ! 34 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 35 | */ 36 | # define MD5_LONG unsigned int 37 | 38 | # define MD5_CBLOCK 64 39 | # define MD5_LBLOCK (MD5_CBLOCK/4) 40 | 41 | typedef struct MD5state_st { 42 | MD5_LONG A, B, C, D; 43 | MD5_LONG Nl, Nh; 44 | MD5_LONG data[MD5_LBLOCK]; 45 | unsigned int num; 46 | } MD5_CTX; 47 | # endif 48 | # ifndef OPENSSL_NO_DEPRECATED_3_0 49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c); 50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len); 51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c); 52 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n, 53 | unsigned char *md); 54 | OSSL_DEPRECATEDIN_3_0 void MD5_Transform(MD5_CTX *c, const unsigned char *b); 55 | # endif 56 | 57 | # ifdef __cplusplus 58 | } 59 | # endif 60 | # endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/mdc2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_MDC2_H 11 | # define OPENSSL_MDC2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_MDC2_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_MDC2 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | # define MDC2_DIGEST_LENGTH 16 29 | 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | 32 | # define MDC2_BLOCK 8 33 | 34 | typedef struct mdc2_ctx_st { 35 | unsigned int num; 36 | unsigned char data[MDC2_BLOCK]; 37 | DES_cblock h, hh; 38 | unsigned int pad_type; /* either 1 or 2, default 1 */ 39 | } MDC2_CTX; 40 | # endif 41 | # ifndef OPENSSL_NO_DEPRECATED_3_0 42 | OSSL_DEPRECATEDIN_3_0 int MDC2_Init(MDC2_CTX *c); 43 | OSSL_DEPRECATEDIN_3_0 int MDC2_Update(MDC2_CTX *c, const unsigned char *data, 44 | size_t len); 45 | OSSL_DEPRECATEDIN_3_0 int MDC2_Final(unsigned char *md, MDC2_CTX *c); 46 | OSSL_DEPRECATEDIN_3_0 unsigned char *MDC2(const unsigned char *d, size_t n, 47 | unsigned char *md); 48 | # endif 49 | 50 | # ifdef __cplusplus 51 | } 52 | # endif 53 | # endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/objectserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_OBJECTSERR_H 12 | # define OPENSSL_OBJECTSERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OBJ reason codes. 23 | */ 24 | # define OBJ_R_OID_EXISTS 102 25 | # define OBJ_R_UNKNOWN_NID 101 26 | # define OBJ_R_UNKNOWN_OBJECT_NAME 103 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/ocsperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_OCSPERR_H 12 | # define OPENSSL_OCSPERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_OCSP 21 | 22 | 23 | /* 24 | * OCSP reason codes. 25 | */ 26 | # define OCSP_R_CERTIFICATE_VERIFY_ERROR 101 27 | # define OCSP_R_DIGEST_ERR 102 28 | # define OCSP_R_DIGEST_NAME_ERR 106 29 | # define OCSP_R_DIGEST_SIZE_ERR 107 30 | # define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD 122 31 | # define OCSP_R_ERROR_IN_THISUPDATE_FIELD 123 32 | # define OCSP_R_MISSING_OCSPSIGNING_USAGE 103 33 | # define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE 124 34 | # define OCSP_R_NOT_BASIC_RESPONSE 104 35 | # define OCSP_R_NO_CERTIFICATES_IN_CHAIN 105 36 | # define OCSP_R_NO_RESPONSE_DATA 108 37 | # define OCSP_R_NO_REVOKED_TIME 109 38 | # define OCSP_R_NO_SIGNER_KEY 130 39 | # define OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 110 40 | # define OCSP_R_REQUEST_NOT_SIGNED 128 41 | # define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA 111 42 | # define OCSP_R_ROOT_CA_NOT_TRUSTED 112 43 | # define OCSP_R_SIGNATURE_FAILURE 117 44 | # define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND 118 45 | # define OCSP_R_STATUS_EXPIRED 125 46 | # define OCSP_R_STATUS_NOT_YET_VALID 126 47 | # define OCSP_R_STATUS_TOO_OLD 127 48 | # define OCSP_R_UNKNOWN_MESSAGE_DIGEST 119 49 | # define OCSP_R_UNKNOWN_NID 120 50 | # define OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE 129 51 | 52 | # endif 53 | #endif 54 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/opensslconf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_OPENSSLCONF_H 11 | # define OPENSSL_OPENSSLCONF_H 12 | # pragma once 13 | 14 | # include 15 | # include 16 | 17 | #endif /* OPENSSL_OPENSSLCONF_H */ 18 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/opensslv.h.in 4 | * 5 | * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #ifndef OPENSSL_OPENSSLV_H 14 | # define OPENSSL_OPENSSLV_H 15 | # pragma once 16 | 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | /* 22 | * SECTION 1: VERSION DATA. These will change for each release 23 | */ 24 | 25 | /* 26 | * Base version macros 27 | * 28 | * These macros express version number MAJOR.MINOR.PATCH exactly 29 | */ 30 | # define OPENSSL_VERSION_MAJOR 3 31 | # define OPENSSL_VERSION_MINOR 0 32 | # define OPENSSL_VERSION_PATCH 15 33 | 34 | /* 35 | * Additional version information 36 | * 37 | * These are also part of the new version scheme, but aren't part 38 | * of the version number itself. 39 | */ 40 | 41 | /* Could be: #define OPENSSL_VERSION_PRE_RELEASE "-alpha.1" */ 42 | # define OPENSSL_VERSION_PRE_RELEASE "" 43 | /* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+fips" */ 44 | /* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+vendor.1" */ 45 | # define OPENSSL_VERSION_BUILD_METADATA "" 46 | 47 | /* 48 | * Note: The OpenSSL Project will never define OPENSSL_VERSION_BUILD_METADATA 49 | * to be anything but the empty string. Its use is entirely reserved for 50 | * others 51 | */ 52 | 53 | /* 54 | * Shared library version 55 | * 56 | * This is strictly to express ABI version, which may or may not 57 | * be related to the API version expressed with the macros above. 58 | * This is defined in free form. 59 | */ 60 | # define OPENSSL_SHLIB_VERSION 3 61 | 62 | /* 63 | * SECTION 2: USEFUL MACROS 64 | */ 65 | 66 | /* For checking general API compatibility when preprocessing */ 67 | # define OPENSSL_VERSION_PREREQ(maj,min) \ 68 | ((OPENSSL_VERSION_MAJOR << 16) + OPENSSL_VERSION_MINOR >= ((maj) << 16) + (min)) 69 | 70 | /* 71 | * Macros to get the version in easily digested string form, both the short 72 | * "MAJOR.MINOR.PATCH" variant (where MAJOR, MINOR and PATCH are replaced 73 | * with the values from the corresponding OPENSSL_VERSION_ macros) and the 74 | * longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and 75 | * OPENSSL_VERSION_BUILD_METADATA_STR appended. 76 | */ 77 | # define OPENSSL_VERSION_STR "3.0.15" 78 | # define OPENSSL_FULL_VERSION_STR "3.0.15" 79 | 80 | /* 81 | * SECTION 3: ADDITIONAL METADATA 82 | * 83 | * These strings are defined separately to allow them to be parsable. 84 | */ 85 | # define OPENSSL_RELEASE_DATE "3 Sep 2024" 86 | 87 | /* 88 | * SECTION 4: BACKWARD COMPATIBILITY 89 | */ 90 | 91 | # define OPENSSL_VERSION_TEXT "OpenSSL 3.0.15 3 Sep 2024" 92 | 93 | /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */ 94 | # ifdef OPENSSL_VERSION_PRE_RELEASE 95 | # define _OPENSSL_VERSION_PRE_RELEASE 0x0L 96 | # else 97 | # define _OPENSSL_VERSION_PRE_RELEASE 0xfL 98 | # endif 99 | # define OPENSSL_VERSION_NUMBER \ 100 | ( (OPENSSL_VERSION_MAJOR<<28) \ 101 | |(OPENSSL_VERSION_MINOR<<20) \ 102 | |(OPENSSL_VERSION_PATCH<<4) \ 103 | |_OPENSSL_VERSION_PRE_RELEASE ) 104 | 105 | # ifdef __cplusplus 106 | } 107 | # endif 108 | 109 | # include 110 | # ifndef OPENSSL_NO_DEPRECATED_3_0 111 | # define HEADER_OPENSSLV_H 112 | # endif 113 | 114 | #endif /* OPENSSL_OPENSSLV_H */ 115 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/ossl_typ.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * The original was renamed to 12 | * 13 | * This header file only exists for compatibility reasons with older 14 | * applications which #include . 15 | */ 16 | # include 17 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/param_build.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_PARAM_BUILD_H 12 | # define OPENSSL_PARAM_BUILD_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | OSSL_PARAM_BLD *OSSL_PARAM_BLD_new(void); 23 | OSSL_PARAM *OSSL_PARAM_BLD_to_param(OSSL_PARAM_BLD *bld); 24 | void OSSL_PARAM_BLD_free(OSSL_PARAM_BLD *bld); 25 | 26 | int OSSL_PARAM_BLD_push_int(OSSL_PARAM_BLD *bld, const char *key, int val); 27 | int OSSL_PARAM_BLD_push_uint(OSSL_PARAM_BLD *bld, const char *key, 28 | unsigned int val); 29 | int OSSL_PARAM_BLD_push_long(OSSL_PARAM_BLD *bld, const char *key, 30 | long int val); 31 | int OSSL_PARAM_BLD_push_ulong(OSSL_PARAM_BLD *bld, const char *key, 32 | unsigned long int val); 33 | int OSSL_PARAM_BLD_push_int32(OSSL_PARAM_BLD *bld, const char *key, 34 | int32_t val); 35 | int OSSL_PARAM_BLD_push_uint32(OSSL_PARAM_BLD *bld, const char *key, 36 | uint32_t val); 37 | int OSSL_PARAM_BLD_push_int64(OSSL_PARAM_BLD *bld, const char *key, 38 | int64_t val); 39 | int OSSL_PARAM_BLD_push_uint64(OSSL_PARAM_BLD *bld, const char *key, 40 | uint64_t val); 41 | int OSSL_PARAM_BLD_push_size_t(OSSL_PARAM_BLD *bld, const char *key, 42 | size_t val); 43 | int OSSL_PARAM_BLD_push_time_t(OSSL_PARAM_BLD *bld, const char *key, 44 | time_t val); 45 | int OSSL_PARAM_BLD_push_double(OSSL_PARAM_BLD *bld, const char *key, 46 | double val); 47 | int OSSL_PARAM_BLD_push_BN(OSSL_PARAM_BLD *bld, const char *key, 48 | const BIGNUM *bn); 49 | int OSSL_PARAM_BLD_push_BN_pad(OSSL_PARAM_BLD *bld, const char *key, 50 | const BIGNUM *bn, size_t sz); 51 | int OSSL_PARAM_BLD_push_utf8_string(OSSL_PARAM_BLD *bld, const char *key, 52 | const char *buf, size_t bsize); 53 | int OSSL_PARAM_BLD_push_utf8_ptr(OSSL_PARAM_BLD *bld, const char *key, 54 | char *buf, size_t bsize); 55 | int OSSL_PARAM_BLD_push_octet_string(OSSL_PARAM_BLD *bld, const char *key, 56 | const void *buf, size_t bsize); 57 | int OSSL_PARAM_BLD_push_octet_ptr(OSSL_PARAM_BLD *bld, const char *key, 58 | void *buf, size_t bsize); 59 | 60 | # ifdef __cplusplus 61 | } 62 | # endif 63 | #endif /* OPENSSL_PARAM_BUILD_H */ 64 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_PEM2_H 11 | # define OPENSSL_PEM2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_PEM2_H 17 | # endif 18 | # include 19 | #endif 20 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/pemerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_PEMERR_H 12 | # define OPENSSL_PEMERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * PEM reason codes. 23 | */ 24 | # define PEM_R_BAD_BASE64_DECODE 100 25 | # define PEM_R_BAD_DECRYPT 101 26 | # define PEM_R_BAD_END_LINE 102 27 | # define PEM_R_BAD_IV_CHARS 103 28 | # define PEM_R_BAD_MAGIC_NUMBER 116 29 | # define PEM_R_BAD_PASSWORD_READ 104 30 | # define PEM_R_BAD_VERSION_NUMBER 117 31 | # define PEM_R_BIO_WRITE_FAILURE 118 32 | # define PEM_R_CIPHER_IS_NULL 127 33 | # define PEM_R_ERROR_CONVERTING_PRIVATE_KEY 115 34 | # define PEM_R_EXPECTING_DSS_KEY_BLOB 131 35 | # define PEM_R_EXPECTING_PRIVATE_KEY_BLOB 119 36 | # define PEM_R_EXPECTING_PUBLIC_KEY_BLOB 120 37 | # define PEM_R_EXPECTING_RSA_KEY_BLOB 132 38 | # define PEM_R_HEADER_TOO_LONG 128 39 | # define PEM_R_INCONSISTENT_HEADER 121 40 | # define PEM_R_KEYBLOB_HEADER_PARSE_ERROR 122 41 | # define PEM_R_KEYBLOB_TOO_SHORT 123 42 | # define PEM_R_MISSING_DEK_IV 129 43 | # define PEM_R_NOT_DEK_INFO 105 44 | # define PEM_R_NOT_ENCRYPTED 106 45 | # define PEM_R_NOT_PROC_TYPE 107 46 | # define PEM_R_NO_START_LINE 108 47 | # define PEM_R_PROBLEMS_GETTING_PASSWORD 109 48 | # define PEM_R_PVK_DATA_TOO_SHORT 124 49 | # define PEM_R_PVK_TOO_SHORT 125 50 | # define PEM_R_READ_KEY 111 51 | # define PEM_R_SHORT_HEADER 112 52 | # define PEM_R_UNEXPECTED_DEK_IV 130 53 | # define PEM_R_UNSUPPORTED_CIPHER 113 54 | # define PEM_R_UNSUPPORTED_ENCRYPTION 114 55 | # define PEM_R_UNSUPPORTED_KEY_COMPONENTS 126 56 | # define PEM_R_UNSUPPORTED_PUBLIC_KEY_TYPE 110 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/pkcs12err.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_PKCS12ERR_H 12 | # define OPENSSL_PKCS12ERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * PKCS12 reason codes. 23 | */ 24 | # define PKCS12_R_CANT_PACK_STRUCTURE 100 25 | # define PKCS12_R_CONTENT_TYPE_NOT_DATA 121 26 | # define PKCS12_R_DECODE_ERROR 101 27 | # define PKCS12_R_ENCODE_ERROR 102 28 | # define PKCS12_R_ENCRYPT_ERROR 103 29 | # define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE 120 30 | # define PKCS12_R_INVALID_NULL_ARGUMENT 104 31 | # define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105 32 | # define PKCS12_R_INVALID_TYPE 112 33 | # define PKCS12_R_IV_GEN_ERROR 106 34 | # define PKCS12_R_KEY_GEN_ERROR 107 35 | # define PKCS12_R_MAC_ABSENT 108 36 | # define PKCS12_R_MAC_GENERATION_ERROR 109 37 | # define PKCS12_R_MAC_SETUP_ERROR 110 38 | # define PKCS12_R_MAC_STRING_SET_ERROR 111 39 | # define PKCS12_R_MAC_VERIFY_FAILURE 113 40 | # define PKCS12_R_PARSE_ERROR 114 41 | # define PKCS12_R_PKCS12_CIPHERFINAL_ERROR 116 42 | # define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM 118 43 | # define PKCS12_R_UNSUPPORTED_PKCS12_MODE 119 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/pkcs7err.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_PKCS7ERR_H 12 | # define OPENSSL_PKCS7ERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * PKCS7 reason codes. 23 | */ 24 | # define PKCS7_R_CERTIFICATE_VERIFY_ERROR 117 25 | # define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 144 26 | # define PKCS7_R_CIPHER_NOT_INITIALIZED 116 27 | # define PKCS7_R_CONTENT_AND_DATA_PRESENT 118 28 | # define PKCS7_R_CTRL_ERROR 152 29 | # define PKCS7_R_DECRYPT_ERROR 119 30 | # define PKCS7_R_DIGEST_FAILURE 101 31 | # define PKCS7_R_ENCRYPTION_CTRL_FAILURE 149 32 | # define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 150 33 | # define PKCS7_R_ERROR_ADDING_RECIPIENT 120 34 | # define PKCS7_R_ERROR_SETTING_CIPHER 121 35 | # define PKCS7_R_INVALID_NULL_POINTER 143 36 | # define PKCS7_R_INVALID_SIGNED_DATA_TYPE 155 37 | # define PKCS7_R_NO_CONTENT 122 38 | # define PKCS7_R_NO_DEFAULT_DIGEST 151 39 | # define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND 154 40 | # define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE 115 41 | # define PKCS7_R_NO_SIGNATURES_ON_DATA 123 42 | # define PKCS7_R_NO_SIGNERS 142 43 | # define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE 104 44 | # define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR 124 45 | # define PKCS7_R_PKCS7_ADD_SIGNER_ERROR 153 46 | # define PKCS7_R_PKCS7_DATASIGN 145 47 | # define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 127 48 | # define PKCS7_R_SIGNATURE_FAILURE 105 49 | # define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND 128 50 | # define PKCS7_R_SIGNING_CTRL_FAILURE 147 51 | # define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 148 52 | # define PKCS7_R_SMIME_TEXT_ERROR 129 53 | # define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE 106 54 | # define PKCS7_R_UNABLE_TO_FIND_MEM_BIO 107 55 | # define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST 108 56 | # define PKCS7_R_UNKNOWN_DIGEST_TYPE 109 57 | # define PKCS7_R_UNKNOWN_OPERATION 110 58 | # define PKCS7_R_UNSUPPORTED_CIPHER_TYPE 111 59 | # define PKCS7_R_UNSUPPORTED_CONTENT_TYPE 112 60 | # define PKCS7_R_WRONG_CONTENT_TYPE 113 61 | # define PKCS7_R_WRONG_PKCS7_TYPE 114 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/prov_ssl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_PROV_SSL_H 11 | # define OPENSSL_PROV_SSL_H 12 | # pragma once 13 | 14 | # ifdef __cplusplus 15 | extern "C" { 16 | # endif 17 | 18 | /* SSL/TLS related defines useful to providers */ 19 | 20 | # define SSL_MAX_MASTER_KEY_LENGTH 48 21 | 22 | # define SSL3_VERSION 0x0300 23 | # define TLS1_VERSION 0x0301 24 | # define TLS1_1_VERSION 0x0302 25 | # define TLS1_2_VERSION 0x0303 26 | # define TLS1_3_VERSION 0x0304 27 | # define DTLS1_VERSION 0xFEFF 28 | # define DTLS1_2_VERSION 0xFEFD 29 | # define DTLS1_BAD_VER 0x0100 30 | 31 | # ifdef __cplusplus 32 | } 33 | # endif 34 | #endif /* OPENSSL_PROV_SSL_H */ 35 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/provider.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_PROVIDER_H 11 | # define OPENSSL_PROVIDER_H 12 | # pragma once 13 | 14 | # include 15 | 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | /* Set the default provider search path */ 21 | int OSSL_PROVIDER_set_default_search_path(OSSL_LIB_CTX *, const char *path); 22 | 23 | /* Load and unload a provider */ 24 | OSSL_PROVIDER *OSSL_PROVIDER_load(OSSL_LIB_CTX *, const char *name); 25 | OSSL_PROVIDER *OSSL_PROVIDER_try_load(OSSL_LIB_CTX *, const char *name, 26 | int retain_fallbacks); 27 | int OSSL_PROVIDER_unload(OSSL_PROVIDER *prov); 28 | int OSSL_PROVIDER_available(OSSL_LIB_CTX *, const char *name); 29 | int OSSL_PROVIDER_do_all(OSSL_LIB_CTX *ctx, 30 | int (*cb)(OSSL_PROVIDER *provider, void *cbdata), 31 | void *cbdata); 32 | 33 | const OSSL_PARAM *OSSL_PROVIDER_gettable_params(const OSSL_PROVIDER *prov); 34 | int OSSL_PROVIDER_get_params(const OSSL_PROVIDER *prov, OSSL_PARAM params[]); 35 | int OSSL_PROVIDER_self_test(const OSSL_PROVIDER *prov); 36 | int OSSL_PROVIDER_get_capabilities(const OSSL_PROVIDER *prov, 37 | const char *capability, 38 | OSSL_CALLBACK *cb, 39 | void *arg); 40 | 41 | const OSSL_ALGORITHM *OSSL_PROVIDER_query_operation(const OSSL_PROVIDER *prov, 42 | int operation_id, 43 | int *no_cache); 44 | void OSSL_PROVIDER_unquery_operation(const OSSL_PROVIDER *prov, 45 | int operation_id, const OSSL_ALGORITHM *algs); 46 | void *OSSL_PROVIDER_get0_provider_ctx(const OSSL_PROVIDER *prov); 47 | const OSSL_DISPATCH *OSSL_PROVIDER_get0_dispatch(const OSSL_PROVIDER *prov); 48 | 49 | /* Add a built in providers */ 50 | int OSSL_PROVIDER_add_builtin(OSSL_LIB_CTX *, const char *name, 51 | OSSL_provider_init_fn *init_fn); 52 | 53 | /* Information */ 54 | const char *OSSL_PROVIDER_get0_name(const OSSL_PROVIDER *prov); 55 | 56 | # ifdef __cplusplus 57 | } 58 | # endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/randerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_RANDERR_H 12 | # define OPENSSL_RANDERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * RAND reason codes. 23 | */ 24 | # define RAND_R_ADDITIONAL_INPUT_TOO_LONG 102 25 | # define RAND_R_ALREADY_INSTANTIATED 103 26 | # define RAND_R_ARGUMENT_OUT_OF_RANGE 105 27 | # define RAND_R_CANNOT_OPEN_FILE 121 28 | # define RAND_R_DRBG_ALREADY_INITIALIZED 129 29 | # define RAND_R_DRBG_NOT_INITIALISED 104 30 | # define RAND_R_ENTROPY_INPUT_TOO_LONG 106 31 | # define RAND_R_ENTROPY_OUT_OF_RANGE 124 32 | # define RAND_R_ERROR_ENTROPY_POOL_WAS_IGNORED 127 33 | # define RAND_R_ERROR_INITIALISING_DRBG 107 34 | # define RAND_R_ERROR_INSTANTIATING_DRBG 108 35 | # define RAND_R_ERROR_RETRIEVING_ADDITIONAL_INPUT 109 36 | # define RAND_R_ERROR_RETRIEVING_ENTROPY 110 37 | # define RAND_R_ERROR_RETRIEVING_NONCE 111 38 | # define RAND_R_FAILED_TO_CREATE_LOCK 126 39 | # define RAND_R_FUNC_NOT_IMPLEMENTED 101 40 | # define RAND_R_FWRITE_ERROR 123 41 | # define RAND_R_GENERATE_ERROR 112 42 | # define RAND_R_INSUFFICIENT_DRBG_STRENGTH 139 43 | # define RAND_R_INTERNAL_ERROR 113 44 | # define RAND_R_IN_ERROR_STATE 114 45 | # define RAND_R_NOT_A_REGULAR_FILE 122 46 | # define RAND_R_NOT_INSTANTIATED 115 47 | # define RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED 128 48 | # define RAND_R_PARENT_LOCKING_NOT_ENABLED 130 49 | # define RAND_R_PARENT_STRENGTH_TOO_WEAK 131 50 | # define RAND_R_PERSONALISATION_STRING_TOO_LONG 116 51 | # define RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED 133 52 | # define RAND_R_PRNG_NOT_SEEDED 100 53 | # define RAND_R_RANDOM_POOL_OVERFLOW 125 54 | # define RAND_R_RANDOM_POOL_UNDERFLOW 134 55 | # define RAND_R_REQUEST_TOO_LARGE_FOR_DRBG 117 56 | # define RAND_R_RESEED_ERROR 118 57 | # define RAND_R_SELFTEST_FAILURE 119 58 | # define RAND_R_TOO_LITTLE_NONCE_REQUESTED 135 59 | # define RAND_R_TOO_MUCH_NONCE_REQUESTED 136 60 | # define RAND_R_UNABLE_TO_CREATE_DRBG 143 61 | # define RAND_R_UNABLE_TO_FETCH_DRBG 144 62 | # define RAND_R_UNABLE_TO_GET_PARENT_RESEED_PROP_COUNTER 141 63 | # define RAND_R_UNABLE_TO_GET_PARENT_STRENGTH 138 64 | # define RAND_R_UNABLE_TO_LOCK_PARENT 140 65 | # define RAND_R_UNSUPPORTED_DRBG_FLAGS 132 66 | # define RAND_R_UNSUPPORTED_DRBG_TYPE 120 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_RC2_H 11 | # define OPENSSL_RC2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RC2_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_RC2 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define RC2_BLOCK 8 27 | # define RC2_KEY_LENGTH 16 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | typedef unsigned int RC2_INT; 31 | 32 | # define RC2_ENCRYPT 1 33 | # define RC2_DECRYPT 0 34 | 35 | typedef struct rc2_key_st { 36 | RC2_INT data[64]; 37 | } RC2_KEY; 38 | # endif 39 | # ifndef OPENSSL_NO_DEPRECATED_3_0 40 | OSSL_DEPRECATEDIN_3_0 void RC2_set_key(RC2_KEY *key, int len, 41 | const unsigned char *data, int bits); 42 | OSSL_DEPRECATEDIN_3_0 void RC2_ecb_encrypt(const unsigned char *in, 43 | unsigned char *out, RC2_KEY *key, 44 | int enc); 45 | OSSL_DEPRECATEDIN_3_0 void RC2_encrypt(unsigned long *data, RC2_KEY *key); 46 | OSSL_DEPRECATEDIN_3_0 void RC2_decrypt(unsigned long *data, RC2_KEY *key); 47 | OSSL_DEPRECATEDIN_3_0 void RC2_cbc_encrypt(const unsigned char *in, 48 | unsigned char *out, long length, 49 | RC2_KEY *ks, unsigned char *iv, 50 | int enc); 51 | OSSL_DEPRECATEDIN_3_0 void RC2_cfb64_encrypt(const unsigned char *in, 52 | unsigned char *out, long length, 53 | RC2_KEY *schedule, 54 | unsigned char *ivec, 55 | int *num, int enc); 56 | OSSL_DEPRECATEDIN_3_0 void RC2_ofb64_encrypt(const unsigned char *in, 57 | unsigned char *out, long length, 58 | RC2_KEY *schedule, 59 | unsigned char *ivec, 60 | int *num); 61 | # endif 62 | 63 | # ifdef __cplusplus 64 | } 65 | # endif 66 | # endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_RC4_H 11 | # define OPENSSL_RC4_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RC4_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_RC4 22 | # include 23 | # ifdef __cplusplus 24 | extern "C" { 25 | # endif 26 | 27 | # ifndef OPENSSL_NO_DEPRECATED_3_0 28 | typedef struct rc4_key_st { 29 | RC4_INT x, y; 30 | RC4_INT data[256]; 31 | } RC4_KEY; 32 | # endif 33 | # ifndef OPENSSL_NO_DEPRECATED_3_0 34 | OSSL_DEPRECATEDIN_3_0 const char *RC4_options(void); 35 | OSSL_DEPRECATEDIN_3_0 void RC4_set_key(RC4_KEY *key, int len, 36 | const unsigned char *data); 37 | OSSL_DEPRECATEDIN_3_0 void RC4(RC4_KEY *key, size_t len, 38 | const unsigned char *indata, 39 | unsigned char *outdata); 40 | # endif 41 | 42 | # ifdef __cplusplus 43 | } 44 | # endif 45 | # endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/rc5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_RC5_H 11 | # define OPENSSL_RC5_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RC5_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_RC5 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define RC5_32_BLOCK 8 27 | # define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */ 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | # define RC5_ENCRYPT 1 31 | # define RC5_DECRYPT 0 32 | 33 | # define RC5_32_INT unsigned int 34 | 35 | /* 36 | * This are the only values supported. Tweak the code if you want more The 37 | * most supported modes will be RC5-32/12/16 RC5-32/16/8 38 | */ 39 | # define RC5_8_ROUNDS 8 40 | # define RC5_12_ROUNDS 12 41 | # define RC5_16_ROUNDS 16 42 | 43 | typedef struct rc5_key_st { 44 | /* Number of rounds */ 45 | int rounds; 46 | RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)]; 47 | } RC5_32_KEY; 48 | # endif 49 | # ifndef OPENSSL_NO_DEPRECATED_3_0 50 | OSSL_DEPRECATEDIN_3_0 int RC5_32_set_key(RC5_32_KEY *key, int len, 51 | const unsigned char *data, 52 | int rounds); 53 | OSSL_DEPRECATEDIN_3_0 void RC5_32_ecb_encrypt(const unsigned char *in, 54 | unsigned char *out, 55 | RC5_32_KEY *key, 56 | int enc); 57 | OSSL_DEPRECATEDIN_3_0 void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key); 58 | OSSL_DEPRECATEDIN_3_0 void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key); 59 | OSSL_DEPRECATEDIN_3_0 void RC5_32_cbc_encrypt(const unsigned char *in, 60 | unsigned char *out, long length, 61 | RC5_32_KEY *ks, unsigned char *iv, 62 | int enc); 63 | OSSL_DEPRECATEDIN_3_0 void RC5_32_cfb64_encrypt(const unsigned char *in, 64 | unsigned char *out, long length, 65 | RC5_32_KEY *schedule, 66 | unsigned char *ivec, int *num, 67 | int enc); 68 | OSSL_DEPRECATEDIN_3_0 void RC5_32_ofb64_encrypt(const unsigned char *in, 69 | unsigned char *out, long length, 70 | RC5_32_KEY *schedule, 71 | unsigned char *ivec, int *num); 72 | # endif 73 | 74 | # ifdef __cplusplus 75 | } 76 | # endif 77 | # endif 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_RIPEMD_H 11 | # define OPENSSL_RIPEMD_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RIPEMD_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_RMD160 22 | # include 23 | # include 24 | 25 | # define RIPEMD160_DIGEST_LENGTH 20 26 | 27 | # ifdef __cplusplus 28 | extern "C" { 29 | # endif 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | 32 | # define RIPEMD160_LONG unsigned int 33 | 34 | # define RIPEMD160_CBLOCK 64 35 | # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 36 | 37 | typedef struct RIPEMD160state_st { 38 | RIPEMD160_LONG A, B, C, D, E; 39 | RIPEMD160_LONG Nl, Nh; 40 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 41 | unsigned int num; 42 | } RIPEMD160_CTX; 43 | # endif 44 | # ifndef OPENSSL_NO_DEPRECATED_3_0 45 | OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Init(RIPEMD160_CTX *c); 46 | OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, 47 | size_t len); 48 | OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 49 | OSSL_DEPRECATEDIN_3_0 unsigned char *RIPEMD160(const unsigned char *d, size_t n, 50 | unsigned char *md); 51 | OSSL_DEPRECATEDIN_3_0 void RIPEMD160_Transform(RIPEMD160_CTX *c, 52 | const unsigned char *b); 53 | # endif 54 | 55 | # ifdef __cplusplus 56 | } 57 | # endif 58 | # endif 59 | #endif 60 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/srtp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * DTLS code by Eric Rescorla 12 | * 13 | * Copyright (C) 2006, Network Resonance, Inc. Copyright (C) 2011, RTFM, Inc. 14 | */ 15 | 16 | #ifndef OPENSSL_SRTP_H 17 | # define OPENSSL_SRTP_H 18 | # pragma once 19 | 20 | # include 21 | # ifndef OPENSSL_NO_DEPRECATED_3_0 22 | # define HEADER_D1_SRTP_H 23 | # endif 24 | 25 | # include 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | # define SRTP_AES128_CM_SHA1_80 0x0001 32 | # define SRTP_AES128_CM_SHA1_32 0x0002 33 | # define SRTP_AES128_F8_SHA1_80 0x0003 34 | # define SRTP_AES128_F8_SHA1_32 0x0004 35 | # define SRTP_NULL_SHA1_80 0x0005 36 | # define SRTP_NULL_SHA1_32 0x0006 37 | 38 | /* AEAD SRTP protection profiles from RFC 7714 */ 39 | # define SRTP_AEAD_AES_128_GCM 0x0007 40 | # define SRTP_AEAD_AES_256_GCM 0x0008 41 | 42 | # ifndef OPENSSL_NO_SRTP 43 | 44 | __owur int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); 45 | __owur int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles); 46 | 47 | __owur STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); 48 | __owur SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); 49 | 50 | # endif 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/ssl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_SSL2_H 11 | # define OPENSSL_SSL2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_SSL2_H 17 | # endif 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | # define SSL2_VERSION 0x0002 24 | 25 | # define SSL2_MT_CLIENT_HELLO 1 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif 31 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/stack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_STACK_H 11 | # define OPENSSL_STACK_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_STACK_H 17 | # endif 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | typedef struct stack_st OPENSSL_STACK; /* Use STACK_OF(...) instead */ 24 | 25 | typedef int (*OPENSSL_sk_compfunc)(const void *, const void *); 26 | typedef void (*OPENSSL_sk_freefunc)(void *); 27 | typedef void *(*OPENSSL_sk_copyfunc)(const void *); 28 | 29 | int OPENSSL_sk_num(const OPENSSL_STACK *); 30 | void *OPENSSL_sk_value(const OPENSSL_STACK *, int); 31 | 32 | void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data); 33 | 34 | OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc cmp); 35 | OPENSSL_STACK *OPENSSL_sk_new_null(void); 36 | OPENSSL_STACK *OPENSSL_sk_new_reserve(OPENSSL_sk_compfunc c, int n); 37 | int OPENSSL_sk_reserve(OPENSSL_STACK *st, int n); 38 | void OPENSSL_sk_free(OPENSSL_STACK *); 39 | void OPENSSL_sk_pop_free(OPENSSL_STACK *st, void (*func) (void *)); 40 | OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *, 41 | OPENSSL_sk_copyfunc c, 42 | OPENSSL_sk_freefunc f); 43 | int OPENSSL_sk_insert(OPENSSL_STACK *sk, const void *data, int where); 44 | void *OPENSSL_sk_delete(OPENSSL_STACK *st, int loc); 45 | void *OPENSSL_sk_delete_ptr(OPENSSL_STACK *st, const void *p); 46 | int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data); 47 | int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data); 48 | int OPENSSL_sk_find_all(OPENSSL_STACK *st, const void *data, int *pnum); 49 | int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data); 50 | int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data); 51 | void *OPENSSL_sk_shift(OPENSSL_STACK *st); 52 | void *OPENSSL_sk_pop(OPENSSL_STACK *st); 53 | void OPENSSL_sk_zero(OPENSSL_STACK *st); 54 | OPENSSL_sk_compfunc OPENSSL_sk_set_cmp_func(OPENSSL_STACK *sk, 55 | OPENSSL_sk_compfunc cmp); 56 | OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *st); 57 | void OPENSSL_sk_sort(OPENSSL_STACK *st); 58 | int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st); 59 | 60 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 61 | # define _STACK OPENSSL_STACK 62 | # define sk_num OPENSSL_sk_num 63 | # define sk_value OPENSSL_sk_value 64 | # define sk_set OPENSSL_sk_set 65 | # define sk_new OPENSSL_sk_new 66 | # define sk_new_null OPENSSL_sk_new_null 67 | # define sk_free OPENSSL_sk_free 68 | # define sk_pop_free OPENSSL_sk_pop_free 69 | # define sk_deep_copy OPENSSL_sk_deep_copy 70 | # define sk_insert OPENSSL_sk_insert 71 | # define sk_delete OPENSSL_sk_delete 72 | # define sk_delete_ptr OPENSSL_sk_delete_ptr 73 | # define sk_find OPENSSL_sk_find 74 | # define sk_find_ex OPENSSL_sk_find_ex 75 | # define sk_push OPENSSL_sk_push 76 | # define sk_unshift OPENSSL_sk_unshift 77 | # define sk_shift OPENSSL_sk_shift 78 | # define sk_pop OPENSSL_sk_pop 79 | # define sk_zero OPENSSL_sk_zero 80 | # define sk_set_cmp_func OPENSSL_sk_set_cmp_func 81 | # define sk_dup OPENSSL_sk_dup 82 | # define sk_sort OPENSSL_sk_sort 83 | # define sk_is_sorted OPENSSL_sk_is_sorted 84 | # endif 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | 90 | #endif 91 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/storeerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_STOREERR_H 12 | # define OPENSSL_STOREERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OSSL_STORE reason codes. 23 | */ 24 | # define OSSL_STORE_R_AMBIGUOUS_CONTENT_TYPE 107 25 | # define OSSL_STORE_R_BAD_PASSWORD_READ 115 26 | # define OSSL_STORE_R_ERROR_VERIFYING_PKCS12_MAC 113 27 | # define OSSL_STORE_R_FINGERPRINT_SIZE_DOES_NOT_MATCH_DIGEST 121 28 | # define OSSL_STORE_R_INVALID_SCHEME 106 29 | # define OSSL_STORE_R_IS_NOT_A 112 30 | # define OSSL_STORE_R_LOADER_INCOMPLETE 116 31 | # define OSSL_STORE_R_LOADING_STARTED 117 32 | # define OSSL_STORE_R_NOT_A_CERTIFICATE 100 33 | # define OSSL_STORE_R_NOT_A_CRL 101 34 | # define OSSL_STORE_R_NOT_A_NAME 103 35 | # define OSSL_STORE_R_NOT_A_PRIVATE_KEY 102 36 | # define OSSL_STORE_R_NOT_A_PUBLIC_KEY 122 37 | # define OSSL_STORE_R_NOT_PARAMETERS 104 38 | # define OSSL_STORE_R_NO_LOADERS_FOUND 123 39 | # define OSSL_STORE_R_PASSPHRASE_CALLBACK_ERROR 114 40 | # define OSSL_STORE_R_PATH_MUST_BE_ABSOLUTE 108 41 | # define OSSL_STORE_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES 119 42 | # define OSSL_STORE_R_UI_PROCESS_INTERRUPTED_OR_CANCELLED 109 43 | # define OSSL_STORE_R_UNREGISTERED_SCHEME 105 44 | # define OSSL_STORE_R_UNSUPPORTED_CONTENT_TYPE 110 45 | # define OSSL_STORE_R_UNSUPPORTED_OPERATION 118 46 | # define OSSL_STORE_R_UNSUPPORTED_SEARCH_TYPE 120 47 | # define OSSL_STORE_R_URI_AUTHORITY_UNSUPPORTED 111 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/symhacks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_SYMHACKS_H 11 | # define OPENSSL_SYMHACKS_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_SYMHACKS_H 17 | # endif 18 | 19 | # include 20 | 21 | /* Case insensitive linking causes problems.... */ 22 | # if defined(OPENSSL_SYS_VMS) 23 | # undef ERR_load_CRYPTO_strings 24 | # define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings 25 | # undef OCSP_crlID_new 26 | # define OCSP_crlID_new OCSP_crlID2_new 27 | 28 | # undef d2i_ECPARAMETERS 29 | # define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS 30 | # undef i2d_ECPARAMETERS 31 | # define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS 32 | # undef d2i_ECPKPARAMETERS 33 | # define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS 34 | # undef i2d_ECPKPARAMETERS 35 | # define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS 36 | 37 | # endif 38 | 39 | #endif /* ! defined HEADER_VMS_IDHACKS_H */ 40 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/tserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_TSERR_H 12 | # define OPENSSL_TSERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_TS 21 | 22 | 23 | /* 24 | * TS reason codes. 25 | */ 26 | # define TS_R_BAD_PKCS7_TYPE 132 27 | # define TS_R_BAD_TYPE 133 28 | # define TS_R_CANNOT_LOAD_CERT 137 29 | # define TS_R_CANNOT_LOAD_KEY 138 30 | # define TS_R_CERTIFICATE_VERIFY_ERROR 100 31 | # define TS_R_COULD_NOT_SET_ENGINE 127 32 | # define TS_R_COULD_NOT_SET_TIME 115 33 | # define TS_R_DETACHED_CONTENT 134 34 | # define TS_R_ESS_ADD_SIGNING_CERT_ERROR 116 35 | # define TS_R_ESS_ADD_SIGNING_CERT_V2_ERROR 139 36 | # define TS_R_ESS_SIGNING_CERTIFICATE_ERROR 101 37 | # define TS_R_INVALID_NULL_POINTER 102 38 | # define TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE 117 39 | # define TS_R_MESSAGE_IMPRINT_MISMATCH 103 40 | # define TS_R_NONCE_MISMATCH 104 41 | # define TS_R_NONCE_NOT_RETURNED 105 42 | # define TS_R_NO_CONTENT 106 43 | # define TS_R_NO_TIME_STAMP_TOKEN 107 44 | # define TS_R_PKCS7_ADD_SIGNATURE_ERROR 118 45 | # define TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR 119 46 | # define TS_R_PKCS7_TO_TS_TST_INFO_FAILED 129 47 | # define TS_R_POLICY_MISMATCH 108 48 | # define TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 120 49 | # define TS_R_RESPONSE_SETUP_ERROR 121 50 | # define TS_R_SIGNATURE_FAILURE 109 51 | # define TS_R_THERE_MUST_BE_ONE_SIGNER 110 52 | # define TS_R_TIME_SYSCALL_ERROR 122 53 | # define TS_R_TOKEN_NOT_PRESENT 130 54 | # define TS_R_TOKEN_PRESENT 131 55 | # define TS_R_TSA_NAME_MISMATCH 111 56 | # define TS_R_TSA_UNTRUSTED 112 57 | # define TS_R_TST_INFO_SETUP_ERROR 123 58 | # define TS_R_TS_DATASIGN 124 59 | # define TS_R_UNACCEPTABLE_POLICY 125 60 | # define TS_R_UNSUPPORTED_MD_ALGORITHM 126 61 | # define TS_R_UNSUPPORTED_VERSION 113 62 | # define TS_R_VAR_BAD_VALUE 135 63 | # define TS_R_VAR_LOOKUP_FAILURE 136 64 | # define TS_R_WRONG_CONTENT_TYPE 114 65 | 66 | # endif 67 | #endif 68 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_TXT_DB_H 11 | # define OPENSSL_TXT_DB_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_TXT_DB_H 17 | # endif 18 | 19 | # include 20 | # include 21 | # include 22 | # include 23 | 24 | # define DB_ERROR_OK 0 25 | # define DB_ERROR_MALLOC 1 26 | # define DB_ERROR_INDEX_CLASH 2 27 | # define DB_ERROR_INDEX_OUT_OF_RANGE 3 28 | # define DB_ERROR_NO_INDEX 4 29 | # define DB_ERROR_INSERT_INDEX_CLASH 5 30 | # define DB_ERROR_WRONG_NUM_FIELDS 6 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | typedef OPENSSL_STRING *OPENSSL_PSTRING; 37 | DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) 38 | 39 | typedef struct txt_db_st { 40 | int num_fields; 41 | STACK_OF(OPENSSL_PSTRING) *data; 42 | LHASH_OF(OPENSSL_STRING) **index; 43 | int (**qual) (OPENSSL_STRING *); 44 | long error; 45 | long arg1; 46 | long arg2; 47 | OPENSSL_STRING *arg_row; 48 | } TXT_DB; 49 | 50 | TXT_DB *TXT_DB_read(BIO *in, int num); 51 | long TXT_DB_write(BIO *out, TXT_DB *db); 52 | int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), 53 | OPENSSL_LH_HASHFUNC hash, OPENSSL_LH_COMPFUNC cmp); 54 | void TXT_DB_free(TXT_DB *db); 55 | OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, 56 | OPENSSL_STRING *value); 57 | int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/ui_compat.h: -------------------------------------------------------------------------------- 1 | /* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ 2 | /* 3 | * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project 4 | * 2001. 5 | */ 6 | /* ==================================================================== 7 | * Copyright (c) 2001 The OpenSSL Project. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. All advertising materials mentioning features or use of this 22 | * software must display the following acknowledgment: 23 | * "This product includes software developed by the OpenSSL Project 24 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 25 | * 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 | * endorse or promote products derived from this software without 28 | * prior written permission. For written permission, please contact 29 | * openssl-core@openssl.org. 30 | * 31 | * 5. Products derived from this software may not be called "OpenSSL" 32 | * nor may "OpenSSL" appear in their names without prior written 33 | * permission of the OpenSSL Project. 34 | * 35 | * 6. Redistributions of any form whatsoever must retain the following 36 | * acknowledgment: 37 | * "This product includes software developed by the OpenSSL Project 38 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * ==================================================================== 53 | * 54 | * This product includes cryptographic software written by Eric Young 55 | * (eay@cryptsoft.com). This product includes software written by Tim 56 | * Hudson (tjh@cryptsoft.com). 57 | * 58 | */ 59 | 60 | #ifndef HEADER_UI_COMPAT_H 61 | # define HEADER_UI_COMPAT_H 62 | 63 | # include 64 | # include 65 | 66 | #ifdef __cplusplus 67 | extern "C" { 68 | #endif 69 | 70 | /* 71 | * The following functions were previously part of the DES section, and are 72 | * provided here for backward compatibility reasons. 73 | */ 74 | 75 | # define des_read_pw_string(b,l,p,v) \ 76 | _ossl_old_des_read_pw_string((b),(l),(p),(v)) 77 | # define des_read_pw(b,bf,s,p,v) \ 78 | _ossl_old_des_read_pw((b),(bf),(s),(p),(v)) 79 | 80 | int _ossl_old_des_read_pw_string(char *buf, int length, const char *prompt, 81 | int verify); 82 | int _ossl_old_des_read_pw(char *buf, char *buff, int size, const char *prompt, 83 | int verify); 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | #endif 89 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/uierr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_UIERR_H 12 | # define OPENSSL_UIERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * UI reason codes. 23 | */ 24 | # define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS 104 25 | # define UI_R_INDEX_TOO_LARGE 102 26 | # define UI_R_INDEX_TOO_SMALL 103 27 | # define UI_R_NO_RESULT_BUFFER 105 28 | # define UI_R_PROCESSING_ERROR 107 29 | # define UI_R_RESULT_TOO_LARGE 100 30 | # define UI_R_RESULT_TOO_SMALL 101 31 | # define UI_R_SYSASSIGN_ERROR 109 32 | # define UI_R_SYSDASSGN_ERROR 110 33 | # define UI_R_SYSQIOW_ERROR 111 34 | # define UI_R_UNKNOWN_CONTROL_COMMAND 106 35 | # define UI_R_UNKNOWN_TTYGET_ERRNO_VALUE 108 36 | # define UI_R_USER_DATA_DUPLICATION_UNSUPPORTED 112 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_WHRLPOOL_H 11 | # define OPENSSL_WHRLPOOL_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_WHRLPOOL_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_WHIRLPOOL 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | # define WHIRLPOOL_DIGEST_LENGTH (512/8) 29 | 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | 32 | # define WHIRLPOOL_BBLOCK 512 33 | # define WHIRLPOOL_COUNTER (256/8) 34 | 35 | typedef struct { 36 | union { 37 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; 38 | /* double q is here to ensure 64-bit alignment */ 39 | double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)]; 40 | } H; 41 | unsigned char data[WHIRLPOOL_BBLOCK / 8]; 42 | unsigned int bitoff; 43 | size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; 44 | } WHIRLPOOL_CTX; 45 | # endif 46 | # ifndef OPENSSL_NO_DEPRECATED_3_0 47 | OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); 48 | OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, 49 | const void *inp, size_t bytes); 50 | OSSL_DEPRECATEDIN_3_0 void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, 51 | const void *inp, size_t bits); 52 | OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); 53 | OSSL_DEPRECATEDIN_3_0 unsigned char *WHIRLPOOL(const void *inp, size_t bytes, 54 | unsigned char *md); 55 | # endif 56 | 57 | # ifdef __cplusplus 58 | } 59 | # endif 60 | # endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /example/iOS Test App/include/openssl/x509err.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_X509ERR_H 12 | # define OPENSSL_X509ERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * X509 reason codes. 23 | */ 24 | # define X509_R_AKID_MISMATCH 110 25 | # define X509_R_BAD_SELECTOR 133 26 | # define X509_R_BAD_X509_FILETYPE 100 27 | # define X509_R_BASE64_DECODE_ERROR 118 28 | # define X509_R_CANT_CHECK_DH_KEY 114 29 | # define X509_R_CERTIFICATE_VERIFICATION_FAILED 139 30 | # define X509_R_CERT_ALREADY_IN_HASH_TABLE 101 31 | # define X509_R_CRL_ALREADY_DELTA 127 32 | # define X509_R_CRL_VERIFY_FAILURE 131 33 | # define X509_R_DUPLICATE_ATTRIBUTE 140 34 | # define X509_R_ERROR_GETTING_MD_BY_NID 141 35 | # define X509_R_ERROR_USING_SIGINF_SET 142 36 | # define X509_R_IDP_MISMATCH 128 37 | # define X509_R_INVALID_ATTRIBUTES 138 38 | # define X509_R_INVALID_DIRECTORY 113 39 | # define X509_R_INVALID_DISTPOINT 143 40 | # define X509_R_INVALID_FIELD_NAME 119 41 | # define X509_R_INVALID_TRUST 123 42 | # define X509_R_ISSUER_MISMATCH 129 43 | # define X509_R_KEY_TYPE_MISMATCH 115 44 | # define X509_R_KEY_VALUES_MISMATCH 116 45 | # define X509_R_LOADING_CERT_DIR 103 46 | # define X509_R_LOADING_DEFAULTS 104 47 | # define X509_R_METHOD_NOT_SUPPORTED 124 48 | # define X509_R_NAME_TOO_LONG 134 49 | # define X509_R_NEWER_CRL_NOT_NEWER 132 50 | # define X509_R_NO_CERTIFICATE_FOUND 135 51 | # define X509_R_NO_CERTIFICATE_OR_CRL_FOUND 136 52 | # define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105 53 | # define X509_R_NO_CRL_FOUND 137 54 | # define X509_R_NO_CRL_NUMBER 130 55 | # define X509_R_PUBLIC_KEY_DECODE_ERROR 125 56 | # define X509_R_PUBLIC_KEY_ENCODE_ERROR 126 57 | # define X509_R_SHOULD_RETRY 106 58 | # define X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN 107 59 | # define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY 108 60 | # define X509_R_UNKNOWN_KEY_TYPE 117 61 | # define X509_R_UNKNOWN_NID 109 62 | # define X509_R_UNKNOWN_PURPOSE_ID 121 63 | # define X509_R_UNKNOWN_SIGID_ALGS 144 64 | # define X509_R_UNKNOWN_TRUST_ID 120 65 | # define X509_R_UNSUPPORTED_ALGORITHM 111 66 | # define X509_R_WRONG_LOOKUP_TYPE 112 67 | # define X509_R_WRONG_TYPE 122 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /example/iOS Test App/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonacox/Build-OpenSSL-cURL/c04fd64f366f926bbb897d661b3df61231819d07/example/iOS Test App/screenshot.png -------------------------------------------------------------------------------- /example/macOS Test App/README.md: -------------------------------------------------------------------------------- 1 | # macOS Test App 2 | 3 | This is a test app for macOS using the curl, openssl and nghttp2 libraries. 4 | 5 | ## Screenshots 6 | 7 | macOS Test Build 8 | 9 | Image 10 | 11 | ## Build Instructions 12 | 13 | The `libs` and `include` folders will be created during the build. These are required to build and run the Test application in Xcode. Build the libraries with this command: 14 | 15 | ```bash 16 | # Build for all platforms 17 | ./build.sh 18 | 19 | # Option: Build only macOS 20 | ./build.sh -p macos 21 | ``` 22 | 23 | Load and build the project using Xcode. Example lib binaries (xcframework) and header files are included but will be replaced when you run the build script. 24 | 25 | ## New Project Setup Details 26 | 27 | If you are setting up a new Xcode project, there are few things you will need to set up. These are all set up for you already in the xcodeproj file: 28 | 29 | * You will also need to add the xcframework files (libs) and header files (include). You will also need to add libz.tbd, liblapd.tgb, CoreFoundation.framework, and SystemConfiguraiton.framework to the Xcode project ("General"). 30 | Image 31 | 32 | * You will need to allow "Outgoing Connection (Client)" in the "Signing & Capabilities" of the project target "Sandbox" settings. 33 | Image 34 | 35 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // macOS Test App 4 | // 5 | // Created by Jason Cox on 1/19/25. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | @interface AppDelegate : NSResponder 13 | 14 | @property (strong, nonatomic) NSWindow *window; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // macOS Test App 4 | // 5 | // Created by Jason Cox on 1/19/25. 6 | // 7 | 8 | #import "AppDelegate.h" 9 | 10 | @interface AppDelegate () 11 | 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 19 | // Insert code here to initialize your application 20 | // libcurl - see http://curl.haxx.se/libcurl/ 21 | curl_global_init(0L); 22 | } 23 | 24 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 25 | // Insert code here to tear down your application 26 | // libcurl cleanup 27 | curl_global_cleanup(); 28 | } 29 | 30 | - (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app { 31 | return YES; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "scale" : "1x", 6 | "size" : "16x16" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "scale" : "2x", 11 | "size" : "16x16" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "scale" : "1x", 16 | "size" : "32x32" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "scale" : "2x", 21 | "size" : "32x32" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "scale" : "1x", 26 | "size" : "128x128" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "scale" : "2x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "scale" : "1x", 36 | "size" : "256x256" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "scale" : "2x", 41 | "size" : "256x256" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "scale" : "1x", 46 | "size" : "512x512" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "scale" : "2x", 51 | "size" : "512x512" 52 | } 53 | ], 54 | "info" : { 55 | "author" : "xcode", 56 | "version" : 1 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // macOS Test App 4 | // 5 | // Created by Jason Cox on 1/19/25. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | @interface ViewController : NSViewController 13 | { 14 | IBOutlet NSTextField *_urlText; // user field for URL address 15 | IBOutlet NSTextView *_resultText; // user field for resulting cURL data 16 | IBOutlet NSButton *_getButton; // user button to start GET 17 | IBOutlet NSTextField *_appTitle; // application title to update for version 18 | 19 | // CURL global data 20 | CURL *_curl; // curl handle 21 | NSData *_dataToSend; 22 | size_t _dataToSendBookmark; 23 | NSMutableData *_dataReceived; 24 | NSString *cacertPath; // path to cacert.pem file 25 | } 26 | 27 | @property (retain, nonatomic) NSTextField *_urlText; 28 | @property (retain, nonatomic) NSTextView *_resultText; 29 | @property (retain, nonatomic) NSButton *_getButton; 30 | @property (retain, nonatomic) NSTextField *_appTitle; 31 | 32 | - (IBAction)Get: (id)sender; // action method to run GET 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App/macOS_Test_App.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /example/macOS Test App/macOS Test App/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // macOS Test App 4 | // 5 | // Created by Jason Cox on 1/19/25. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, const char * argv[]) { 11 | @autoreleasepool { 12 | // Setup code that might create autoreleased objects goes here. 13 | } 14 | return NSApplicationMain(argc, argv); 15 | } 16 | -------------------------------------------------------------------------------- /example/tvOS Test App/README.md: -------------------------------------------------------------------------------- 1 | # tvOS Test App 2 | 3 | This is a test app for tvOS using the curl, openssl and nghttp2 libraries. 4 | 5 | ## Screenshots 6 | 7 | tvOS Test Build 8 | 9 | ![Image](https://github.com/user-attachments/assets/fd0b1e2b-6f2c-4295-853a-574dc8533461) 10 | 11 | ## Build Instructions 12 | 13 | The `libs` and `include` folders will be created during the build. These are required to build and run the Test application in Xcode. Build the libraries with this command: 14 | 15 | ```bash 16 | # Build for all platforms 17 | ./build.sh 18 | 19 | # Option: Build only tvOS 20 | ./build.sh -p tvos 21 | ``` 22 | 23 | Load and build the project using Xcode. Example lib binaries (xcframework) and header files are included but will be replaced when you run the build script. 24 | 25 | ## New Project Setup Details 26 | 27 | If you are setting up a new Xcode project, there are few things you will need to set up. These are all set up for you already in the xcodeproj file: 28 | 29 | * You will also need to add the xcframework files (libs) and header files (include). You will also need to add libz.tbd to the Xcode project ("General"). 30 | Image 31 | 32 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // tvOS Test App 4 | // 5 | // Created by Jason Cox on 1/19/25. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // tvOS Test App 4 | // 5 | // Created by Jason Cox on 1/19/25. 6 | // 7 | 8 | #import "AppDelegate.h" 9 | #import "opensslv.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | 21 | // libcurl - see http://curl.haxx.se/libcurl/ 22 | curl_global_init(0L); 23 | 24 | return YES; 25 | } 26 | 27 | 28 | - (void)applicationWillResignActive:(UIApplication *)application { 29 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 30 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 31 | } 32 | 33 | 34 | - (void)applicationDidEnterBackground:(UIApplication *)application { 35 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 36 | } 37 | 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application { 40 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 41 | } 42 | 43 | 44 | - (void)applicationDidBecomeActive:(UIApplication *)application { 45 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 46 | } 47 | 48 | - (void)applicationWillTerminate:(UIApplication *)application { 49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 50 | // libcurl cleanup 51 | curl_global_cleanup(); 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "layers" : [ 7 | { 8 | "filename" : "Front.imagestacklayer" 9 | }, 10 | { 11 | "filename" : "Middle.imagestacklayer" 12 | }, 13 | { 14 | "filename" : "Back.imagestacklayer" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "author" : "xcode", 14 | "version" : 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "layers" : [ 7 | { 8 | "filename" : "Front.imagestacklayer" 9 | }, 10 | { 11 | "filename" : "Middle.imagestacklayer" 12 | }, 13 | { 14 | "filename" : "Back.imagestacklayer" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "author" : "xcode", 14 | "version" : 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "author" : "xcode", 14 | "version" : 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "filename" : "App Icon - App Store.imagestack", 5 | "idiom" : "tv", 6 | "role" : "primary-app-icon", 7 | "size" : "1280x768" 8 | }, 9 | { 10 | "filename" : "App Icon.imagestack", 11 | "idiom" : "tv", 12 | "role" : "primary-app-icon", 13 | "size" : "400x240" 14 | }, 15 | { 16 | "filename" : "Top Shelf Image Wide.imageset", 17 | "idiom" : "tv", 18 | "role" : "top-shelf-image-wide", 19 | "size" : "2320x720" 20 | }, 21 | { 22 | "filename" : "Top Shelf Image.imageset", 23 | "idiom" : "tv", 24 | "role" : "top-shelf-image", 25 | "size" : "1920x720" 26 | } 27 | ], 28 | "info" : { 29 | "author" : "xcode", 30 | "version" : 1 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "author" : "xcode", 14 | "version" : 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "author" : "xcode", 14 | "version" : 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // tvOS Test App 4 | // 5 | // Created by Jason Cox on 1/19/25. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | @interface ViewController : UIViewController 13 | { 14 | IBOutlet UITextField *_urlText; // user field for URL address 15 | IBOutlet UITextView *_resultText; // user field for resulting cURL data 16 | IBOutlet UIButton *_getButton; // user button to start GET 17 | IBOutlet UILabel *_appTitle; // application title to update for version 18 | 19 | // CURL global data 20 | CURL *_curl; // curl handle 21 | NSData *_dataToSend; 22 | size_t _dataToSendBookmark; 23 | NSMutableData *_dataReceived; 24 | NSString *cacertPath; // path to cacert.pem file 25 | } 26 | 27 | @property (retain, nonatomic) UITextField *_urlText; 28 | @property (retain, nonatomic) UITextView *_resultText; 29 | @property (retain, nonatomic) UIButton *_getButton; 30 | @property (retain, nonatomic) UILabel *_appTitle; 31 | 32 | - (IBAction)Get: (id)sender; // action method to run GET 33 | 34 | @end 35 | 36 | 37 | -------------------------------------------------------------------------------- /example/tvOS Test App/tvOS Test App/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // tvOS Test App 4 | // 5 | // Created by Jason Cox on 1/19/25. 6 | // 7 | 8 | #import 9 | #import "AppDelegate.h" 10 | 11 | int main(int argc, char * argv[]) { 12 | NSString * appDelegateClassName; 13 | @autoreleasepool { 14 | // Setup code that might create autoreleased objects goes here. 15 | appDelegateClassName = NSStringFromClass([AppDelegate class]); 16 | } 17 | return UIApplicationMain(argc, argv, nil, appDelegateClassName); 18 | } 19 | -------------------------------------------------------------------------------- /latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Script to prepare the latest build for distribution 3 | 4 | # Get the latest build from the build.sh script 5 | OPENSSL=$(grep -oE '^OPENSSL="[^"]+"' build.sh | sed 's/^OPENSSL="\(.*\)"/\1/') 6 | LIBCURL=$(grep -oE '^LIBCURL="[^"]+"' build.sh | sed 's/^LIBCURL="\(.*\)"/\1/') 7 | NGHTTP2=$(grep -oE '^NGHTTP2="[^"]+"' build.sh | sed 's/^NGHTTP2="\(.*\)"/\1/') 8 | 9 | # Archive path 10 | BUILD_PATH=archive/libcurl-$LIBCURL-openssl-$OPENSSL-nghttp2-$NGHTTP2 11 | 12 | # Check if the path exists 13 | if [ ! -d $BUILD_PATH ]; then 14 | echo "The path $BUILD_PATH does not exist, run the build.sh script first" 15 | exit 1 16 | fi 17 | 18 | # Inform the user 19 | echo "Latest build is: OpenSSL $OPENSSL, libcurl $LIBCURL, nghttp2 $NGHTTP2" 20 | echo " Latest build in $BUILD_PATH" 21 | echo "" 22 | 23 | # Tar the build 24 | echo " Creating archive libcurl-$LIBCURL-openssl-$OPENSSL-nghttp2-$NGHTTP2.tgz ..." 25 | cd archive 26 | tar -czf libcurl-$LIBCURL-openssl-$OPENSSL-nghttp2-$NGHTTP2.tgz libcurl-$LIBCURL-openssl-$OPENSSL-nghttp2-$NGHTTP2 27 | 28 | # Load the README into the clipboard 29 | cat libcurl-$LIBCURL-openssl-$OPENSSL-nghttp2-$NGHTTP2/README.md | pbcopy 30 | 31 | # Notify the user 32 | echo " Archive created: libcurl-$LIBCURL-openssl-$OPENSSL-nghttp2-$NGHTTP2.tgz" 33 | echo " README.md loaded into the clipboard" 34 | echo " Opening the archive folder..." 35 | 36 | # Open the archive folder in Finder for upload 37 | open . 38 | -------------------------------------------------------------------------------- /nghttp2/README.md: -------------------------------------------------------------------------------- 1 | # Build nghttp2 2 | 3 | Build nghttp2 for MacOS, Mac Catalyst, iOS and tvOS with Bitcode enabled for iOS, tvOS. 4 | 5 | ## Build 6 | The `nghttp2-build.sh` script attempts to pull down and build nghttp2. 7 | 8 | Source: https://github.com/nghttp2/nghttp2/releases 9 | 10 | Usage 11 | ===== 12 | 13 | 1. Do "bash nghttp2-build.sh". 14 | 2. Architecture Libraries are created in iOS/{ARCH}, Mac/{ARCH}, tvOS/{ARCH}, Catalyst/{ARCH} 15 | 3. Multiple Architecture fat libraries are created in lib. 16 | 4. To use libraries: 17 | cURL - You would use `--with-nghttp2={PATH-for-ARCH}` 18 | Xcode - Rename and add the appropriate FAT library to your project. 19 | Ex. iOS: `cp lib/libnghttp2_iOS.a ~/myProj/lib/libnghttp2.a ` 20 | 21 | The build script here is intended to be used with libcurl and openssl. 22 | NOTE: pkg-config is required to build libcurl with nghttp2. This script will attempt to install pkg-config with brew if it is missing. 23 | 24 | ## Manual Build 25 | 26 | Automake is required (see automake-build.sh to install on MacOS) 27 | 28 | ``` 29 | #!/bin/bash 30 | # Build nghttp2 from source 31 | 32 | git clone https://github.com/tatsuhiro-t/nghttp2.git 33 | cd nghttp2 34 | autoreconf -i 35 | automake 36 | autoconf 37 | ./configure 38 | make 39 | sudo make install 40 | ``` 41 | 42 | ## Credits 43 | 44 | Tatsuhiro Tsujikawa, nghttp2.org 45 | https://nghttp2.org https://github.com/nghttp2 46 | Jason Cox, @jasonacox 47 | https://github.com/jasonacox/Build-OpenSSL-cURL 48 | 49 | -------------------------------------------------------------------------------- /nghttp2/automake-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Automake & Autoconf on Mac 3 | # 4 | # Only use this if you do not have Automakef installed already 5 | # If you have BREW installed, we will use that instead of building these. 6 | # 7 | usage () 8 | { 9 | echo "usage: $0" 10 | exit 127 11 | } 12 | if [ "$1" == "-h" ]; then 13 | usage 14 | fi 15 | 16 | # change to update versions if build is required 17 | AUTOCONF="autoconf-2.69" 18 | AUTOMAKE="automake-1.15" 19 | 20 | # 21 | # Check to see if automake and autoconf are already installed 22 | if (type "automake" > /dev/null) && (type "autoreconf" > /dev/null); then 23 | echo "Automake tools are already installed - exiting" 24 | exit 25 | fi 26 | 27 | # Check to see if Brew is installed 28 | if ! type "brew" > /dev/null; then 29 | echo "brew not installed - attempting manual builds" 30 | # AUTOCONF 31 | curl -OL http://ftpmirror.gnu.org/autoconf/${AUTOCONF}.tar.gz 32 | tar -xzf ${AUTOCONF}.tar.gz 33 | cd ${AUTOCONF} 34 | echo "building..." 35 | #./configure && make && sudo make install 36 | cd .. 37 | 38 | curl -OLs http://ftpmirror.gnu.org/automake/${AUTOMAKE}.tar.gz 39 | tar -xzf ${AUTOMAKE}.tar.gz 40 | cd ${AUTOMAKE} 41 | echo "building..." 42 | #./configure && make && sudo make install 43 | cd .. 44 | # 45 | else 46 | echo "brew installed - using to install automake" 47 | brew install automake 48 | fi 49 | 50 | # Check to see if installation worked 51 | if (type "automake" > /dev/null) && (type "autoreconf" > /dev/null); then 52 | echo "SUCCESS: Automake tools installed" 53 | exit 0 54 | else 55 | echo "ERROR: Automake tools failed to install" 56 | exit 1 57 | fi 58 | 59 | #curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz 60 | #tar -xzf libtool-2.4.2.tar.gz 61 | #cd libtool-2.4.2 62 | #./configure && make && sudo make install 63 | #cd .. 64 | -------------------------------------------------------------------------------- /openssl/openssl-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script downlaods and builds the Mac, Catalyst,iOS and tvOS openSSL libraries with Bitcode enabled 4 | # 5 | # Author: Jason Cox, @jasonacox https://github.com/jasonacox/Build-OpenSSL-cURL 6 | # Date: 2020-Aug-15 7 | 8 | set -e 9 | 10 | # Default Version 11 | VERSION="openssl-3.0.9" 12 | 13 | # Phase 1 - Mac, Catalyst and tvOS 14 | OPENSSL_VERSION="$VERSION" ./openssl-build-phase1.sh "$@" 15 | 16 | # Phase 2 - iOS 17 | OPENSSL_VERSION="$VERSION" ./openssl-build-phase2.sh "$@" 18 | 19 | # Done 20 | echo -e "${normal}Done" 21 | --------------------------------------------------------------------------------