├── ios-support ├── libssl.a ├── libcrypto.a ├── libplist-2.0.3.dylib ├── openssl │ ├── ecdh.h │ ├── ecdsa.h │ ├── kdferr.h │ ├── opensslconf.h │ ├── pem2.h │ ├── ossl_typ_OLD.h │ ├── buffererr.h │ ├── ssl2.h │ ├── objectserr.h │ ├── decodererr.h │ ├── encodererr.h │ ├── asyncerr.h │ ├── thread.h │ ├── indicator.h │ ├── ebcdic.h │ ├── esserr.h │ ├── fipskey.h │ ├── prov_ssl.h │ ├── core_object.h │ ├── e_ostime.h │ ├── conftypes.h │ ├── rc4.h │ ├── comperr.h │ ├── symhacks.h │ ├── uierr.h │ ├── conf_api.h │ ├── mdc2.h │ ├── md2.h │ ├── dtls1.h │ ├── dsaerr.h │ ├── cmac.h │ ├── cterr.h │ ├── fips_names.h │ ├── buffer.h │ ├── md5.h │ ├── md4.h │ ├── ripemd.h │ ├── cmp_util.h │ ├── txt_db.h │ ├── pkcs12err.h │ ├── whrlpool.h │ ├── bnerr.h │ ├── crmferr.h │ ├── storeerr.h │ ├── cast.h │ ├── hmac.h │ ├── ocsperr.h │ ├── srtp.h │ ├── conferr.h │ ├── quic.h │ ├── rc2.h │ ├── httperr.h │ ├── cryptoerr.h │ ├── dherr.h │ ├── pemerr.h │ ├── provider.h │ ├── blowfish.h │ ├── param_build.h │ ├── engineerr.h │ ├── rc5.h │ ├── pkcs7err.h │ ├── tserr.h │ ├── idea.h │ ├── randerr.h │ ├── stack.h │ ├── x509err.h │ ├── opensslv.h │ ├── bioerr.h │ ├── async.h │ ├── aes.h │ ├── seed.h │ ├── rand.h │ ├── self_test.h │ ├── comp.h │ ├── x509v3err.h │ ├── sha.h │ └── camellia.h └── plist │ ├── plist++.h │ ├── Uid.h │ ├── Real.h │ ├── Boolean.h │ ├── Key.h │ ├── Data.h │ ├── String.h │ ├── Date.h │ ├── Node.h │ ├── Integer.h │ ├── Structure.h │ ├── Array.h │ └── Dictionary.h ├── .gitignore ├── .gitmodules ├── control ├── CONTRIBUTING.md ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── workflows │ ├── build.yml │ └── codeql.yml ├── SECURITY.md ├── LICENSE ├── Makefile ├── Makefile.ios ├── README.md └── CODE_OF_CONDUCT.md /ios-support/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0xilis/shortcut-sign/HEAD/ios-support/libssl.a -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | .DS_Store 3 | /tests/ 4 | lib/libqmc/ 5 | packages/ 6 | .theos/ 7 | ignore/ 8 | -------------------------------------------------------------------------------- /ios-support/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0xilis/shortcut-sign/HEAD/ios-support/libcrypto.a -------------------------------------------------------------------------------- /ios-support/libplist-2.0.3.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0xilis/shortcut-sign/HEAD/ios-support/libplist-2.0.3.dylib -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/libshortcutsign"] 2 | path = lib/libshortcutsign 3 | url = https://github.com/0xilis/libshortcutsign.git 4 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.0xilis.shortcut-sign 2 | Name: shortcut-sign 3 | Depends: firmware (>= 7.0), com.0xilis.libshortcutsign, com.0xilis.libneoapplearchive 4 | Version: 0.0.3 5 | Architecture: iphoneos-arm 6 | Description: Open-Source Signed Shortcut CLI tool 7 | Maintainer: Snoolie K 8 | Author: Snoolie K 9 | Section: System 10 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are welcome! Not just to the code, but also better documentation would also be appreciated; shortcuts signing is highly undocumented and TBH I'm not sure how to say exactly some of the things I know about it... 4 | 5 | Minor contributions will also be appriecated. The codebase is kind of a mess right now, so contributions that don't change code but rather make it more readable are welcome. 6 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/openssl/ossl_typ_OLD.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 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build Project 2 | 3 | on: 4 | push: 5 | branches: 6 | - master # Default branch 7 | pull_request: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | # Step 1: Checkout the code from the repository 17 | - name: Checkout code 18 | uses: actions/checkout@v2 19 | 20 | # Step 2: Initialize submodules 21 | - name: Initialize submodules 22 | run: | 23 | git submodule update --init --recursive 24 | 25 | # Step 3: Set up Clang 26 | - name: Set up Clang 27 | run: | 28 | sudo apt-get update 29 | sudo apt-get install -y clang libplist-dev make 30 | 31 | # Step 4: Build the project using Makefile 32 | - name: Build the project 33 | run: | 34 | make -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | ## Reporting a Vulnerability 2 | 3 | Please make sure to report any vulnerabilities inside of shortcut-sign here. 4 | 5 | To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/0xilis/shortcut-sign/security/advisories/new) tab. 6 | 7 | Do be aware that most problems will likely deal with libshortcutsign rather than shortcut-sign itself. Report those in libshortcutsign's security page. However, if you do find something that specifically is in shortcut-sign source, feel free to report it here. 8 | 9 | For vulnerabilities with the libNeoAppleArchive submodule, report it on [the libNeoAppleArchive submodule security page.](https://github.com/0xilis/libNeoAppleArchive/blob/main/SECURITY.md). 10 | 11 | I will send a response indicating the next steps in handling your report. After the initial reply to your report, I will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance. 12 | -------------------------------------------------------------------------------- /ios-support/openssl/thread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. 3 | * Copyright (c) 2002, 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_THREAD_H 12 | # define OPENSSL_THREAD_H 13 | 14 | # define OSSL_THREAD_SUPPORT_FLAG_THREAD_POOL (1U<<0) 15 | # define OSSL_THREAD_SUPPORT_FLAG_DEFAULT_SPAWN (1U<<1) 16 | 17 | # include 18 | 19 | # ifdef __cplusplus 20 | extern "C" { 21 | # endif 22 | 23 | uint32_t OSSL_get_thread_support_flags(void); 24 | int OSSL_set_max_threads(OSSL_LIB_CTX *ctx, uint64_t max_threads); 25 | uint64_t OSSL_get_max_threads(OSSL_LIB_CTX *ctx); 26 | 27 | # ifdef __cplusplus 28 | } 29 | # endif 30 | 31 | #endif /* OPENSSL_THREAD_H */ 32 | -------------------------------------------------------------------------------- /ios-support/openssl/indicator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 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_INDICATOR_H 11 | # define OPENSSL_INDICATOR_H 12 | # pragma once 13 | 14 | # ifdef __cplusplus 15 | extern "C" { 16 | # endif 17 | 18 | #include 19 | 20 | typedef int (OSSL_INDICATOR_CALLBACK)(const char *type, const char *desc, 21 | const OSSL_PARAM params[]); 22 | 23 | void OSSL_INDICATOR_set_callback(OSSL_LIB_CTX *libctx, 24 | OSSL_INDICATOR_CALLBACK *cb); 25 | void OSSL_INDICATOR_get_callback(OSSL_LIB_CTX *libctx, 26 | OSSL_INDICATOR_CALLBACK **cb); 27 | 28 | # ifdef __cplusplus 29 | } 30 | # endif 31 | #endif /* OPENSSL_INDICATOR_H */ 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Snoolie Keffaber 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 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | buildDir = build 2 | CC = clang 3 | CFLAGS = -Os -std=c89 -Ibuild/lzfse/include -Ibuild/libzbitmap/include -Ilib/libshortcutsign 4 | LDFLAGS = -lNeoAppleArchive -llzfse -lzbitmap -lz -lssl -lcrypto -lplist-2.0 5 | 6 | DEBUG ?= 0 7 | 8 | ifeq ($(DEBUG), 1) 9 | CFLAGS += -g -fsanitize=address 10 | endif 11 | 12 | OS := $(shell uname) 13 | 14 | LIBSHORTCUTSIGN_DIR = lib/libshortcutsign 15 | 16 | output: $(buildDir) 17 | 18 | @ # Build libshortcutsign 19 | @echo "building libshortcutsign..." 20 | $(MAKE) -C $(LIBSHORTCUTSIGN_DIR) 21 | 22 | @ # Build shortcut-sign CLI tool 23 | @echo "building shortcut-sign..." 24 | @$(CC) src/*.c lib/libshortcutsign/build/usr/lib/libshortcutsign.a -Llib/libshortcutsign/build/lzfse/lib -Llib/libshortcutsign/libs/libNeoAppleArchive/build/libzbitmap/lib -Llib/libshortcutsign/libs/libNeoAppleArchive/build/usr/lib -o build/usr/bin/shortcut-sign $(LDFLAGS) $(CFLAGS) 25 | 26 | $(buildDir): 27 | @echo "Creating Build Directory" 28 | mkdir -p build/usr/lib 29 | mkdir -p build/usr/bin 30 | mkdir -p build/obj 31 | mkdir -p build/libshortcutsign 32 | mkdir -p build/lzfse 33 | mkdir -p build/libNeoAppleArchive -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /Makefile.ios: -------------------------------------------------------------------------------- 1 | ARCHS = arm64 2 | TARGET := iphone:clang:latest:6.0 3 | # PREFIX = $(THEOS)/toolchain/Xcode.xctoolchain/usr/bin/ 4 | PREFIX = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ 5 | SYSROOT = $(THEOS)/sdks/iPhoneOS14.4.sdk 6 | 7 | include $(THEOS)/makefiles/common.mk 8 | 9 | TOOL_NAME = shortcut-sign 10 | 11 | shortcut-sign_FILES = src/main.c $(wildcard lib/libshortcutsign/*.c) $(wildcard lib/libshortcutsign/libs/libNeoAppleArchive/libNeoAppleArchive/*.c) $(filter-out lib/libshortcutsign/libs/lzfse/src/lzfse_main.c, $(wildcard lib/libshortcutsign/libs/lzfse/src/*.c)) lib/libshortcutsign/libs/libNeoAppleArchive/libNeoAppleArchive/compression/libzbitmap/libzbitmap.c 12 | shortcut-sign_LIBRARIES = plist-2.0.3 13 | shortcut-sign_CFLAGS = -Ilib/libshortcutsign -Ilib/libshortcutsign/libs/libNeoAppleArchive/libNeoAppleArchive -Ilib/libshortcutsign/libs/libNeoAppleArchive/libNeoAppleArchive/compression/libzbitmap -Ilib/libshortcutsign/libs/libNeoAppleArchive/libNeoAppleArchive/compression/lzfse/src -Iios-support/ -DOPENSSL_API_COMPAT=30400 -Wno-missing-declarations 14 | shortcut-sign_LDFLAGS = -L./ios-support/ -lz -lssl -lcrypto 15 | shortcut-sign_INSTALL_PATH = /usr/local/bin 16 | 17 | include $(THEOS_MAKE_PATH)/tool.mk -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | # Note 11 | 12 | This template for bug reports is not required for issue submissions. You are allowed to submit your issue in another form that does not comply with the template, rather it is just a guide of what to format the issue if you want. 13 | 14 | **Describe the bug** 15 | A clear and concise description of what the bug is. 16 | 17 | **To Reproduce** 18 | Steps to reproduce the behavior: 19 | 1. Go to '...' 20 | 2. Click on '....' 21 | 3. Scroll down to '....' 22 | 4. See error 23 | 24 | **Expected behavior** 25 | A clear and concise description of what you expected to happen. 26 | 27 | **Screenshots** 28 | If applicable, add screenshots to help explain your problem. 29 | 30 | **Desktop (please complete the following information):** 31 | - OS: [e.g. iOS] 32 | - Browser [e.g. chrome, safari] 33 | - Version [e.g. 22] 34 | 35 | **Smartphone (please complete the following information):** 36 | - Device: [e.g. iPhone6] 37 | - OS: [e.g. iOS8.1] 38 | - Browser [e.g. stock browser, safari] 39 | - Version [e.g. 22] 40 | 41 | **Additional context** 42 | Add any other context about the problem here. 43 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/openssl/fipskey.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/fipskey.h.in 4 | * 5 | * Copyright 2020-2024 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 | /* 33 | * The FIPS provider vendor name, as a string. 34 | */ 35 | #define FIPS_VENDOR "OpenSSL non-compliant FIPS Provider" 36 | 37 | # ifdef __cplusplus 38 | } 39 | # endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /ios-support/openssl/prov_ssl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021-2023 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 | /* SSL/TLS uses a 2 byte unsigned version number */ 23 | # define SSL3_VERSION 0x0300 24 | # define TLS1_VERSION 0x0301 25 | # define TLS1_1_VERSION 0x0302 26 | # define TLS1_2_VERSION 0x0303 27 | # define TLS1_3_VERSION 0x0304 28 | # define DTLS1_VERSION 0xFEFF 29 | # define DTLS1_2_VERSION 0xFEFD 30 | # define DTLS1_BAD_VER 0x0100 31 | 32 | /* QUIC uses a 4 byte unsigned version number */ 33 | # define OSSL_QUIC1_VERSION 0x0000001 34 | 35 | # ifdef __cplusplus 36 | } 37 | # endif 38 | #endif /* OPENSSL_PROV_SSL_H */ 39 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/plist/plist++.h: -------------------------------------------------------------------------------- 1 | /* 2 | * plist++.h 3 | * Main include of libplist C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef LIBPLISTXX_H 23 | #define LIBPLISTXX_H 24 | 25 | #include "plist.h" 26 | #include "Array.h" 27 | #include "Boolean.h" 28 | #include "Data.h" 29 | #include "Date.h" 30 | #include "Dictionary.h" 31 | #include "Integer.h" 32 | #include "Node.h" 33 | #include "Real.h" 34 | #include "Key.h" 35 | #include "Uid.h" 36 | #include "String.h" 37 | #include "Structure.h" 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /ios-support/openssl/e_ostime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 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_E_OSTIME_H 11 | # define OPENSSL_E_OSTIME_H 12 | # pragma once 13 | 14 | # include 15 | # include 16 | # include 17 | 18 | /* 19 | * This header guarantees that 'struct timeval' will be available. It includes 20 | * the minimum headers needed to facilitate this. This may still be a 21 | * substantial set of headers on some platforms (e.g. on Win32). 22 | */ 23 | 24 | # if defined(OPENSSL_SYS_WINDOWS) 25 | # if !defined(_WINSOCKAPI_) 26 | /* 27 | * winsock2.h defines _WINSOCK2API_ and both winsock2.h and winsock.h define 28 | * _WINSOCKAPI_. Both of these provide struct timeval. Don't include 29 | * winsock2.h if either header has been included to avoid breakage with 30 | * applications that prefer to use over . 31 | */ 32 | # include 33 | # endif 34 | # else 35 | # include 36 | # endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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_BROTLI_DECODE_ERROR 102 27 | # define COMP_R_BROTLI_ENCODE_ERROR 103 28 | # define COMP_R_BROTLI_NOT_SUPPORTED 104 29 | # define COMP_R_ZLIB_DEFLATE_ERROR 99 30 | # define COMP_R_ZLIB_INFLATE_ERROR 100 31 | # define COMP_R_ZLIB_NOT_SUPPORTED 101 32 | # define COMP_R_ZSTD_COMPRESS_ERROR 105 33 | # define COMP_R_ZSTD_DECODE_ERROR 106 34 | # define COMP_R_ZSTD_DECOMPRESS_ERROR 107 35 | # define COMP_R_ZSTD_NOT_SUPPORTED 108 36 | 37 | # endif 38 | #endif 39 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/plist/Uid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Uid.h 3 | * Uid node type for C++ binding 4 | * 5 | * Copyright (c) 2012 Nikias Bassen, All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_UID_H 23 | #define PLIST_UID_H 24 | 25 | #include 26 | 27 | namespace PList 28 | { 29 | 30 | class Uid : public Node 31 | { 32 | public : 33 | Uid(Node* parent = NULL); 34 | Uid(plist_t node, Node* parent = NULL); 35 | Uid(const Uid& i); 36 | Uid& operator=(const Uid& i); 37 | Uid(uint64_t i); 38 | virtual ~Uid(); 39 | 40 | Node* Clone() const; 41 | 42 | void SetValue(uint64_t i); 43 | uint64_t GetValue() const; 44 | }; 45 | 46 | }; 47 | 48 | #endif // PLIST_UID_H 49 | -------------------------------------------------------------------------------- /ios-support/plist/Real.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Real.h 3 | * Real node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_REAL_H 23 | #define PLIST_REAL_H 24 | 25 | #include 26 | 27 | namespace PList 28 | { 29 | 30 | class Real : public Node 31 | { 32 | public : 33 | Real(Node* parent = NULL); 34 | Real(plist_t node, Node* parent = NULL); 35 | Real(const Real& d); 36 | Real& operator=(const Real& d); 37 | Real(double d); 38 | virtual ~Real(); 39 | 40 | Node* Clone() const; 41 | 42 | void SetValue(double d); 43 | double GetValue() const; 44 | }; 45 | 46 | }; 47 | 48 | #endif // PLIST_REAL_H 49 | -------------------------------------------------------------------------------- /ios-support/plist/Boolean.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Boolean.h 3 | * Boolean node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_BOOLEAN_H 23 | #define PLIST_BOOLEAN_H 24 | 25 | #include 26 | 27 | namespace PList 28 | { 29 | 30 | class Boolean : public Node 31 | { 32 | public : 33 | Boolean(Node* parent = NULL); 34 | Boolean(plist_t node, Node* parent = NULL); 35 | Boolean(const Boolean& b); 36 | Boolean& operator=(const Boolean& b); 37 | Boolean(bool b); 38 | virtual ~Boolean(); 39 | 40 | Node* Clone() const; 41 | 42 | void SetValue(bool b); 43 | bool GetValue() const; 44 | }; 45 | 46 | }; 47 | 48 | #endif // PLIST_BOOLEAN_H 49 | -------------------------------------------------------------------------------- /ios-support/plist/Key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Key.h 3 | * Key node type for C++ binding 4 | * 5 | * Copyright (c) 2012 Nikias Bassen, All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_KEY_H 23 | #define PLIST_KEY_H 24 | 25 | #include 26 | #include 27 | 28 | namespace PList 29 | { 30 | 31 | class Key : public Node 32 | { 33 | public : 34 | Key(Node* parent = NULL); 35 | Key(plist_t node, Node* parent = NULL); 36 | Key(const Key& k); 37 | Key& operator=(const Key& k); 38 | Key(const std::string& s); 39 | virtual ~Key(); 40 | 41 | Node* Clone() const; 42 | 43 | void SetValue(const std::string& s); 44 | std::string GetValue() const; 45 | }; 46 | 47 | }; 48 | 49 | #endif // PLIST_KEY_H 50 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/plist/Data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Data.h 3 | * Data node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_DATA_H 23 | #define PLIST_DATA_H 24 | 25 | #include 26 | #include 27 | 28 | namespace PList 29 | { 30 | 31 | class Data : public Node 32 | { 33 | public : 34 | Data(Node* parent = NULL); 35 | Data(plist_t node, Node* parent = NULL); 36 | Data(const Data& d); 37 | Data& operator=(const Data& b); 38 | Data(const std::vector& buff); 39 | virtual ~Data(); 40 | 41 | Node* Clone() const; 42 | 43 | void SetValue(const std::vector& buff); 44 | std::vector GetValue() const; 45 | }; 46 | 47 | }; 48 | 49 | #endif // PLIST_DATA_H 50 | -------------------------------------------------------------------------------- /ios-support/plist/String.h: -------------------------------------------------------------------------------- 1 | /* 2 | * String.h 3 | * String node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_STRING_H 23 | #define PLIST_STRING_H 24 | 25 | #include 26 | #include 27 | 28 | namespace PList 29 | { 30 | 31 | class String : public Node 32 | { 33 | public : 34 | String(Node* parent = NULL); 35 | String(plist_t node, Node* parent = NULL); 36 | String(const String& s); 37 | String& operator=(const String& s); 38 | String(const std::string& s); 39 | virtual ~String(); 40 | 41 | Node* Clone() const; 42 | 43 | void SetValue(const std::string& s); 44 | std::string GetValue() const; 45 | }; 46 | 47 | }; 48 | 49 | #endif // PLIST_STRING_H 50 | -------------------------------------------------------------------------------- /ios-support/plist/Date.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Date.h 3 | * Date node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_DATE_H 23 | #define PLIST_DATE_H 24 | 25 | #include 26 | #include 27 | #ifdef _MSC_VER 28 | #include 29 | #else 30 | #include 31 | #endif 32 | 33 | namespace PList 34 | { 35 | 36 | class Date : public Node 37 | { 38 | public : 39 | Date(Node* parent = NULL); 40 | Date(plist_t node, Node* parent = NULL); 41 | Date(const Date& d); 42 | Date& operator=(const Date& d); 43 | Date(timeval t); 44 | virtual ~Date(); 45 | 46 | Node* Clone() const; 47 | 48 | void SetValue(timeval t); 49 | timeval GetValue() const; 50 | }; 51 | 52 | }; 53 | 54 | #endif // PLIST_DATE_H 55 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/plist/Node.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Node.h 3 | * Abstract node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_NODE_H 23 | #define PLIST_NODE_H 24 | 25 | #include 26 | #include 27 | 28 | namespace PList 29 | { 30 | 31 | class Node 32 | { 33 | public : 34 | virtual ~Node(); 35 | 36 | virtual Node* Clone() const = 0; 37 | 38 | Node * GetParent() const; 39 | plist_type GetType() const; 40 | plist_t GetPlist() const; 41 | 42 | static Node* FromPlist(plist_t node, Node* parent = NULL); 43 | 44 | protected: 45 | Node(Node* parent = NULL); 46 | Node(plist_t node, Node* parent = NULL); 47 | Node(plist_type type, Node* parent = NULL); 48 | plist_t _node; 49 | 50 | private: 51 | Node* _parent; 52 | friend class Structure; 53 | }; 54 | 55 | }; 56 | 57 | #endif // PLIST_NODE_H 58 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/plist/Integer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Integer.h 3 | * Integer node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_INTEGER_H 23 | #define PLIST_INTEGER_H 24 | 25 | #include 26 | 27 | namespace PList 28 | { 29 | 30 | class Integer : public Node 31 | { 32 | public : 33 | Integer(Node* parent = NULL); 34 | Integer(plist_t node, Node* parent = NULL); 35 | Integer(const Integer& i); 36 | Integer& operator=(const Integer& i); 37 | Integer(uint64_t i); 38 | Integer(int64_t i); 39 | virtual ~Integer(); 40 | 41 | Node* Clone() const; 42 | 43 | void SetValue(int64_t i); 44 | void SetValue(uint64_t i); 45 | void SetUnsignedValue(uint64_t i); 46 | int64_t GetValue() const; 47 | uint64_t GetUnsignedValue() const; 48 | 49 | bool isNegative() const; 50 | }; 51 | 52 | }; 53 | 54 | #endif // PLIST_INTEGER_H 55 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/plist/Structure.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Structure.h 3 | * Structure node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_STRUCTURE_H 23 | #define PLIST_STRUCTURE_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace PList 30 | { 31 | 32 | class Structure : public Node 33 | { 34 | public : 35 | virtual ~Structure(); 36 | 37 | uint32_t GetSize() const; 38 | 39 | std::string ToXml() const; 40 | std::vector ToBin() const; 41 | 42 | virtual void Remove(Node* node) = 0; 43 | 44 | static Structure* FromXml(const std::string& xml); 45 | static Structure* FromBin(const std::vector& bin); 46 | 47 | protected: 48 | Structure(Node* parent = NULL); 49 | Structure(plist_type type, Node* parent = NULL); 50 | void UpdateNodeParent(Node* node); 51 | 52 | private: 53 | Structure(Structure& s); 54 | Structure& operator=(const Structure& s); 55 | }; 56 | 57 | }; 58 | 59 | #endif // PLIST_STRUCTURE_H 60 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/openssl/fips_names.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2024 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 | * All parameters are of type: OSSL_PARAM_UTF8_STRING 21 | */ 22 | 23 | /* The following 4 Parameters are used for FIPS Self Testing */ 24 | 25 | /* The calculated MAC of the module file */ 26 | # define OSSL_PROV_FIPS_PARAM_MODULE_MAC "module-mac" 27 | /* The Version number for the fips install process */ 28 | # define OSSL_PROV_FIPS_PARAM_INSTALL_VERSION "install-version" 29 | /* The calculated MAC of the install status indicator */ 30 | # define OSSL_PROV_FIPS_PARAM_INSTALL_MAC "install-mac" 31 | /* The install status indicator */ 32 | # define OSSL_PROV_FIPS_PARAM_INSTALL_STATUS "install-status" 33 | 34 | /* 35 | * A boolean that determines if the FIPS conditional test errors result in 36 | * the module entering an error state. 37 | * Type: OSSL_PARAM_UTF8_STRING 38 | */ 39 | # define OSSL_PROV_FIPS_PARAM_CONDITIONAL_ERRORS "conditional-errors" 40 | 41 | /* The following are provided for backwards compatibility */ 42 | # define OSSL_PROV_FIPS_PARAM_SECURITY_CHECKS OSSL_PROV_PARAM_SECURITY_CHECKS 43 | # define OSSL_PROV_FIPS_PARAM_TLS1_PRF_EMS_CHECK OSSL_PROV_PARAM_TLS1_PRF_EMS_CHECK 44 | # define OSSL_PROV_FIPS_PARAM_DRBG_TRUNC_DIGEST OSSL_PROV_PARAM_DRBG_TRUNC_DIGEST 45 | 46 | # ifdef __cplusplus 47 | } 48 | # endif 49 | 50 | #endif /* OPENSSL_FIPS_NAMES_H */ 51 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/openssl/pkcs12err.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_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_CALLBACK_FAILED 115 25 | # define PKCS12_R_CANT_PACK_STRUCTURE 100 26 | # define PKCS12_R_CONTENT_TYPE_NOT_DATA 121 27 | # define PKCS12_R_DECODE_ERROR 101 28 | # define PKCS12_R_ENCODE_ERROR 102 29 | # define PKCS12_R_ENCRYPT_ERROR 103 30 | # define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE 120 31 | # define PKCS12_R_INVALID_NULL_ARGUMENT 104 32 | # define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105 33 | # define PKCS12_R_INVALID_TYPE 112 34 | # define PKCS12_R_IV_GEN_ERROR 106 35 | # define PKCS12_R_KEY_GEN_ERROR 107 36 | # define PKCS12_R_MAC_ABSENT 108 37 | # define PKCS12_R_MAC_GENERATION_ERROR 109 38 | # define PKCS12_R_MAC_SETUP_ERROR 110 39 | # define PKCS12_R_MAC_STRING_SET_ERROR 111 40 | # define PKCS12_R_MAC_VERIFY_FAILURE 113 41 | # define PKCS12_R_PARSE_ERROR 114 42 | # define PKCS12_R_PKCS12_CIPHERFINAL_ERROR 116 43 | # define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM 118 44 | # define PKCS12_R_UNSUPPORTED_PKCS12_MODE 119 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/plist/Array.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Array.h 3 | * Array node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_ARRAY_H 23 | #define PLIST_ARRAY_H 24 | 25 | #include 26 | #include 27 | 28 | namespace PList 29 | { 30 | 31 | class Array : public Structure 32 | { 33 | public : 34 | Array(Node* parent = NULL); 35 | Array(plist_t node, Node* parent = NULL); 36 | Array(const Array& a); 37 | Array& operator=(const Array& a); 38 | virtual ~Array(); 39 | 40 | Node* Clone() const; 41 | 42 | typedef std::vector::iterator iterator; 43 | typedef std::vector::const_iterator const_iterator; 44 | 45 | Node* operator[](unsigned int index); 46 | iterator Begin(); 47 | iterator begin(); 48 | iterator End(); 49 | iterator end(); 50 | const_iterator Begin() const; 51 | const_iterator begin() const; 52 | const_iterator End() const; 53 | const_iterator end() const; 54 | size_t size() const; 55 | void Append(Node* node); 56 | void Insert(Node* node, unsigned int pos); 57 | void Remove(Node* node); 58 | void Remove(unsigned int pos); 59 | unsigned int GetNodeIndex(Node* node) const; 60 | 61 | private : 62 | std::vector _array; 63 | }; 64 | 65 | }; 66 | 67 | #endif // PLIST_ARRAY_H 68 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL Advanced" 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | schedule: 9 | - cron: '39 0 * * 3' 10 | 11 | jobs: 12 | analyze: 13 | name: Analyze (${{ matrix.language }}) 14 | runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} 15 | permissions: 16 | security-events: write 17 | packages: read 18 | actions: read 19 | contents: read 20 | 21 | strategy: 22 | fail-fast: false 23 | matrix: 24 | include: 25 | - language: c-cpp 26 | build-mode: manual 27 | # Other languages can be added here as needed 28 | 29 | steps: 30 | - name: Checkout repository 31 | uses: actions/checkout@v4 32 | 33 | # Initialize git submodules 34 | - name: Initialize submodules 35 | run: | 36 | git submodule update --init --recursive 37 | 38 | # Step to set up build environment and compile code 39 | - name: Set up Clang and build the project 40 | run: | 41 | sudo apt-get update 42 | sudo apt-get install -y clang libplist-dev make 43 | 44 | # Ensure submodules are built 45 | cd lib/libshortcutsign/libs/lzfse 46 | make # Build the submodule (if it's necessary) 47 | 48 | # Go back to the root directory and build the project 49 | cd ../../../.. 50 | make # Build the main project 51 | 52 | # List build artifacts 53 | - name: List build artifacts 54 | run: | 55 | ls -R 56 | 57 | # Initializes the CodeQL tools for scanning. 58 | - name: Initialize CodeQL 59 | uses: github/codeql-action/init@v3 60 | with: 61 | languages: ${{ matrix.language }} 62 | build-mode: ${{ matrix.build-mode }} 63 | 64 | # Create CodeQL database manually with --overwrite flag 65 | - name: Create CodeQL database 66 | run: | 67 | ${CODEQL_DIST}/codeql database create /home/runner/work/_temp/codeql_databases/cpp --language=cpp --command="make" --overwrite 68 | 69 | # Perform CodeQL analysis (only after the project has been built) 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v3 72 | with: 73 | category: "/language:${{matrix.language}}" 74 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/plist/Dictionary.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Dictionary.h 3 | * Dictionary node type for C++ binding 4 | * 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef PLIST_DICTIONARY_H 23 | #define PLIST_DICTIONARY_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace PList 30 | { 31 | 32 | class Dictionary : public Structure 33 | { 34 | public : 35 | Dictionary(Node* parent = NULL); 36 | Dictionary(plist_t node, Node* parent = NULL); 37 | Dictionary(const Dictionary& d); 38 | Dictionary& operator=(const Dictionary& d); 39 | virtual ~Dictionary(); 40 | 41 | Node* Clone() const; 42 | 43 | typedef std::map::iterator iterator; 44 | typedef std::map::const_iterator const_iterator; 45 | 46 | Node* operator[](const std::string& key); 47 | iterator Begin(); 48 | iterator begin(); 49 | iterator End(); 50 | iterator end(); 51 | iterator Find(const std::string& key); 52 | const_iterator Begin() const; 53 | const_iterator begin() const; 54 | const_iterator End() const; 55 | const_iterator end() const; 56 | size_t size() const; 57 | const_iterator Find(const std::string& key) const; 58 | iterator Set(const std::string& key, const Node* node); 59 | iterator Set(const std::string& key, const Node& node); 60 | void Remove(Node* node); 61 | void Remove(const std::string& key); 62 | std::string GetNodeKey(Node* node); 63 | 64 | private : 65 | std::map _map; 66 | 67 | 68 | }; 69 | 70 | }; 71 | 72 | #endif // PLIST_DICTIONARY_H 73 | -------------------------------------------------------------------------------- /ios-support/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 | /* DOUBLE AEAD SRTP protection profiles from RFC 8723 */ 43 | # define SRTP_DOUBLE_AEAD_AES_128_GCM_AEAD_AES_128_GCM 0x0009 44 | # define SRTP_DOUBLE_AEAD_AES_256_GCM_AEAD_AES_256_GCM 0x000A 45 | 46 | /* ARIA SRTP protection profiles from RFC 8269 */ 47 | # define SRTP_ARIA_128_CTR_HMAC_SHA1_80 0x000B 48 | # define SRTP_ARIA_128_CTR_HMAC_SHA1_32 0x000C 49 | # define SRTP_ARIA_256_CTR_HMAC_SHA1_80 0x000D 50 | # define SRTP_ARIA_256_CTR_HMAC_SHA1_32 0x000E 51 | # define SRTP_AEAD_ARIA_128_GCM 0x000F 52 | # define SRTP_AEAD_ARIA_256_GCM 0x0010 53 | 54 | # ifndef OPENSSL_NO_SRTP 55 | 56 | __owur int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); 57 | __owur int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles); 58 | 59 | __owur STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); 60 | __owur SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); 61 | 62 | # endif 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /ios-support/openssl/conferr.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_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 | -------------------------------------------------------------------------------- /ios-support/openssl/quic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2024 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_QUIC_H 11 | # define OPENSSL_QUIC_H 12 | # pragma once 13 | 14 | # include 15 | # include 16 | 17 | # ifndef OPENSSL_NO_QUIC 18 | 19 | # ifdef __cplusplus 20 | extern "C" { 21 | # endif 22 | 23 | /* 24 | * Method used for non-thread-assisted QUIC client operation. 25 | */ 26 | __owur const SSL_METHOD *OSSL_QUIC_client_method(void); 27 | 28 | /* 29 | * Method used for thread-assisted QUIC client operation. 30 | */ 31 | __owur const SSL_METHOD *OSSL_QUIC_client_thread_method(void); 32 | 33 | /* 34 | * QUIC transport error codes (RFC 9000 s. 20.1) 35 | */ 36 | # define OSSL_QUIC_ERR_NO_ERROR 0x00 37 | # define OSSL_QUIC_ERR_INTERNAL_ERROR 0x01 38 | # define OSSL_QUIC_ERR_CONNECTION_REFUSED 0x02 39 | # define OSSL_QUIC_ERR_FLOW_CONTROL_ERROR 0x03 40 | # define OSSL_QUIC_ERR_STREAM_LIMIT_ERROR 0x04 41 | # define OSSL_QUIC_ERR_STREAM_STATE_ERROR 0x05 42 | # define OSSL_QUIC_ERR_FINAL_SIZE_ERROR 0x06 43 | # define OSSL_QUIC_ERR_FRAME_ENCODING_ERROR 0x07 44 | # define OSSL_QUIC_ERR_TRANSPORT_PARAMETER_ERROR 0x08 45 | # define OSSL_QUIC_ERR_CONNECTION_ID_LIMIT_ERROR 0x09 46 | # define OSSL_QUIC_ERR_PROTOCOL_VIOLATION 0x0A 47 | # define OSSL_QUIC_ERR_INVALID_TOKEN 0x0B 48 | # define OSSL_QUIC_ERR_APPLICATION_ERROR 0x0C 49 | # define OSSL_QUIC_ERR_CRYPTO_BUFFER_EXCEEDED 0x0D 50 | # define OSSL_QUIC_ERR_KEY_UPDATE_ERROR 0x0E 51 | # define OSSL_QUIC_ERR_AEAD_LIMIT_REACHED 0x0F 52 | # define OSSL_QUIC_ERR_NO_VIABLE_PATH 0x10 53 | 54 | /* Inclusive range for handshake-specific errors. */ 55 | # define OSSL_QUIC_ERR_CRYPTO_ERR_BEGIN 0x0100 56 | # define OSSL_QUIC_ERR_CRYPTO_ERR_END 0x01FF 57 | 58 | # define OSSL_QUIC_ERR_CRYPTO_ERR(X) \ 59 | (OSSL_QUIC_ERR_CRYPTO_ERR_BEGIN + (X)) 60 | 61 | /* Local errors. */ 62 | # define OSSL_QUIC_LOCAL_ERR_IDLE_TIMEOUT \ 63 | ((uint64_t)0xFFFFFFFFFFFFFFFFULL) 64 | 65 | # ifdef __cplusplus 66 | } 67 | # endif 68 | 69 | # endif /* OPENSSL_NO_QUIC */ 70 | #endif 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # shortcut-sign 2 | Open-Source Signed Shortcut CLI tool for Linux+macOS 3 | 4 | Build by doing `make` after using git to init the submodules. 5 | 6 | # Dependencies 7 | 8 | - OpenSSL 9 | - libplist 2.0 10 | 11 | # CLI Usage 12 | ``` 13 | Usage: shortcut-sign command 14 | 15 | Commands: 16 | 17 | sign: sign an unsigned shortcut 18 | extract: extract unsigned shortcut from a signed shortcut 19 | verify: verify signature of signed shortcut 20 | auth: extract auth data of shortcut 21 | resign: resign a signed shortcut 22 | info: log info about signed shortcut's signing chain 23 | version: display version of shortcut-sign 24 | 25 | Options: 26 | 27 | -i: path to the input file or directory 28 | -o: path to the output file or directory 29 | -u: optional option for resign command, for signing over shortcut with unsigned shortcut 30 | -k: for signing/resigning, specify file containing ASN1 private ECDSA-P256 key 31 | -a: for signing, specify file containing auth data 32 | -r/-raw_aar: flag to specify extracting the raw aar or sign raw aar data instead of plist 33 | -h: this ;-) 34 | 35 | ``` 36 | 37 | # Dumping Auth Data / Private Keys 38 | 39 | [https://github.com/0xilis/appleid-key-dumper](https://github.com/0xilis/appleid-key-dumper) features a CLI for jailbreak iOS devices to dump the Apple ID keys and Auth Data from your device. If you want to dump them from an AMFI-disabled Mac, by modifying the hardcoded path in main.m as well as making a new Makefile, you can compile it and dump the keys. 40 | 41 | # Contributing 42 | 43 | Contributions are welcome! Not just to the code, but also better documentation would also be appreciated. If you have contributions for a 2nd party library such as libshortcutsign or libNeoAppleArchive, please report them in their github pages. If you can't think of what to contribute, you can check the TODO section for a list. Please keep in mind that the goal of shortcut-sign is to provide a **cross-platform** signing tool, so things specific to macOS and not working on Linux are likely to not be accepted unless it is a need. 44 | 45 | ### Contributing (TODO): 46 | 47 | - Write tests 48 | - Build CLI for more devices 49 | - Once libNeoAppleArchive neo_aea_sign_* functions are complete, utilize those rather than piggybacking off of embeddedSignedData 50 | - Option to replicate identity services and fetch private key/cert/validation record over HTTPS from Apple ID, thus not requiring an Apple device to dump keys from. This is the most ambitious and will take the most time, and may not be done. 51 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/openssl/httperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2024 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_RESPONSE_TOO_MANY_HDRLINES 130 48 | # define HTTP_R_RETRY_TIMEOUT 129 49 | # define HTTP_R_SERVER_CANCELED_CONNECTION 127 50 | # define HTTP_R_SOCK_NOT_SUPPORTED 122 51 | # define HTTP_R_STATUS_CODE_UNSUPPORTED 114 52 | # define HTTP_R_TLS_NOT_ENABLED 107 53 | # define HTTP_R_TOO_MANY_REDIRECTIONS 115 54 | # define HTTP_R_UNEXPECTED_CONTENT_TYPE 118 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /ios-support/openssl/cryptoerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2024 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_INTEGER_OVERFLOW 127 32 | # define CRYPTO_R_INVALID_NEGATIVE_VALUE 122 33 | # define CRYPTO_R_INVALID_NULL_ARGUMENT 109 34 | # define CRYPTO_R_INVALID_OSSL_PARAM_TYPE 110 35 | # define CRYPTO_R_NO_PARAMS_TO_MERGE 131 36 | # define CRYPTO_R_NO_SPACE_FOR_TERMINATING_NULL 128 37 | # define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103 38 | # define CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY 123 39 | # define CRYPTO_R_PARAM_NOT_INTEGER_TYPE 124 40 | # define CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE 129 41 | # define CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED 125 42 | # define CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT 130 43 | # define CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION 126 44 | # define CRYPTO_R_PROVIDER_ALREADY_EXISTS 104 45 | # define CRYPTO_R_PROVIDER_SECTION_ERROR 105 46 | # define CRYPTO_R_RANDOM_SECTION_ERROR 119 47 | # define CRYPTO_R_SECURE_MALLOC_FAILURE 111 48 | # define CRYPTO_R_STRING_TOO_LONG 112 49 | # define CRYPTO_R_TOO_MANY_BYTES 113 50 | # define CRYPTO_R_TOO_MANY_NAMES 132 51 | # define CRYPTO_R_TOO_MANY_RECORDS 114 52 | # define CRYPTO_R_TOO_SMALL_BUFFER 116 53 | # define CRYPTO_R_UNKNOWN_NAME_IN_RANDOM_SECTION 120 54 | # define CRYPTO_R_ZERO_LENGTH_NUMBER 115 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /ios-support/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_INVALID_SIZE 129 44 | # define DH_R_KDF_PARAMETER_ERROR 112 45 | # define DH_R_KEYS_NOT_SET 108 46 | # define DH_R_MISSING_PUBKEY 125 47 | # define DH_R_MODULUS_TOO_LARGE 103 48 | # define DH_R_MODULUS_TOO_SMALL 126 49 | # define DH_R_NOT_SUITABLE_GENERATOR 120 50 | # define DH_R_NO_PARAMETERS_SET 107 51 | # define DH_R_NO_PRIVATE_VALUE 100 52 | # define DH_R_PARAMETER_ENCODING_ERROR 105 53 | # define DH_R_PEER_KEY_ERROR 111 54 | # define DH_R_Q_TOO_LARGE 130 55 | # define DH_R_SHARED_INFO_ERROR 113 56 | # define DH_R_UNABLE_TO_CHECK_GENERATOR 121 57 | 58 | # endif 59 | #endif 60 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/openssl/provider.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2023 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 and Get a library context search path */ 21 | int OSSL_PROVIDER_set_default_search_path(OSSL_LIB_CTX *, const char *path); 22 | const char *OSSL_PROVIDER_get0_default_search_path(OSSL_LIB_CTX *libctx); 23 | 24 | /* Load and unload a provider */ 25 | OSSL_PROVIDER *OSSL_PROVIDER_load(OSSL_LIB_CTX *, const char *name); 26 | OSSL_PROVIDER *OSSL_PROVIDER_load_ex(OSSL_LIB_CTX *, const char *name, 27 | OSSL_PARAM *params); 28 | OSSL_PROVIDER *OSSL_PROVIDER_try_load(OSSL_LIB_CTX *, const char *name, 29 | int retain_fallbacks); 30 | OSSL_PROVIDER *OSSL_PROVIDER_try_load_ex(OSSL_LIB_CTX *, const char *name, 31 | OSSL_PARAM *params, 32 | int retain_fallbacks); 33 | int OSSL_PROVIDER_unload(OSSL_PROVIDER *prov); 34 | int OSSL_PROVIDER_available(OSSL_LIB_CTX *, const char *name); 35 | int OSSL_PROVIDER_do_all(OSSL_LIB_CTX *ctx, 36 | int (*cb)(OSSL_PROVIDER *provider, void *cbdata), 37 | void *cbdata); 38 | 39 | const OSSL_PARAM *OSSL_PROVIDER_gettable_params(const OSSL_PROVIDER *prov); 40 | int OSSL_PROVIDER_get_params(const OSSL_PROVIDER *prov, OSSL_PARAM params[]); 41 | int OSSL_PROVIDER_self_test(const OSSL_PROVIDER *prov); 42 | int OSSL_PROVIDER_get_capabilities(const OSSL_PROVIDER *prov, 43 | const char *capability, 44 | OSSL_CALLBACK *cb, 45 | void *arg); 46 | 47 | const OSSL_ALGORITHM *OSSL_PROVIDER_query_operation(const OSSL_PROVIDER *prov, 48 | int operation_id, 49 | int *no_cache); 50 | void OSSL_PROVIDER_unquery_operation(const OSSL_PROVIDER *prov, 51 | int operation_id, const OSSL_ALGORITHM *algs); 52 | void *OSSL_PROVIDER_get0_provider_ctx(const OSSL_PROVIDER *prov); 53 | const OSSL_DISPATCH *OSSL_PROVIDER_get0_dispatch(const OSSL_PROVIDER *prov); 54 | 55 | /* Add a built in providers */ 56 | int OSSL_PROVIDER_add_builtin(OSSL_LIB_CTX *, const char *name, 57 | OSSL_provider_init_fn *init_fn); 58 | 59 | /* Information */ 60 | const char *OSSL_PROVIDER_get0_name(const OSSL_PROVIDER *prov); 61 | 62 | # ifdef __cplusplus 63 | } 64 | # endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/openssl/randerr.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_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_INVALID_PROPERTY_QUERY 137 45 | # define RAND_R_IN_ERROR_STATE 114 46 | # define RAND_R_NOT_A_REGULAR_FILE 122 47 | # define RAND_R_NOT_INSTANTIATED 115 48 | # define RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED 128 49 | # define RAND_R_PARENT_LOCKING_NOT_ENABLED 130 50 | # define RAND_R_PARENT_STRENGTH_TOO_WEAK 131 51 | # define RAND_R_PERSONALISATION_STRING_TOO_LONG 116 52 | # define RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED 133 53 | # define RAND_R_PRNG_NOT_SEEDED 100 54 | # define RAND_R_RANDOM_POOL_OVERFLOW 125 55 | # define RAND_R_RANDOM_POOL_UNDERFLOW 134 56 | # define RAND_R_REQUEST_TOO_LARGE_FOR_DRBG 117 57 | # define RAND_R_RESEED_ERROR 118 58 | # define RAND_R_SELFTEST_FAILURE 119 59 | # define RAND_R_TOO_LITTLE_NONCE_REQUESTED 135 60 | # define RAND_R_TOO_MUCH_NONCE_REQUESTED 136 61 | # define RAND_R_UNABLE_TO_CREATE_DRBG 143 62 | # define RAND_R_UNABLE_TO_FETCH_DRBG 144 63 | # define RAND_R_UNABLE_TO_GET_PARENT_RESEED_PROP_COUNTER 141 64 | # define RAND_R_UNABLE_TO_GET_PARENT_STRENGTH 138 65 | # define RAND_R_UNABLE_TO_LOCK_PARENT 140 66 | # define RAND_R_UNSUPPORTED_DRBG_FLAGS 132 67 | # define RAND_R_UNSUPPORTED_DRBG_TYPE 120 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /ios-support/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 | -------------------------------------------------------------------------------- /ios-support/openssl/x509err.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2024 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_UNSUPPORTED_VERSION 145 67 | # define X509_R_WRONG_LOOKUP_TYPE 112 68 | # define X509_R_WRONG_TYPE 122 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /ios-support/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 4 32 | # define OPENSSL_VERSION_PATCH 1 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.4.1" 78 | # define OPENSSL_FULL_VERSION_STR "3.4.1" 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 "11 Feb 2025" 86 | 87 | /* 88 | * SECTION 4: BACKWARD COMPATIBILITY 89 | */ 90 | 91 | # define OPENSSL_VERSION_TEXT "OpenSSL 3.4.1 11 Feb 2025" 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 | -------------------------------------------------------------------------------- /ios-support/openssl/bioerr.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_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_LOCAL_ADDR_NOT_AVAILABLE 111 41 | # define BIO_R_LOOKUP_RETURNED_NOTHING 142 42 | # define BIO_R_MALFORMED_HOST_OR_SERVICE 130 43 | # define BIO_R_NBIO_CONNECT_ERROR 110 44 | # define BIO_R_NON_FATAL 112 45 | # define BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED 143 46 | # define BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED 144 47 | # define BIO_R_NO_PORT_DEFINED 113 48 | # define BIO_R_NO_SUCH_FILE 128 49 | # define BIO_R_NULL_PARAMETER 115 /* unused */ 50 | # define BIO_R_TFO_DISABLED 106 51 | # define BIO_R_TFO_NO_KERNEL_SUPPORT 108 52 | # define BIO_R_TRANSFER_ERROR 104 53 | # define BIO_R_TRANSFER_TIMEOUT 105 54 | # define BIO_R_UNABLE_TO_BIND_SOCKET 117 55 | # define BIO_R_UNABLE_TO_CREATE_SOCKET 118 56 | # define BIO_R_UNABLE_TO_KEEPALIVE 137 57 | # define BIO_R_UNABLE_TO_LISTEN_SOCKET 119 58 | # define BIO_R_UNABLE_TO_NODELAY 138 59 | # define BIO_R_UNABLE_TO_REUSEADDR 139 60 | # define BIO_R_UNABLE_TO_TFO 109 61 | # define BIO_R_UNAVAILABLE_IP_FAMILY 145 62 | # define BIO_R_UNINITIALIZED 120 63 | # define BIO_R_UNKNOWN_INFO_TYPE 140 64 | # define BIO_R_UNSUPPORTED_IP_FAMILY 146 65 | # define BIO_R_UNSUPPORTED_METHOD 121 66 | # define BIO_R_UNSUPPORTED_PROTOCOL_FAMILY 131 67 | # define BIO_R_WRITE_TO_READ_ONLY_BIO 126 68 | # define BIO_R_WSASTARTUP 122 69 | # define BIO_R_PORT_MISMATCH 150 70 | # define BIO_R_PEER_ADDR_NOT_AVAILABLE 151 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /ios-support/openssl/async.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2022 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 | typedef void *(*ASYNC_stack_alloc_fn)(size_t *num); 84 | typedef void (*ASYNC_stack_free_fn)(void *addr); 85 | 86 | int ASYNC_set_mem_functions(ASYNC_stack_alloc_fn alloc_fn, 87 | ASYNC_stack_free_fn free_fn); 88 | void ASYNC_get_mem_functions(ASYNC_stack_alloc_fn *alloc_fn, 89 | ASYNC_stack_free_fn *free_fn); 90 | 91 | int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret, 92 | int (*func)(void *), void *args, size_t size); 93 | int ASYNC_pause_job(void); 94 | 95 | ASYNC_JOB *ASYNC_get_current_job(void); 96 | ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job); 97 | void ASYNC_block_pause(void); 98 | void ASYNC_unblock_pause(void); 99 | 100 | 101 | # ifdef __cplusplus 102 | } 103 | # endif 104 | #endif 105 | -------------------------------------------------------------------------------- /ios-support/openssl/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-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_AES_H 11 | # define OPENSSL_AES_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_AES_H 17 | # endif 18 | 19 | # include 20 | 21 | # include 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define AES_BLOCK_SIZE 16 27 | 28 | # ifndef OPENSSL_NO_DEPRECATED_3_0 29 | 30 | # define AES_ENCRYPT 1 31 | # define AES_DECRYPT 0 32 | 33 | # define AES_MAXNR 14 34 | 35 | 36 | /* This should be a hidden type, but EVP requires that the size be known */ 37 | struct aes_key_st { 38 | # ifdef AES_LONG 39 | unsigned long rd_key[4 * (AES_MAXNR + 1)]; 40 | # else 41 | unsigned int rd_key[4 * (AES_MAXNR + 1)]; 42 | # endif 43 | int rounds; 44 | }; 45 | typedef struct aes_key_st AES_KEY; 46 | 47 | # endif 48 | # ifndef OPENSSL_NO_DEPRECATED_3_0 49 | OSSL_DEPRECATEDIN_3_0 const char *AES_options(void); 50 | OSSL_DEPRECATEDIN_3_0 51 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits, 52 | AES_KEY *key); 53 | OSSL_DEPRECATEDIN_3_0 54 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits, 55 | AES_KEY *key); 56 | OSSL_DEPRECATEDIN_3_0 57 | void AES_encrypt(const unsigned char *in, unsigned char *out, 58 | const AES_KEY *key); 59 | OSSL_DEPRECATEDIN_3_0 60 | void AES_decrypt(const unsigned char *in, unsigned char *out, 61 | const AES_KEY *key); 62 | OSSL_DEPRECATEDIN_3_0 63 | void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, 64 | const AES_KEY *key, const int enc); 65 | OSSL_DEPRECATEDIN_3_0 66 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, 67 | size_t length, const AES_KEY *key, 68 | unsigned char *ivec, const int enc); 69 | OSSL_DEPRECATEDIN_3_0 70 | void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, 71 | size_t length, const AES_KEY *key, 72 | unsigned char *ivec, int *num, const int enc); 73 | OSSL_DEPRECATEDIN_3_0 74 | void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, 75 | size_t length, const AES_KEY *key, 76 | unsigned char *ivec, int *num, const int enc); 77 | OSSL_DEPRECATEDIN_3_0 78 | void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, 79 | size_t length, const AES_KEY *key, 80 | unsigned char *ivec, int *num, const int enc); 81 | OSSL_DEPRECATEDIN_3_0 82 | void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, 83 | size_t length, const AES_KEY *key, 84 | unsigned char *ivec, int *num); 85 | 86 | /* NB: the IV is _two_ blocks long */ 87 | OSSL_DEPRECATEDIN_3_0 88 | void AES_ige_encrypt(const unsigned char *in, unsigned char *out, 89 | size_t length, const AES_KEY *key, 90 | unsigned char *ivec, const int enc); 91 | /* NB: the IV is _four_ blocks long */ 92 | OSSL_DEPRECATEDIN_3_0 93 | void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out, 94 | size_t length, const AES_KEY *key, const AES_KEY *key2, 95 | const unsigned char *ivec, const int enc); 96 | OSSL_DEPRECATEDIN_3_0 97 | int AES_wrap_key(AES_KEY *key, const unsigned char *iv, 98 | unsigned char *out, const unsigned char *in, 99 | unsigned int inlen); 100 | OSSL_DEPRECATEDIN_3_0 101 | int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, 102 | unsigned char *out, const unsigned char *in, 103 | unsigned int inlen); 104 | # endif 105 | 106 | 107 | # ifdef __cplusplus 108 | } 109 | # endif 110 | 111 | #endif 112 | -------------------------------------------------------------------------------- /ios-support/openssl/seed.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-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 | /* 11 | * Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved. 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions 15 | * are met: 16 | * 1. Redistributions of source code must retain the above copyright 17 | * notice, this list of conditions and the following disclaimer. 18 | * 2. Neither the name of author nor the names of its contributors may 19 | * be used to endorse or promote products derived from this software 20 | * without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 23 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 | * SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef OPENSSL_SEED_H 36 | # define OPENSSL_SEED_H 37 | # pragma once 38 | 39 | # include 40 | # ifndef OPENSSL_NO_DEPRECATED_3_0 41 | # define HEADER_SEED_H 42 | # endif 43 | 44 | # include 45 | 46 | # ifndef OPENSSL_NO_SEED 47 | # include 48 | # include 49 | # include 50 | 51 | # ifdef __cplusplus 52 | extern "C" { 53 | # endif 54 | 55 | # define SEED_BLOCK_SIZE 16 56 | # define SEED_KEY_LENGTH 16 57 | 58 | # ifndef OPENSSL_NO_DEPRECATED_3_0 59 | /* look whether we need 'long' to get 32 bits */ 60 | # ifdef AES_LONG 61 | # ifndef SEED_LONG 62 | # define SEED_LONG 1 63 | # endif 64 | # endif 65 | 66 | 67 | typedef struct seed_key_st { 68 | # ifdef SEED_LONG 69 | unsigned long data[32]; 70 | # else 71 | unsigned int data[32]; 72 | # endif 73 | } SEED_KEY_SCHEDULE; 74 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 75 | # ifndef OPENSSL_NO_DEPRECATED_3_0 76 | OSSL_DEPRECATEDIN_3_0 77 | void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], 78 | SEED_KEY_SCHEDULE *ks); 79 | OSSL_DEPRECATEDIN_3_0 80 | void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE], 81 | unsigned char d[SEED_BLOCK_SIZE], 82 | const SEED_KEY_SCHEDULE *ks); 83 | OSSL_DEPRECATEDIN_3_0 84 | void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE], 85 | unsigned char d[SEED_BLOCK_SIZE], 86 | const SEED_KEY_SCHEDULE *ks); 87 | OSSL_DEPRECATEDIN_3_0 88 | void SEED_ecb_encrypt(const unsigned char *in, 89 | unsigned char *out, 90 | const SEED_KEY_SCHEDULE *ks, int enc); 91 | OSSL_DEPRECATEDIN_3_0 92 | void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, 93 | const SEED_KEY_SCHEDULE *ks, 94 | unsigned char ivec[SEED_BLOCK_SIZE], 95 | int enc); 96 | OSSL_DEPRECATEDIN_3_0 97 | void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out, 98 | size_t len, const SEED_KEY_SCHEDULE *ks, 99 | unsigned char ivec[SEED_BLOCK_SIZE], 100 | int *num, int enc); 101 | OSSL_DEPRECATEDIN_3_0 102 | void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out, 103 | size_t len, const SEED_KEY_SCHEDULE *ks, 104 | unsigned char ivec[SEED_BLOCK_SIZE], 105 | int *num); 106 | # endif 107 | 108 | # ifdef __cplusplus 109 | } 110 | # endif 111 | # endif 112 | 113 | #endif 114 | -------------------------------------------------------------------------------- /ios-support/openssl/rand.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_RAND_H 11 | # define OPENSSL_RAND_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RAND_H 17 | # endif 18 | 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* 30 | * Default security strength (in the sense of [NIST SP 800-90Ar1]) 31 | * 32 | * NIST SP 800-90Ar1 supports the strength of the DRBG being smaller than that 33 | * of the cipher by collecting less entropy. The current DRBG implementation 34 | * does not take RAND_DRBG_STRENGTH into account and sets the strength of the 35 | * DRBG to that of the cipher. 36 | */ 37 | # define RAND_DRBG_STRENGTH 256 38 | 39 | # ifndef OPENSSL_NO_DEPRECATED_3_0 40 | struct rand_meth_st { 41 | int (*seed) (const void *buf, int num); 42 | int (*bytes) (unsigned char *buf, int num); 43 | void (*cleanup) (void); 44 | int (*add) (const void *buf, int num, double randomness); 45 | int (*pseudorand) (unsigned char *buf, int num); 46 | int (*status) (void); 47 | }; 48 | 49 | OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth); 50 | OSSL_DEPRECATEDIN_3_0 const RAND_METHOD *RAND_get_rand_method(void); 51 | # ifndef OPENSSL_NO_ENGINE 52 | OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_engine(ENGINE *engine); 53 | # endif 54 | 55 | OSSL_DEPRECATEDIN_3_0 RAND_METHOD *RAND_OpenSSL(void); 56 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 57 | 58 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 59 | # define RAND_cleanup() while(0) continue 60 | # endif 61 | int RAND_bytes(unsigned char *buf, int num); 62 | int RAND_priv_bytes(unsigned char *buf, int num); 63 | 64 | /* 65 | * Equivalent of RAND_priv_bytes() but additionally taking an OSSL_LIB_CTX and 66 | * a strength. 67 | */ 68 | int RAND_priv_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num, 69 | unsigned int strength); 70 | 71 | /* 72 | * Equivalent of RAND_bytes() but additionally taking an OSSL_LIB_CTX and 73 | * a strength. 74 | */ 75 | int RAND_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num, 76 | unsigned int strength); 77 | 78 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num); 80 | # endif 81 | 82 | EVP_RAND_CTX *RAND_get0_primary(OSSL_LIB_CTX *ctx); 83 | EVP_RAND_CTX *RAND_get0_public(OSSL_LIB_CTX *ctx); 84 | EVP_RAND_CTX *RAND_get0_private(OSSL_LIB_CTX *ctx); 85 | int RAND_set0_public(OSSL_LIB_CTX *ctx, EVP_RAND_CTX *rand); 86 | int RAND_set0_private(OSSL_LIB_CTX *ctx, EVP_RAND_CTX *rand); 87 | 88 | int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq, 89 | const char *cipher, const char *digest); 90 | int RAND_set_seed_source_type(OSSL_LIB_CTX *ctx, const char *seed, 91 | const char *propq); 92 | 93 | void RAND_seed(const void *buf, int num); 94 | void RAND_keep_random_devices_open(int keep); 95 | 96 | # if defined(__ANDROID__) && defined(__NDK_FPABI__) 97 | __NDK_FPABI__ /* __attribute__((pcs("aapcs"))) on ARM */ 98 | # endif 99 | void RAND_add(const void *buf, int num, double randomness); 100 | int RAND_load_file(const char *file, long max_bytes); 101 | int RAND_write_file(const char *file); 102 | const char *RAND_file_name(char *file, size_t num); 103 | int RAND_status(void); 104 | 105 | # ifndef OPENSSL_NO_EGD 106 | int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); 107 | int RAND_egd(const char *path); 108 | int RAND_egd_bytes(const char *path, int bytes); 109 | # endif 110 | 111 | int RAND_poll(void); 112 | 113 | # if defined(_WIN32) && (defined(BASETYPES) || defined(_WINDEF_H)) 114 | /* application has to include in order to use these */ 115 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 116 | OSSL_DEPRECATEDIN_1_1_0 void RAND_screen(void); 117 | OSSL_DEPRECATEDIN_1_1_0 int RAND_event(UINT, WPARAM, LPARAM); 118 | # endif 119 | # endif 120 | 121 | #ifdef __cplusplus 122 | } 123 | #endif 124 | 125 | #endif 126 | -------------------------------------------------------------------------------- /ios-support/openssl/self_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2024 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_SELF_TEST_H 11 | # define OPENSSL_SELF_TEST_H 12 | # pragma once 13 | 14 | # include /* OSSL_CALLBACK */ 15 | 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | /* The test event phases */ 21 | # define OSSL_SELF_TEST_PHASE_NONE "None" 22 | # define OSSL_SELF_TEST_PHASE_START "Start" 23 | # define OSSL_SELF_TEST_PHASE_CORRUPT "Corrupt" 24 | # define OSSL_SELF_TEST_PHASE_PASS "Pass" 25 | # define OSSL_SELF_TEST_PHASE_FAIL "Fail" 26 | 27 | /* Test event categories */ 28 | # define OSSL_SELF_TEST_TYPE_NONE "None" 29 | # define OSSL_SELF_TEST_TYPE_MODULE_INTEGRITY "Module_Integrity" 30 | # define OSSL_SELF_TEST_TYPE_INSTALL_INTEGRITY "Install_Integrity" 31 | # define OSSL_SELF_TEST_TYPE_CRNG "Continuous_RNG_Test" 32 | # define OSSL_SELF_TEST_TYPE_PCT "Conditional_PCT" 33 | # define OSSL_SELF_TEST_TYPE_PCT_KAT "Conditional_KAT" 34 | # define OSSL_SELF_TEST_TYPE_KAT_INTEGRITY "KAT_Integrity" 35 | # define OSSL_SELF_TEST_TYPE_KAT_CIPHER "KAT_Cipher" 36 | # define OSSL_SELF_TEST_TYPE_KAT_ASYM_CIPHER "KAT_AsymmetricCipher" 37 | # define OSSL_SELF_TEST_TYPE_KAT_DIGEST "KAT_Digest" 38 | # define OSSL_SELF_TEST_TYPE_KAT_SIGNATURE "KAT_Signature" 39 | # define OSSL_SELF_TEST_TYPE_PCT_SIGNATURE "PCT_Signature" 40 | # define OSSL_SELF_TEST_TYPE_KAT_KDF "KAT_KDF" 41 | # define OSSL_SELF_TEST_TYPE_KAT_KA "KAT_KA" 42 | # define OSSL_SELF_TEST_TYPE_DRBG "DRBG" 43 | 44 | /* Test event sub categories */ 45 | # define OSSL_SELF_TEST_DESC_NONE "None" 46 | # define OSSL_SELF_TEST_DESC_INTEGRITY_HMAC "HMAC" 47 | # define OSSL_SELF_TEST_DESC_PCT_RSA "RSA" 48 | # define OSSL_SELF_TEST_DESC_PCT_RSA_PKCS1 "RSA" 49 | # define OSSL_SELF_TEST_DESC_PCT_ECDSA "ECDSA" 50 | # define OSSL_SELF_TEST_DESC_PCT_EDDSA "EDDSA" 51 | # define OSSL_SELF_TEST_DESC_PCT_DSA "DSA" 52 | # define OSSL_SELF_TEST_DESC_CIPHER_AES_GCM "AES_GCM" 53 | # define OSSL_SELF_TEST_DESC_CIPHER_AES_ECB "AES_ECB_Decrypt" 54 | # define OSSL_SELF_TEST_DESC_CIPHER_TDES "TDES" 55 | # define OSSL_SELF_TEST_DESC_ASYM_RSA_ENC "RSA_Encrypt" 56 | # define OSSL_SELF_TEST_DESC_ASYM_RSA_DEC "RSA_Decrypt" 57 | # define OSSL_SELF_TEST_DESC_MD_SHA1 "SHA1" 58 | # define OSSL_SELF_TEST_DESC_MD_SHA2 "SHA2" 59 | # define OSSL_SELF_TEST_DESC_MD_SHA3 "SHA3" 60 | # define OSSL_SELF_TEST_DESC_SIGN_DSA "DSA" 61 | # define OSSL_SELF_TEST_DESC_SIGN_RSA "RSA" 62 | # define OSSL_SELF_TEST_DESC_SIGN_ECDSA "ECDSA" 63 | # define OSSL_SELF_TEST_DESC_SIGN_EDDSA "EDDSA" 64 | # define OSSL_SELF_TEST_DESC_DRBG_CTR "CTR" 65 | # define OSSL_SELF_TEST_DESC_DRBG_HASH "HASH" 66 | # define OSSL_SELF_TEST_DESC_DRBG_HMAC "HMAC" 67 | # define OSSL_SELF_TEST_DESC_KA_DH "DH" 68 | # define OSSL_SELF_TEST_DESC_KA_ECDH "ECDH" 69 | # define OSSL_SELF_TEST_DESC_KDF_HKDF "HKDF" 70 | # define OSSL_SELF_TEST_DESC_KDF_SSKDF "SSKDF" 71 | # define OSSL_SELF_TEST_DESC_KDF_X963KDF "X963KDF" 72 | # define OSSL_SELF_TEST_DESC_KDF_X942KDF "X942KDF" 73 | # define OSSL_SELF_TEST_DESC_KDF_PBKDF2 "PBKDF2" 74 | # define OSSL_SELF_TEST_DESC_KDF_SSHKDF "SSHKDF" 75 | # define OSSL_SELF_TEST_DESC_KDF_TLS12_PRF "TLS12_PRF" 76 | # define OSSL_SELF_TEST_DESC_KDF_KBKDF "KBKDF" 77 | # define OSSL_SELF_TEST_DESC_KDF_KBKDF_KMAC "KBKDF_KMAC" 78 | # define OSSL_SELF_TEST_DESC_KDF_TLS13_EXTRACT "TLS13_KDF_EXTRACT" 79 | # define OSSL_SELF_TEST_DESC_KDF_TLS13_EXPAND "TLS13_KDF_EXPAND" 80 | # define OSSL_SELF_TEST_DESC_RNG "RNG" 81 | 82 | void OSSL_SELF_TEST_set_callback(OSSL_LIB_CTX *libctx, OSSL_CALLBACK *cb, 83 | void *cbarg); 84 | void OSSL_SELF_TEST_get_callback(OSSL_LIB_CTX *libctx, OSSL_CALLBACK **cb, 85 | void **cbarg); 86 | 87 | OSSL_SELF_TEST *OSSL_SELF_TEST_new(OSSL_CALLBACK *cb, void *cbarg); 88 | void OSSL_SELF_TEST_free(OSSL_SELF_TEST *st); 89 | 90 | void OSSL_SELF_TEST_onbegin(OSSL_SELF_TEST *st, const char *type, 91 | const char *desc); 92 | int OSSL_SELF_TEST_oncorrupt_byte(OSSL_SELF_TEST *st, unsigned char *bytes); 93 | void OSSL_SELF_TEST_onend(OSSL_SELF_TEST *st, int ret); 94 | 95 | # ifdef __cplusplus 96 | } 97 | # endif 98 | #endif /* OPENSSL_SELF_TEST_H */ 99 | -------------------------------------------------------------------------------- /ios-support/openssl/comp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 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 | 12 | #ifndef OPENSSL_COMP_H 13 | # define OPENSSL_COMP_H 14 | # pragma once 15 | 16 | # include 17 | # ifndef OPENSSL_NO_DEPRECATED_3_0 18 | # define HEADER_COMP_H 19 | # endif 20 | 21 | # include 22 | 23 | # include 24 | # include 25 | # ifdef __cplusplus 26 | extern "C" { 27 | # endif 28 | 29 | 30 | 31 | # ifndef OPENSSL_NO_COMP 32 | 33 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 34 | const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx); 35 | int COMP_CTX_get_type(const COMP_CTX* comp); 36 | int COMP_get_type(const COMP_METHOD *meth); 37 | const char *COMP_get_name(const COMP_METHOD *meth); 38 | void COMP_CTX_free(COMP_CTX *ctx); 39 | 40 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 41 | unsigned char *in, int ilen); 42 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 43 | unsigned char *in, int ilen); 44 | 45 | COMP_METHOD *COMP_zlib(void); 46 | COMP_METHOD *COMP_zlib_oneshot(void); 47 | COMP_METHOD *COMP_brotli(void); 48 | COMP_METHOD *COMP_brotli_oneshot(void); 49 | COMP_METHOD *COMP_zstd(void); 50 | COMP_METHOD *COMP_zstd_oneshot(void); 51 | 52 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 53 | # define COMP_zlib_cleanup() while(0) continue 54 | # endif 55 | 56 | # ifdef OPENSSL_BIO_H 57 | const BIO_METHOD *BIO_f_zlib(void); 58 | const BIO_METHOD *BIO_f_brotli(void); 59 | const BIO_METHOD *BIO_f_zstd(void); 60 | # endif 61 | 62 | # endif 63 | 64 | typedef struct ssl_comp_st SSL_COMP; 65 | 66 | SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP) 67 | #define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk)) 68 | #define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx))) 69 | #define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp))) 70 | #define sk_SSL_COMP_new_null() ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_null()) 71 | #define sk_SSL_COMP_new_reserve(cmp, n) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_reserve(ossl_check_SSL_COMP_compfunc_type(cmp), (n))) 72 | #define sk_SSL_COMP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SSL_COMP_sk_type(sk), (n)) 73 | #define sk_SSL_COMP_free(sk) OPENSSL_sk_free(ossl_check_SSL_COMP_sk_type(sk)) 74 | #define sk_SSL_COMP_zero(sk) OPENSSL_sk_zero(ossl_check_SSL_COMP_sk_type(sk)) 75 | #define sk_SSL_COMP_delete(sk, i) ((SSL_COMP *)OPENSSL_sk_delete(ossl_check_SSL_COMP_sk_type(sk), (i))) 76 | #define sk_SSL_COMP_delete_ptr(sk, ptr) ((SSL_COMP *)OPENSSL_sk_delete_ptr(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))) 77 | #define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)) 78 | #define sk_SSL_COMP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)) 79 | #define sk_SSL_COMP_pop(sk) ((SSL_COMP *)OPENSSL_sk_pop(ossl_check_SSL_COMP_sk_type(sk))) 80 | #define sk_SSL_COMP_shift(sk) ((SSL_COMP *)OPENSSL_sk_shift(ossl_check_SSL_COMP_sk_type(sk))) 81 | #define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk),ossl_check_SSL_COMP_freefunc_type(freefunc)) 82 | #define sk_SSL_COMP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), (idx)) 83 | #define sk_SSL_COMP_set(sk, idx, ptr) ((SSL_COMP *)OPENSSL_sk_set(ossl_check_SSL_COMP_sk_type(sk), (idx), ossl_check_SSL_COMP_type(ptr))) 84 | #define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)) 85 | #define sk_SSL_COMP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)) 86 | #define sk_SSL_COMP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), pnum) 87 | #define sk_SSL_COMP_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_COMP_sk_type(sk)) 88 | #define sk_SSL_COMP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SSL_COMP_sk_type(sk)) 89 | #define sk_SSL_COMP_dup(sk) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_dup(ossl_check_const_SSL_COMP_sk_type(sk))) 90 | #define sk_SSL_COMP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_copyfunc_type(copyfunc), ossl_check_SSL_COMP_freefunc_type(freefunc))) 91 | #define sk_SSL_COMP_set_cmp_func(sk, cmp) ((sk_SSL_COMP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_compfunc_type(cmp))) 92 | 93 | 94 | 95 | # ifdef __cplusplus 96 | } 97 | # endif 98 | #endif 99 | -------------------------------------------------------------------------------- /ios-support/openssl/x509v3err.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_X509V3ERR_H 12 | # define OPENSSL_X509V3ERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * X509V3 reason codes. 23 | */ 24 | # define X509V3_R_BAD_IP_ADDRESS 118 25 | # define X509V3_R_BAD_OBJECT 119 26 | # define X509V3_R_BAD_OPTION 170 27 | # define X509V3_R_BAD_VALUE 171 28 | # define X509V3_R_BN_DEC2BN_ERROR 100 29 | # define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 30 | # define X509V3_R_DIRNAME_ERROR 149 31 | # define X509V3_R_DISTPOINT_ALREADY_SET 160 32 | # define X509V3_R_DUPLICATE_ZONE_ID 133 33 | # define X509V3_R_EMPTY_KEY_USAGE 169 34 | # define X509V3_R_ERROR_CONVERTING_ZONE 131 35 | # define X509V3_R_ERROR_CREATING_EXTENSION 144 36 | # define X509V3_R_ERROR_IN_EXTENSION 128 37 | # define X509V3_R_EXPECTED_A_SECTION_NAME 137 38 | # define X509V3_R_EXTENSION_EXISTS 145 39 | # define X509V3_R_EXTENSION_NAME_ERROR 115 40 | # define X509V3_R_EXTENSION_NOT_FOUND 102 41 | # define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103 42 | # define X509V3_R_EXTENSION_VALUE_ERROR 116 43 | # define X509V3_R_ILLEGAL_EMPTY_EXTENSION 151 44 | # define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 152 45 | # define X509V3_R_INVALID_ASNUMBER 162 46 | # define X509V3_R_INVALID_ASRANGE 163 47 | # define X509V3_R_INVALID_BOOLEAN_STRING 104 48 | # define X509V3_R_INVALID_CERTIFICATE 158 49 | # define X509V3_R_INVALID_EMPTY_NAME 108 50 | # define X509V3_R_INVALID_EXTENSION_STRING 105 51 | # define X509V3_R_INVALID_INHERITANCE 165 52 | # define X509V3_R_INVALID_IPADDRESS 166 53 | # define X509V3_R_INVALID_MULTIPLE_RDNS 161 54 | # define X509V3_R_INVALID_NAME 106 55 | # define X509V3_R_INVALID_NULL_ARGUMENT 107 56 | # define X509V3_R_INVALID_NULL_VALUE 109 57 | # define X509V3_R_INVALID_NUMBER 140 58 | # define X509V3_R_INVALID_NUMBERS 141 59 | # define X509V3_R_INVALID_OBJECT_IDENTIFIER 110 60 | # define X509V3_R_INVALID_OPTION 138 61 | # define X509V3_R_INVALID_POLICY_IDENTIFIER 134 62 | # define X509V3_R_INVALID_PROXY_POLICY_SETTING 153 63 | # define X509V3_R_INVALID_PURPOSE 146 64 | # define X509V3_R_INVALID_SAFI 164 65 | # define X509V3_R_INVALID_SECTION 135 66 | # define X509V3_R_INVALID_SYNTAX 143 67 | # define X509V3_R_ISSUER_DECODE_ERROR 126 68 | # define X509V3_R_MISSING_VALUE 124 69 | # define X509V3_R_NEED_ORGANIZATION_AND_NUMBERS 142 70 | # define X509V3_R_NEGATIVE_PATHLEN 168 71 | # define X509V3_R_NO_CONFIG_DATABASE 136 72 | # define X509V3_R_NO_ISSUER_CERTIFICATE 121 73 | # define X509V3_R_NO_ISSUER_DETAILS 127 74 | # define X509V3_R_NO_POLICY_IDENTIFIER 139 75 | # define X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED 154 76 | # define X509V3_R_NO_PUBLIC_KEY 114 77 | # define X509V3_R_NO_SUBJECT_DETAILS 125 78 | # define X509V3_R_OPERATION_NOT_DEFINED 148 79 | # define X509V3_R_OTHERNAME_ERROR 147 80 | # define X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED 155 81 | # define X509V3_R_POLICY_PATH_LENGTH 156 82 | # define X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED 157 83 | # define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 159 84 | # define X509V3_R_SECTION_NOT_FOUND 150 85 | # define X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS 122 86 | # define X509V3_R_UNABLE_TO_GET_ISSUER_KEYID 123 87 | # define X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT 111 88 | # define X509V3_R_UNKNOWN_EXTENSION 129 89 | # define X509V3_R_UNKNOWN_EXTENSION_NAME 130 90 | # define X509V3_R_UNKNOWN_OPTION 120 91 | # define X509V3_R_UNKNOWN_VALUE 172 92 | # define X509V3_R_UNSUPPORTED_OPTION 117 93 | # define X509V3_R_UNSUPPORTED_TYPE 167 94 | # define X509V3_R_USER_TOO_LONG 132 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /ios-support/openssl/sha.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2023 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_SHA_H 11 | # define OPENSSL_SHA_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_SHA_H 17 | # endif 18 | 19 | # include 20 | # include 21 | 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define SHA_DIGEST_LENGTH 20 27 | 28 | # ifndef OPENSSL_NO_DEPRECATED_3_0 29 | /*- 30 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 31 | * ! SHA_LONG has to be at least 32 bits wide. ! 32 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 33 | */ 34 | # define SHA_LONG unsigned int 35 | 36 | # define SHA_LBLOCK 16 37 | # define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a 38 | * contiguous array of 32 bit wide 39 | * big-endian values. */ 40 | # define SHA_LAST_BLOCK (SHA_CBLOCK-8) 41 | 42 | typedef struct SHAstate_st { 43 | SHA_LONG h0, h1, h2, h3, h4; 44 | SHA_LONG Nl, Nh; 45 | SHA_LONG data[SHA_LBLOCK]; 46 | unsigned int num; 47 | } SHA_CTX; 48 | 49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c); 50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len); 51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c); 52 | OSSL_DEPRECATEDIN_3_0 void SHA1_Transform(SHA_CTX *c, const unsigned char *data); 53 | # endif 54 | 55 | unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); 56 | 57 | # ifndef OPENSSL_NO_DEPRECATED_3_0 58 | # define SHA256_CBLOCK (SHA_LBLOCK*4)/* SHA-256 treats input data as a 59 | * contiguous array of 32 bit wide 60 | * big-endian values. */ 61 | 62 | typedef struct SHA256state_st { 63 | SHA_LONG h[8]; 64 | SHA_LONG Nl, Nh; 65 | SHA_LONG data[SHA_LBLOCK]; 66 | unsigned int num, md_len; 67 | } SHA256_CTX; 68 | 69 | OSSL_DEPRECATEDIN_3_0 int SHA224_Init(SHA256_CTX *c); 70 | OSSL_DEPRECATEDIN_3_0 int SHA224_Update(SHA256_CTX *c, 71 | const void *data, size_t len); 72 | OSSL_DEPRECATEDIN_3_0 int SHA224_Final(unsigned char *md, SHA256_CTX *c); 73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c); 74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c, 75 | const void *data, size_t len); 76 | OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c); 77 | OSSL_DEPRECATEDIN_3_0 void SHA256_Transform(SHA256_CTX *c, 78 | const unsigned char *data); 79 | # endif 80 | 81 | unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md); 82 | unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md); 83 | 84 | # define SHA256_192_DIGEST_LENGTH 24 85 | # define SHA224_DIGEST_LENGTH 28 86 | # define SHA256_DIGEST_LENGTH 32 87 | # define SHA384_DIGEST_LENGTH 48 88 | # define SHA512_DIGEST_LENGTH 64 89 | 90 | # ifndef OPENSSL_NO_DEPRECATED_3_0 91 | /* 92 | * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 93 | * being exactly 64-bit wide. See Implementation Notes in sha512.c 94 | * for further details. 95 | */ 96 | /* 97 | * SHA-512 treats input data as a 98 | * contiguous array of 64 bit 99 | * wide big-endian values. 100 | */ 101 | # define SHA512_CBLOCK (SHA_LBLOCK*8) 102 | # if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) 103 | # define SHA_LONG64 unsigned __int64 104 | # elif defined(__arch64__) 105 | # define SHA_LONG64 unsigned long 106 | # else 107 | # define SHA_LONG64 unsigned long long 108 | # endif 109 | 110 | typedef struct SHA512state_st { 111 | SHA_LONG64 h[8]; 112 | SHA_LONG64 Nl, Nh; 113 | union { 114 | SHA_LONG64 d[SHA_LBLOCK]; 115 | unsigned char p[SHA512_CBLOCK]; 116 | } u; 117 | unsigned int num, md_len; 118 | } SHA512_CTX; 119 | 120 | OSSL_DEPRECATEDIN_3_0 int SHA384_Init(SHA512_CTX *c); 121 | OSSL_DEPRECATEDIN_3_0 int SHA384_Update(SHA512_CTX *c, 122 | const void *data, size_t len); 123 | OSSL_DEPRECATEDIN_3_0 int SHA384_Final(unsigned char *md, SHA512_CTX *c); 124 | OSSL_DEPRECATEDIN_3_0 int SHA512_Init(SHA512_CTX *c); 125 | OSSL_DEPRECATEDIN_3_0 int SHA512_Update(SHA512_CTX *c, 126 | const void *data, size_t len); 127 | OSSL_DEPRECATEDIN_3_0 int SHA512_Final(unsigned char *md, SHA512_CTX *c); 128 | OSSL_DEPRECATEDIN_3_0 void SHA512_Transform(SHA512_CTX *c, 129 | const unsigned char *data); 130 | # endif 131 | 132 | unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md); 133 | unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md); 134 | 135 | # ifdef __cplusplus 136 | } 137 | # endif 138 | 139 | #endif 140 | -------------------------------------------------------------------------------- /ios-support/openssl/camellia.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006-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_CAMELLIA_H 11 | # define OPENSSL_CAMELLIA_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_CAMELLIA_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_CAMELLIA 22 | # include 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | # define CAMELLIA_BLOCK_SIZE 16 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | 31 | # define CAMELLIA_ENCRYPT 1 32 | # define CAMELLIA_DECRYPT 0 33 | 34 | /* 35 | * Because array size can't be a const in C, the following two are macros. 36 | * Both sizes are in bytes. 37 | */ 38 | 39 | /* This should be a hidden type, but EVP requires that the size be known */ 40 | 41 | # define CAMELLIA_TABLE_BYTE_LEN 272 42 | # define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) 43 | 44 | typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match 45 | * with WORD */ 46 | 47 | struct camellia_key_st { 48 | union { 49 | double d; /* ensures 64-bit align */ 50 | KEY_TABLE_TYPE rd_key; 51 | } u; 52 | int grand_rounds; 53 | }; 54 | typedef struct camellia_key_st CAMELLIA_KEY; 55 | 56 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 57 | # ifndef OPENSSL_NO_DEPRECATED_3_0 58 | OSSL_DEPRECATEDIN_3_0 int Camellia_set_key(const unsigned char *userKey, 59 | const int bits, 60 | CAMELLIA_KEY *key); 61 | OSSL_DEPRECATEDIN_3_0 void Camellia_encrypt(const unsigned char *in, 62 | unsigned char *out, 63 | const CAMELLIA_KEY *key); 64 | OSSL_DEPRECATEDIN_3_0 void Camellia_decrypt(const unsigned char *in, 65 | unsigned char *out, 66 | const CAMELLIA_KEY *key); 67 | OSSL_DEPRECATEDIN_3_0 void Camellia_ecb_encrypt(const unsigned char *in, 68 | unsigned char *out, 69 | const CAMELLIA_KEY *key, 70 | const int enc); 71 | OSSL_DEPRECATEDIN_3_0 void Camellia_cbc_encrypt(const unsigned char *in, 72 | unsigned char *out, 73 | size_t length, 74 | const CAMELLIA_KEY *key, 75 | unsigned char *ivec, 76 | const int enc); 77 | OSSL_DEPRECATEDIN_3_0 void Camellia_cfb128_encrypt(const unsigned char *in, 78 | unsigned char *out, 79 | size_t length, 80 | const CAMELLIA_KEY *key, 81 | unsigned char *ivec, 82 | int *num, 83 | const int enc); 84 | OSSL_DEPRECATEDIN_3_0 void Camellia_cfb1_encrypt(const unsigned char *in, 85 | unsigned char *out, 86 | size_t length, 87 | const CAMELLIA_KEY *key, 88 | unsigned char *ivec, 89 | int *num, 90 | const int enc); 91 | OSSL_DEPRECATEDIN_3_0 void Camellia_cfb8_encrypt(const unsigned char *in, 92 | unsigned char *out, 93 | size_t length, 94 | const CAMELLIA_KEY *key, 95 | unsigned char *ivec, 96 | int *num, 97 | const int enc); 98 | OSSL_DEPRECATEDIN_3_0 void Camellia_ofb128_encrypt(const unsigned char *in, 99 | unsigned char *out, 100 | size_t length, 101 | const CAMELLIA_KEY *key, 102 | unsigned char *ivec, 103 | int *num); 104 | OSSL_DEPRECATEDIN_3_0 105 | void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, 106 | size_t length, const CAMELLIA_KEY *key, 107 | unsigned char ivec[CAMELLIA_BLOCK_SIZE], 108 | unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], 109 | unsigned int *num); 110 | # endif 111 | 112 | # ifdef __cplusplus 113 | } 114 | # endif 115 | # endif 116 | 117 | #endif 118 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | QuickUpdateShortcutSupport@protonmail.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | --------------------------------------------------------------------------------