├── include └── spdlog │ ├── fmt │ ├── bundled │ │ ├── locale.h │ │ └── fmt.license.rst │ ├── xchar.h │ ├── chrono.h │ ├── ostr.h │ ├── ranges.h │ ├── compile.h │ ├── std.h │ └── fmt.h │ ├── details │ ├── windows_include.h │ ├── console_globals.h │ ├── periodic_worker-inl.h │ ├── synchronous_factory.h │ ├── log_msg_buffer.h │ ├── null_mutex.h │ ├── backtracer.h │ ├── log_msg.h │ ├── log_msg-inl.h │ ├── log_msg_buffer-inl.h │ ├── file_helper.h │ ├── periodic_worker.h │ ├── backtracer-inl.h │ ├── udp_client.h │ └── udp_client-windows.h │ ├── fwd.h │ ├── version.h │ ├── formatter.h │ ├── sinks │ ├── sink-inl.h │ ├── sink.h │ ├── basic_file_sink-inl.h │ ├── null_sink.h │ ├── ostream_sink.h │ ├── stdout_color_sinks-inl.h │ ├── base_sink.h │ ├── callback_sink.h │ ├── stdout_color_sinks.h │ ├── base_sink-inl.h │ ├── udp_sink.h │ ├── msvc_sink.h │ ├── ringbuffer_sink.h │ ├── tcp_sink.h │ ├── basic_file_sink.h │ ├── dist_sink.h │ ├── stdout_sinks.h │ └── wincolor_sink.h │ ├── cfg │ ├── helpers.h │ ├── env.h │ └── argv.h │ ├── mdc.h │ ├── stopwatch.h │ ├── common-inl.h │ ├── async_logger.h │ └── async_logger-inl.h ├── .gitignore ├── GitHubDesktop2Chinese.h ├── openssl-proj └── include │ └── openssl │ ├── ecdh.h │ ├── ecdsa.h │ ├── asn1_mac.h │ ├── kdferr.h │ ├── opensslconf.h │ ├── pem2.h │ ├── ossl_typ.h │ ├── buffererr.h │ ├── ssl2.h │ ├── objectserr.h │ ├── decodererr.h │ ├── encodererr.h │ ├── asyncerr.h │ ├── thread.h │ ├── fipskey.h │ ├── ebcdic.h │ ├── esserr.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 │ ├── buffer.h │ ├── comp.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 │ ├── fips_names.h │ ├── rc2.h │ ├── cryptoerr.h │ ├── httperr.h │ ├── dherr.h │ ├── pemerr.h │ ├── provider.h │ ├── blowfish.h │ ├── param_build.h │ ├── engineerr.h │ ├── rc5.h │ ├── pkcs7err.h │ ├── tserr.h │ ├── idea.h │ ├── randerr.h │ └── x509err.h ├── ReleaseBody.md ├── json └── 关于一些注意事项.txt ├── CMakePresets.json ├── .github └── workflows │ └── check.yml └── .gitattributes /include/spdlog/fmt/bundled/locale.h: -------------------------------------------------------------------------------- 1 | #include "xchar.h" 2 | #warning fmt/locale.h is deprecated, include fmt/format.h or fmt/xchar.h instead 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeLists.txt.user 2 | CMakeCache.txt 3 | CMakeFiles 4 | CMakeScripts 5 | Testing 6 | Makefile 7 | cmake_install.cmake 8 | install_manifest.txt 9 | compile_commands.json 10 | CTestTestfile.cmake 11 | _deps 12 | /.vs 13 | /out 14 | /openssl-proj/lib 15 | -------------------------------------------------------------------------------- /include/spdlog/details/windows_include.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef NOMINMAX 4 | #define NOMINMAX // prevent windows redefining min/max 5 | #endif 6 | 7 | #ifndef WIN32_LEAN_AND_MEAN 8 | #define WIN32_LEAN_AND_MEAN 9 | #endif 10 | 11 | #include 12 | -------------------------------------------------------------------------------- /GitHubDesktop2Chinese.h: -------------------------------------------------------------------------------- 1 | // GitHubDesktop2Chinese.h: 标准系统包含文件的包含文件 2 | // 或项目特定的包含文件。 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | // TODO: 在此处引用程序需要的其他标头。 10 | 11 | //std::string GetCurrentUserSid(); 12 | 13 | bool GetBasePath(std::string& out); 14 | std::string LoopGetBasePath(); 15 | void DeveloperOptions(); -------------------------------------------------------------------------------- /include/spdlog/fwd.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | namespace spdlog { 7 | class logger; 8 | class formatter; 9 | 10 | namespace sinks { 11 | class sink; 12 | } 13 | 14 | namespace level { 15 | enum level_enum : int; 16 | } 17 | 18 | } // namespace spdlog 19 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/ecdsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/asn1_mac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #error "This file is obsolete; please update your software." 11 | -------------------------------------------------------------------------------- /include/spdlog/version.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #define SPDLOG_VER_MAJOR 1 7 | #define SPDLOG_VER_MINOR 13 8 | #define SPDLOG_VER_PATCH 0 9 | 10 | #define SPDLOG_TO_VERSION(major, minor, patch) (major * 10000 + minor * 100 + patch) 11 | #define SPDLOG_VERSION SPDLOG_TO_VERSION(SPDLOG_VER_MAJOR, SPDLOG_VER_MINOR, SPDLOG_VER_PATCH) 12 | -------------------------------------------------------------------------------- /include/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | class formatter { 12 | public: 13 | virtual ~formatter() = default; 14 | virtual void format(const details::log_msg &msg, memory_buf_t &dest) = 0; 15 | virtual std::unique_ptr clone() const = 0; 16 | }; 17 | } // namespace spdlog 18 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/kdferr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_KDFERR_H 11 | # define OPENSSL_KDFERR_H 12 | # pragma once 13 | 14 | #include 15 | 16 | #endif /* !defined(OPENSSL_KDFERR_H) */ 17 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/opensslconf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_OPENSSLCONF_H 11 | # define OPENSSL_OPENSSLCONF_H 12 | # pragma once 13 | 14 | # include 15 | # include 16 | 17 | #endif /* OPENSSL_OPENSSLCONF_H */ 18 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_PEM2_H 11 | # define OPENSSL_PEM2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_PEM2_H 17 | # endif 18 | # include 19 | #endif 20 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/ossl_typ.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * The original was renamed to 12 | * 13 | * This header file only exists for compatibility reasons with older 14 | * applications which #include . 15 | */ 16 | # include 17 | -------------------------------------------------------------------------------- /include/spdlog/fmt/xchar.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's xchar support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /include/spdlog/fmt/chrono.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's chrono support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /include/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ostream support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /include/spdlog/fmt/ranges.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ranges support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /include/spdlog/fmt/compile.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's compile-time support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/buffererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_BUFFERERR_H 12 | # define OPENSSL_BUFFERERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * BUF reason codes. 23 | */ 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/spdlog/details/console_globals.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | struct console_mutex { 13 | using mutex_t = std::mutex; 14 | static mutex_t &mutex() { 15 | static mutex_t s_mutex; 16 | return s_mutex; 17 | } 18 | }; 19 | 20 | struct console_nullmutex { 21 | using mutex_t = null_mutex; 22 | static mutex_t &mutex() { 23 | static mutex_t s_mutex; 24 | return s_mutex; 25 | } 26 | }; 27 | } // namespace details 28 | } // namespace spdlog 29 | -------------------------------------------------------------------------------- /include/spdlog/fmt/std.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's std support (for formatting e.g. 9 | // std::filesystem::path, std::thread::id, std::monostate, std::variant, ...) 10 | // 11 | #include 12 | 13 | #if !defined(SPDLOG_USE_STD_FORMAT) 14 | #if !defined(SPDLOG_FMT_EXTERNAL) 15 | #ifdef SPDLOG_HEADER_ONLY 16 | #ifndef FMT_HEADER_ONLY 17 | #define FMT_HEADER_ONLY 18 | #endif 19 | #endif 20 | #include 21 | #else 22 | #include 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /include/spdlog/details/periodic_worker-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | // stop the worker thread and join it 14 | SPDLOG_INLINE periodic_worker::~periodic_worker() { 15 | if (worker_thread_.joinable()) { 16 | { 17 | std::lock_guard lock(mutex_); 18 | active_ = false; 19 | } 20 | cv_.notify_one(); 21 | worker_thread_.join(); 22 | } 23 | } 24 | 25 | } // namespace details 26 | } // namespace spdlog 27 | -------------------------------------------------------------------------------- /ReleaseBody.md: -------------------------------------------------------------------------------- 1 | 2 | ### 程序说明 3 | 1. 可以仅下载二进制程序,双击运行后自动汉化 4 | 2. 如果运行提示出错,可重试或下载[此JSON文件](https://github.com/cngege/GitHubDesktop2Chinese/blob/master/json/localization.json)后放在同目录后运行二进制程序 5 | 3. **使用GitHub 仓库作为json文件源的请升级加载器到最新版本** 6 | 4. `GitHubDesktop2Chinese.exe` 为64位程序 7 | 5. `GitHubDesktop2Chinese_x86.exe` 为32位程序 8 | 6. 如果汉化后主程序无法打开,请更新加载器后执行参数 `GitHubDesktop2Chinese.exe dev --translationfrombak` 或执行 x86.exe程序 9 | 10 | 11 | ### 1.1.x 程序修复的bug和更新内容 12 | 13 | 14 | #### 修复BUG: 15 | - 版本号比较的问题(版本号库的问题) 16 | 17 | 21 | 22 | #### 更新内容: 23 | - 对于某些特定功能,支持由用户选择是否应用. 24 | - 汉化main和renderer之前进行提示, 避免用户在汉化中途误以为已完成而退出 25 | 26 | 34 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/ssl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_SSL2_H 11 | # define OPENSSL_SSL2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_SSL2_H 17 | # endif 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | # define SSL2_VERSION 0x0002 24 | 25 | # define SSL2_MT_CLIENT_HELLO 1 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif 31 | -------------------------------------------------------------------------------- /include/spdlog/sinks/sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | SPDLOG_INLINE bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const { 13 | return msg_level >= level_.load(std::memory_order_relaxed); 14 | } 15 | 16 | SPDLOG_INLINE void spdlog::sinks::sink::set_level(level::level_enum log_level) { 17 | level_.store(log_level, std::memory_order_relaxed); 18 | } 19 | 20 | SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const { 21 | return static_cast(level_.load(std::memory_order_relaxed)); 22 | } 23 | -------------------------------------------------------------------------------- /include/spdlog/cfg/helpers.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace cfg { 11 | namespace helpers { 12 | // 13 | // Init levels from given string 14 | // 15 | // Examples: 16 | // 17 | // set global level to debug: "debug" 18 | // turn off all logging except for logger1: "off,logger1=debug" 19 | // turn off all logging except for logger1 and logger2: "off,logger1=debug,logger2=info" 20 | // 21 | SPDLOG_API void load_levels(const std::string &txt); 22 | } // namespace helpers 23 | 24 | } // namespace cfg 25 | } // namespace spdlog 26 | 27 | #ifdef SPDLOG_HEADER_ONLY 28 | #include "helpers-inl.h" 29 | #endif // SPDLOG_HEADER_ONLY 30 | -------------------------------------------------------------------------------- /include/spdlog/details/synchronous_factory.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "registry.h" 7 | 8 | namespace spdlog { 9 | 10 | // Default logger factory- creates synchronous loggers 11 | class logger; 12 | 13 | struct synchronous_factory { 14 | template 15 | static std::shared_ptr create(std::string logger_name, SinkArgs &&...args) { 16 | auto sink = std::make_shared(std::forward(args)...); 17 | auto new_logger = std::make_shared(std::move(logger_name), std::move(sink)); 18 | details::registry::instance().initialize_logger(new_logger); 19 | return new_logger; 20 | } 21 | }; 22 | } // namespace spdlog 23 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/objectserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_OBJECTSERR_H 12 | # define OPENSSL_OBJECTSERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OBJ reason codes. 23 | */ 24 | # define OBJ_R_OID_EXISTS 102 25 | # define OBJ_R_UNKNOWN_NID 101 26 | # define OBJ_R_UNKNOWN_OBJECT_NAME 103 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/decodererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_DECODERERR_H 12 | # define OPENSSL_DECODERERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OSSL_DECODER reason codes. 23 | */ 24 | # define OSSL_DECODER_R_COULD_NOT_DECODE_OBJECT 101 25 | # define OSSL_DECODER_R_DECODER_NOT_FOUND 102 26 | # define OSSL_DECODER_R_MISSING_GET_PARAMS 100 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/encodererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ENCODERERR_H 12 | # define OPENSSL_ENCODERERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OSSL_ENCODER reason codes. 23 | */ 24 | # define OSSL_ENCODER_R_ENCODER_NOT_FOUND 101 25 | # define OSSL_ENCODER_R_INCORRECT_PROPERTY_QUERY 100 26 | # define OSSL_ENCODER_R_MISSING_GET_PARAMS 102 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/asyncerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ASYNCERR_H 12 | # define OPENSSL_ASYNCERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * ASYNC reason codes. 23 | */ 24 | # define ASYNC_R_FAILED_TO_SET_POOL 101 25 | # define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102 26 | # define ASYNC_R_INIT_FAILED 105 27 | # define ASYNC_R_INVALID_POOL_SIZE 103 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /openssl-proj/include/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 | -------------------------------------------------------------------------------- /include/spdlog/mdc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | namespace spdlog { 9 | class SPDLOG_API mdc { 10 | public: 11 | using mdc_map_t = std::map; 12 | 13 | static void put(const std::string &key, const std::string &value) { 14 | get_context()[key] = value; 15 | } 16 | 17 | static std::string get(const std::string &key) { 18 | auto &context = get_context(); 19 | auto it = context.find(key); 20 | if (it != context.end()) { 21 | return it->second; 22 | } 23 | return ""; 24 | } 25 | 26 | static void remove(const std::string &key) { get_context().erase(key); } 27 | 28 | static void clear() { get_context().clear(); } 29 | 30 | static mdc_map_t &get_context() { 31 | static thread_local mdc_map_t context; 32 | return context; 33 | } 34 | }; 35 | 36 | } // namespace spdlog 37 | -------------------------------------------------------------------------------- /include/spdlog/sinks/sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | namespace sinks { 12 | class SPDLOG_API sink { 13 | public: 14 | virtual ~sink() = default; 15 | virtual void log(const details::log_msg &msg) = 0; 16 | virtual void flush() = 0; 17 | virtual void set_pattern(const std::string &pattern) = 0; 18 | virtual void set_formatter(std::unique_ptr sink_formatter) = 0; 19 | 20 | void set_level(level::level_enum log_level); 21 | level::level_enum level() const; 22 | bool should_log(level::level_enum msg_level) const; 23 | 24 | protected: 25 | // sink log level - default is all 26 | level_t level_{level::trace}; 27 | }; 28 | 29 | } // namespace sinks 30 | } // namespace spdlog 31 | 32 | #ifdef SPDLOG_HEADER_ONLY 33 | #include "sink-inl.h" 34 | #endif 35 | -------------------------------------------------------------------------------- /include/spdlog/details/log_msg_buffer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace spdlog { 9 | namespace details { 10 | 11 | // Extend log_msg with internal buffer to store its payload. 12 | // This is needed since log_msg holds string_views that points to stack data. 13 | 14 | class SPDLOG_API log_msg_buffer : public log_msg { 15 | memory_buf_t buffer; 16 | void update_string_views(); 17 | 18 | public: 19 | log_msg_buffer() = default; 20 | explicit log_msg_buffer(const log_msg &orig_msg); 21 | log_msg_buffer(const log_msg_buffer &other); 22 | log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 23 | log_msg_buffer &operator=(const log_msg_buffer &other); 24 | log_msg_buffer &operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 25 | }; 26 | 27 | } // namespace details 28 | } // namespace spdlog 29 | 30 | #ifdef SPDLOG_HEADER_ONLY 31 | #include "log_msg_buffer-inl.h" 32 | #endif 33 | -------------------------------------------------------------------------------- /include/spdlog/details/null_mutex.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | // null, no cost dummy "mutex" and dummy "atomic" int 9 | 10 | namespace spdlog { 11 | namespace details { 12 | struct null_mutex { 13 | void lock() const {} 14 | void unlock() const {} 15 | }; 16 | 17 | struct null_atomic_int { 18 | int value; 19 | null_atomic_int() = default; 20 | 21 | explicit null_atomic_int(int new_value) 22 | : value(new_value) {} 23 | 24 | int load(std::memory_order = std::memory_order_relaxed) const { return value; } 25 | 26 | void store(int new_value, std::memory_order = std::memory_order_relaxed) { value = new_value; } 27 | 28 | int exchange(int new_value, std::memory_order = std::memory_order_relaxed) { 29 | std::swap(new_value, value); 30 | return new_value; // return value before the call 31 | } 32 | }; 33 | 34 | } // namespace details 35 | } // namespace spdlog 36 | -------------------------------------------------------------------------------- /include/spdlog/cfg/env.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | // 10 | // Init levels and patterns from env variables SPDLOG_LEVEL 11 | // Inspired from Rust's "env_logger" crate (https://crates.io/crates/env_logger). 12 | // Note - fallback to "info" level on unrecognized levels 13 | // 14 | // Examples: 15 | // 16 | // set global level to debug: 17 | // export SPDLOG_LEVEL=debug 18 | // 19 | // turn off all logging except for logger1: 20 | // export SPDLOG_LEVEL="*=off,logger1=debug" 21 | // 22 | 23 | // turn off all logging except for logger1 and logger2: 24 | // export SPDLOG_LEVEL="off,logger1=debug,logger2=info" 25 | 26 | namespace spdlog { 27 | namespace cfg { 28 | inline void load_env_levels() { 29 | auto env_val = details::os::getenv("SPDLOG_LEVEL"); 30 | if (!env_val.empty()) { 31 | helpers::load_levels(env_val); 32 | } 33 | } 34 | 35 | } // namespace cfg 36 | } // namespace spdlog 37 | -------------------------------------------------------------------------------- /json/关于一些注意事项.txt: -------------------------------------------------------------------------------- 1 | 1. 匹配的双引号必须使用反斜杠转义, 不可使用最外层单引号 而匹配内容双引号不转义的方法,会报错, 例如 ['i am "zhangsan"','我是"张三"'] 错误, 正确写法 ["i am \"zhangsan\"","我是\"张三\""] 2 | 3 | 2. 由于 程序是使用正则表达式进行匹配修改, 所以是支持正则匹配的(我没试过), 4 | 5 | 3. 若有匹配?(这个字符串)的情况,请在?前使用两个反斜杠,匹配后填充的内容?前不要使用反斜杠 6 | 7 | 4. 匹配字符串建议带上"", 如 ["\"&View\"","\"视图\""], 以避免匹配到 "&View on GitHub", 如果匹配的修改了,后面就匹配不到这个了 8 | 9 | 5. 无论是上面提到的?还是其他在正则表达式中具有特别意义的符号,都需要使用两个反斜杠转义, 只有双引号是只需要一个反斜杠转义 ,所有应正则表达式而添加的反斜杠,在翻译后文本部分都不需要也不能有反斜杠 10 | 11 | .:匹配任何单个字符(除了换行符)。 12 | *:匹配前面的子表达式零次或多次。 13 | +:匹配前面的子表达式一次或多次。 14 | ?:匹配前面的子表达式零次或一次。 15 | {n}:n 是一个非负整数。匹配确定的 n 次。 16 | {n,}:n 是一个非负整数。匹配至少 n 次。 17 | {n,m}:m 和 n 均为非负整数,其中n <= m。匹配至少 n 次,但不多于 m 次。 18 | ^:匹配输入字符串的开始位置。 19 | $:匹配输入字符串的结束位置。 20 | [...]:字符集。匹配方括号中的任何字符。 21 | |:或者。匹配 | 符号前后的任何表达式。 22 | ( 和 ):捕获括号。 23 | \:转义字符。如果你想匹配上述特殊字符的字面值,或者匹配反斜杠本身,你需要在它前面加上 \ 24 | 25 | 6. json中数组最后一项结尾不可有逗号, 否则无法读取。如:[["xx","xxx"],["",""],] 26 | 27 | 7. 善用正则表达式,如 Ee.createElement\\(yD,null,this.props.repositoryName 其中的函数参数yD,常常因版本更新而发生变动 28 | 所有可以利用正则模糊匹配这两个字符,使其适应性更强:如 Ee.createElement\\((..),null,this.props.repositoryName 29 | 替换的时候使用$1表示第一个使用正则捕获到的内容 如:Ee.createElement\\($1,null,this.props.repositoryName 30 | 31 | 8. 待补充.. -------------------------------------------------------------------------------- /openssl-proj/include/openssl/fipskey.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by makefile from ..\include\openssl\fipskey.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #ifndef OPENSSL_FIPSKEY_H 14 | # define OPENSSL_FIPSKEY_H 15 | # pragma once 16 | 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | /* 22 | * The FIPS validation HMAC key, usable as an array initializer. 23 | */ 24 | #define FIPS_KEY_ELEMENTS \ 25 | 0xf4, 0x55, 0x66, 0x50, 0xac, 0x31, 0xd3, 0x54, 0x61, 0x61, 0x0b, 0xac, 0x4e, 0xd8, 0x1b, 0x1a, 0x18, 0x1b, 0x2d, 0x8a, 0x43, 0xea, 0x28, 0x54, 0xcb, 0xae, 0x22, 0xca, 0x74, 0x56, 0x08, 0x13 26 | 27 | /* 28 | * The FIPS validation key, as a string. 29 | */ 30 | #define FIPS_KEY_STRING "f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813" 31 | 32 | # ifdef __cplusplus 33 | } 34 | # endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/spdlog/fmt/fmt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2018 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // 9 | // Include a bundled header-only copy of fmtlib or an external one. 10 | // By default spdlog include its own copy. 11 | // 12 | #include 13 | 14 | #if defined(SPDLOG_USE_STD_FORMAT) // SPDLOG_USE_STD_FORMAT is defined - use std::format 15 | #include 16 | #elif !defined(SPDLOG_FMT_EXTERNAL) 17 | #if !defined(SPDLOG_COMPILED_LIB) && !defined(FMT_HEADER_ONLY) 18 | #define FMT_HEADER_ONLY 19 | #endif 20 | #ifndef FMT_USE_WINDOWS_H 21 | #define FMT_USE_WINDOWS_H 0 22 | #endif 23 | // enable the 'n' flag in for backward compatibility with fmt 6.x 24 | #define FMT_DEPRECATED_N_SPECIFIER 25 | // enable ostream formatting for backward compatibility with fmt 8.x 26 | #define FMT_DEPRECATED_OSTREAM 27 | 28 | #include 29 | #include 30 | 31 | #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib 32 | #include 33 | #include 34 | #endif 35 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_EBCDIC_H 11 | # define OPENSSL_EBCDIC_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_EBCDIC_H 17 | # endif 18 | 19 | # include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | /* Avoid name clashes with other applications */ 26 | # define os_toascii _openssl_os_toascii 27 | # define os_toebcdic _openssl_os_toebcdic 28 | # define ebcdic2ascii _openssl_ebcdic2ascii 29 | # define ascii2ebcdic _openssl_ascii2ebcdic 30 | 31 | extern const unsigned char os_toascii[256]; 32 | extern const unsigned char os_toebcdic[256]; 33 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 34 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | #endif 40 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/esserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ESSERR_H 12 | # define OPENSSL_ESSERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | /* 20 | * ESS reason codes. 21 | */ 22 | # define ESS_R_EMPTY_ESS_CERT_ID_LIST 107 23 | # define ESS_R_ESS_CERT_DIGEST_ERROR 103 24 | # define ESS_R_ESS_CERT_ID_NOT_FOUND 104 25 | # define ESS_R_ESS_CERT_ID_WRONG_ORDER 105 26 | # define ESS_R_ESS_DIGEST_ALG_UNKNOWN 106 27 | # define ESS_R_ESS_SIGNING_CERTIFICATE_ERROR 102 28 | # define ESS_R_ESS_SIGNING_CERT_ADD_ERROR 100 29 | # define ESS_R_ESS_SIGNING_CERT_V2_ADD_ERROR 101 30 | # define ESS_R_MISSING_SIGNING_CERTIFICATE_ATTRIBUTE 108 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /openssl-proj/include/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 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/core_object.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CORE_OBJECT_H 11 | # define OPENSSL_CORE_OBJECT_H 12 | # pragma once 13 | 14 | # ifdef __cplusplus 15 | extern "C" { 16 | # endif 17 | 18 | /*- 19 | * Known object types 20 | * 21 | * These numbers are used as values for the OSSL_PARAM parameter 22 | * OSSL_OBJECT_PARAM_TYPE. 23 | * 24 | * For most of these types, there's a corresponding libcrypto object type. 25 | * The corresponding type is indicated with a comment after the number. 26 | */ 27 | # define OSSL_OBJECT_UNKNOWN 0 28 | # define OSSL_OBJECT_NAME 1 /* char * */ 29 | # define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */ 30 | # define OSSL_OBJECT_CERT 3 /* X509 * */ 31 | # define OSSL_OBJECT_CRL 4 /* X509_CRL * */ 32 | 33 | /* 34 | * The rest of the associated OSSL_PARAM elements is described in core_names.h 35 | */ 36 | 37 | # ifdef __cplusplus 38 | } 39 | # endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /openssl-proj/include/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 | -------------------------------------------------------------------------------- /include/spdlog/details/backtracer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | // Store log messages in circular buffer. 14 | // Useful for storing debug data in case of error/warning happens. 15 | 16 | namespace spdlog { 17 | namespace details { 18 | class SPDLOG_API backtracer { 19 | mutable std::mutex mutex_; 20 | std::atomic enabled_{false}; 21 | circular_q messages_; 22 | 23 | public: 24 | backtracer() = default; 25 | backtracer(const backtracer &other); 26 | 27 | backtracer(backtracer &&other) SPDLOG_NOEXCEPT; 28 | backtracer &operator=(backtracer other); 29 | 30 | void enable(size_t size); 31 | void disable(); 32 | bool enabled() const; 33 | void push_back(const log_msg &msg); 34 | bool empty() const; 35 | 36 | // pop all items in the q and apply the given fun on each of them. 37 | void foreach_pop(std::function fun); 38 | }; 39 | 40 | } // namespace details 41 | } // namespace spdlog 42 | 43 | #ifdef SPDLOG_HEADER_ONLY 44 | #include "backtracer-inl.h" 45 | #endif 46 | -------------------------------------------------------------------------------- /include/spdlog/details/log_msg.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | struct SPDLOG_API log_msg { 12 | log_msg() = default; 13 | log_msg(log_clock::time_point log_time, 14 | source_loc loc, 15 | string_view_t logger_name, 16 | level::level_enum lvl, 17 | string_view_t msg); 18 | log_msg(source_loc loc, string_view_t logger_name, level::level_enum lvl, string_view_t msg); 19 | log_msg(string_view_t logger_name, level::level_enum lvl, string_view_t msg); 20 | log_msg(const log_msg &other) = default; 21 | log_msg &operator=(const log_msg &other) = default; 22 | 23 | string_view_t logger_name; 24 | level::level_enum level{level::off}; 25 | log_clock::time_point time; 26 | size_t thread_id{0}; 27 | 28 | // wrapping the formatted text with color (updated by pattern_formatter). 29 | mutable size_t color_range_start{0}; 30 | mutable size_t color_range_end{0}; 31 | 32 | source_loc source; 33 | string_view_t payload; 34 | }; 35 | } // namespace details 36 | } // namespace spdlog 37 | 38 | #ifdef SPDLOG_HEADER_ONLY 39 | #include "log_msg-inl.h" 40 | #endif 41 | -------------------------------------------------------------------------------- /include/spdlog/cfg/argv.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | // 9 | // Init log levels using each argv entry that starts with "SPDLOG_LEVEL=" 10 | // 11 | // set all loggers to debug level: 12 | // example.exe "SPDLOG_LEVEL=debug" 13 | 14 | // set logger1 to trace level 15 | // example.exe "SPDLOG_LEVEL=logger1=trace" 16 | 17 | // turn off all logging except for logger1 and logger2: 18 | // example.exe "SPDLOG_LEVEL=off,logger1=debug,logger2=info" 19 | 20 | namespace spdlog { 21 | namespace cfg { 22 | 23 | // search for SPDLOG_LEVEL= in the args and use it to init the levels 24 | inline void load_argv_levels(int argc, const char **argv) { 25 | const std::string spdlog_level_prefix = "SPDLOG_LEVEL="; 26 | for (int i = 1; i < argc; i++) { 27 | std::string arg = argv[i]; 28 | if (arg.find(spdlog_level_prefix) == 0) { 29 | auto levels_string = arg.substr(spdlog_level_prefix.size()); 30 | helpers::load_levels(levels_string); 31 | } 32 | } 33 | } 34 | 35 | inline void load_argv_levels(int argc, char **argv) { 36 | load_argv_levels(argc, const_cast(argv)); 37 | } 38 | 39 | } // namespace cfg 40 | } // namespace spdlog 41 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/conftypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CONFTYPES_H 11 | # define OPENSSL_CONFTYPES_H 12 | # pragma once 13 | 14 | #ifndef OPENSSL_CONF_H 15 | # include 16 | #endif 17 | 18 | /* 19 | * The contents of this file are deprecated and will be made opaque 20 | */ 21 | struct conf_method_st { 22 | const char *name; 23 | CONF *(*create) (CONF_METHOD *meth); 24 | int (*init) (CONF *conf); 25 | int (*destroy) (CONF *conf); 26 | int (*destroy_data) (CONF *conf); 27 | int (*load_bio) (CONF *conf, BIO *bp, long *eline); 28 | int (*dump) (const CONF *conf, BIO *bp); 29 | int (*is_number) (const CONF *conf, char c); 30 | int (*to_int) (const CONF *conf, char c); 31 | int (*load) (CONF *conf, const char *name, long *eline); 32 | }; 33 | 34 | struct conf_st { 35 | CONF_METHOD *meth; 36 | void *meth_data; 37 | LHASH_OF(CONF_VALUE) *data; 38 | int flag_dollarid; 39 | int flag_abspath; 40 | char *includedir; 41 | OSSL_LIB_CTX *libctx; 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_RC4_H 11 | # define OPENSSL_RC4_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RC4_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_RC4 22 | # include 23 | # ifdef __cplusplus 24 | extern "C" { 25 | # endif 26 | 27 | # ifndef OPENSSL_NO_DEPRECATED_3_0 28 | typedef struct rc4_key_st { 29 | RC4_INT x, y; 30 | RC4_INT data[256]; 31 | } RC4_KEY; 32 | # endif 33 | # ifndef OPENSSL_NO_DEPRECATED_3_0 34 | OSSL_DEPRECATEDIN_3_0 const char *RC4_options(void); 35 | OSSL_DEPRECATEDIN_3_0 void RC4_set_key(RC4_KEY *key, int len, 36 | const unsigned char *data); 37 | OSSL_DEPRECATEDIN_3_0 void RC4(RC4_KEY *key, size_t len, 38 | const unsigned char *indata, 39 | unsigned char *outdata); 40 | # endif 41 | 42 | # ifdef __cplusplus 43 | } 44 | # endif 45 | # endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /include/spdlog/sinks/basic_file_sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | namespace sinks { 15 | 16 | template 17 | SPDLOG_INLINE basic_file_sink::basic_file_sink(const filename_t &filename, 18 | bool truncate, 19 | const file_event_handlers &event_handlers) 20 | : file_helper_{event_handlers} { 21 | file_helper_.open(filename, truncate); 22 | } 23 | 24 | template 25 | SPDLOG_INLINE const filename_t &basic_file_sink::filename() const { 26 | return file_helper_.filename(); 27 | } 28 | 29 | template 30 | SPDLOG_INLINE void basic_file_sink::sink_it_(const details::log_msg &msg) { 31 | memory_buf_t formatted; 32 | base_sink::formatter_->format(msg, formatted); 33 | file_helper_.write(formatted); 34 | } 35 | 36 | template 37 | SPDLOG_INLINE void basic_file_sink::flush_() { 38 | file_helper_.flush(); 39 | } 40 | 41 | } // namespace sinks 42 | } // namespace spdlog 43 | -------------------------------------------------------------------------------- /include/spdlog/sinks/null_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | 15 | template 16 | class null_sink : public base_sink { 17 | protected: 18 | void sink_it_(const details::log_msg &) override {} 19 | void flush_() override {} 20 | }; 21 | 22 | using null_sink_mt = null_sink; 23 | using null_sink_st = null_sink; 24 | 25 | } // namespace sinks 26 | 27 | template 28 | inline std::shared_ptr null_logger_mt(const std::string &logger_name) { 29 | auto null_logger = Factory::template create(logger_name); 30 | null_logger->set_level(level::off); 31 | return null_logger; 32 | } 33 | 34 | template 35 | inline std::shared_ptr null_logger_st(const std::string &logger_name) { 36 | auto null_logger = Factory::template create(logger_name); 37 | null_logger->set_level(level::off); 38 | return null_logger; 39 | } 40 | 41 | } // namespace spdlog 42 | -------------------------------------------------------------------------------- /include/spdlog/sinks/ostream_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | template 15 | class ostream_sink final : public base_sink { 16 | public: 17 | explicit ostream_sink(std::ostream &os, bool force_flush = false) 18 | : ostream_(os), 19 | force_flush_(force_flush) {} 20 | ostream_sink(const ostream_sink &) = delete; 21 | ostream_sink &operator=(const ostream_sink &) = delete; 22 | 23 | protected: 24 | void sink_it_(const details::log_msg &msg) override { 25 | memory_buf_t formatted; 26 | base_sink::formatter_->format(msg, formatted); 27 | ostream_.write(formatted.data(), static_cast(formatted.size())); 28 | if (force_flush_) { 29 | ostream_.flush(); 30 | } 31 | } 32 | 33 | void flush_() override { ostream_.flush(); } 34 | 35 | std::ostream &ostream_; 36 | bool force_flush_; 37 | }; 38 | 39 | using ostream_sink_mt = ostream_sink; 40 | using ostream_sink_st = ostream_sink; 41 | 42 | } // namespace sinks 43 | } // namespace spdlog 44 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/comperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_COMPERR_H 12 | # define OPENSSL_COMPERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_COMP 21 | 22 | 23 | /* 24 | * COMP reason codes. 25 | */ 26 | # define COMP_R_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 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/symhacks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_SYMHACKS_H 11 | # define OPENSSL_SYMHACKS_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_SYMHACKS_H 17 | # endif 18 | 19 | # include 20 | 21 | /* Case insensitive linking causes problems.... */ 22 | # if defined(OPENSSL_SYS_VMS) 23 | # undef ERR_load_CRYPTO_strings 24 | # define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings 25 | # undef OCSP_crlID_new 26 | # define OCSP_crlID_new OCSP_crlID2_new 27 | 28 | # undef d2i_ECPARAMETERS 29 | # define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS 30 | # undef i2d_ECPARAMETERS 31 | # define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS 32 | # undef d2i_ECPKPARAMETERS 33 | # define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS 34 | # undef i2d_ECPKPARAMETERS 35 | # define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS 36 | 37 | # endif 38 | 39 | #endif /* ! defined HEADER_VMS_IDHACKS_H */ 40 | -------------------------------------------------------------------------------- /include/spdlog/fmt/bundled/fmt.license.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - present, Victor Zverovich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | --- Optional exception to the license --- 23 | 24 | As an exception, if, as a result of your compiling your source code, portions 25 | of this Software are embedded into a machine-executable object form of such 26 | source code, you may redistribute such embedded portions in such object form 27 | without including the above copyright and permission notices. 28 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/uierr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_UIERR_H 12 | # define OPENSSL_UIERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * UI reason codes. 23 | */ 24 | # define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS 104 25 | # define UI_R_INDEX_TOO_LARGE 102 26 | # define UI_R_INDEX_TOO_SMALL 103 27 | # define UI_R_NO_RESULT_BUFFER 105 28 | # define UI_R_PROCESSING_ERROR 107 29 | # define UI_R_RESULT_TOO_LARGE 100 30 | # define UI_R_RESULT_TOO_SMALL 101 31 | # define UI_R_SYSASSIGN_ERROR 109 32 | # define UI_R_SYSDASSGN_ERROR 110 33 | # define UI_R_SYSQIOW_ERROR 111 34 | # define UI_R_UNKNOWN_CONTROL_COMMAND 106 35 | # define UI_R_UNKNOWN_TTYGET_ERRNO_VALUE 108 36 | # define UI_R_USER_DATA_DUPLICATION_UNSUPPORTED 112 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /include/spdlog/details/log_msg-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace details { 14 | 15 | SPDLOG_INLINE log_msg::log_msg(spdlog::log_clock::time_point log_time, 16 | spdlog::source_loc loc, 17 | string_view_t a_logger_name, 18 | spdlog::level::level_enum lvl, 19 | spdlog::string_view_t msg) 20 | : logger_name(a_logger_name), 21 | level(lvl), 22 | time(log_time) 23 | #ifndef SPDLOG_NO_THREAD_ID 24 | , 25 | thread_id(os::thread_id()) 26 | #endif 27 | , 28 | source(loc), 29 | payload(msg) { 30 | } 31 | 32 | SPDLOG_INLINE log_msg::log_msg(spdlog::source_loc loc, 33 | string_view_t a_logger_name, 34 | spdlog::level::level_enum lvl, 35 | spdlog::string_view_t msg) 36 | : log_msg(os::now(), loc, a_logger_name, lvl, msg) {} 37 | 38 | SPDLOG_INLINE log_msg::log_msg(string_view_t a_logger_name, 39 | spdlog::level::level_enum lvl, 40 | spdlog::string_view_t msg) 41 | : log_msg(os::now(), source_loc{}, a_logger_name, lvl, msg) {} 42 | 43 | } // namespace details 44 | } // namespace spdlog 45 | -------------------------------------------------------------------------------- /include/spdlog/sinks/stdout_color_sinks-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | 15 | template 16 | SPDLOG_INLINE std::shared_ptr stdout_color_mt(const std::string &logger_name, 17 | color_mode mode) { 18 | return Factory::template create(logger_name, mode); 19 | } 20 | 21 | template 22 | SPDLOG_INLINE std::shared_ptr stdout_color_st(const std::string &logger_name, 23 | color_mode mode) { 24 | return Factory::template create(logger_name, mode); 25 | } 26 | 27 | template 28 | SPDLOG_INLINE std::shared_ptr stderr_color_mt(const std::string &logger_name, 29 | color_mode mode) { 30 | return Factory::template create(logger_name, mode); 31 | } 32 | 33 | template 34 | SPDLOG_INLINE std::shared_ptr stderr_color_st(const std::string &logger_name, 35 | color_mode mode) { 36 | return Factory::template create(logger_name, mode); 37 | } 38 | } // namespace spdlog 39 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CONF_API_H 11 | # define OPENSSL_CONF_API_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_CONF_API_H 17 | # endif 18 | 19 | # include 20 | # include 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Up until OpenSSL 0.9.5a, this was new_section */ 27 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 28 | /* Up until OpenSSL 0.9.5a, this was get_section */ 29 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 30 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ 31 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 32 | const char *section); 33 | 34 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 35 | char *_CONF_get_string(const CONF *conf, const char *section, 36 | const char *name); 37 | long _CONF_get_number(const CONF *conf, const char *section, 38 | const char *name); 39 | 40 | int _CONF_new_data(CONF *conf); 41 | void _CONF_free_data(CONF *conf); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif 47 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/mdc2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_MDC2_H 11 | # define OPENSSL_MDC2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_MDC2_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_MDC2 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | # define MDC2_DIGEST_LENGTH 16 29 | 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | 32 | # define MDC2_BLOCK 8 33 | 34 | typedef struct mdc2_ctx_st { 35 | unsigned int num; 36 | unsigned char data[MDC2_BLOCK]; 37 | DES_cblock h, hh; 38 | unsigned int pad_type; /* either 1 or 2, default 1 */ 39 | } MDC2_CTX; 40 | # endif 41 | # ifndef OPENSSL_NO_DEPRECATED_3_0 42 | OSSL_DEPRECATEDIN_3_0 int MDC2_Init(MDC2_CTX *c); 43 | OSSL_DEPRECATEDIN_3_0 int MDC2_Update(MDC2_CTX *c, const unsigned char *data, 44 | size_t len); 45 | OSSL_DEPRECATEDIN_3_0 int MDC2_Final(unsigned char *md, MDC2_CTX *c); 46 | OSSL_DEPRECATEDIN_3_0 unsigned char *MDC2(const unsigned char *d, size_t n, 47 | unsigned char *md); 48 | # endif 49 | 50 | # ifdef __cplusplus 51 | } 52 | # endif 53 | # endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/md2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_MD2_H 11 | # define OPENSSL_MD2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_MD2_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_MD2 22 | # include 23 | # ifdef __cplusplus 24 | extern "C" { 25 | # endif 26 | 27 | # define MD2_DIGEST_LENGTH 16 28 | 29 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 30 | 31 | typedef unsigned char MD2_INT; 32 | 33 | # define MD2_BLOCK 16 34 | 35 | typedef struct MD2state_st { 36 | unsigned int num; 37 | unsigned char data[MD2_BLOCK]; 38 | MD2_INT cksm[MD2_BLOCK]; 39 | MD2_INT state[MD2_BLOCK]; 40 | } MD2_CTX; 41 | # endif 42 | # ifndef OPENSSL_NO_DEPRECATED_3_0 43 | OSSL_DEPRECATEDIN_3_0 const char *MD2_options(void); 44 | OSSL_DEPRECATEDIN_3_0 int MD2_Init(MD2_CTX *c); 45 | OSSL_DEPRECATEDIN_3_0 int MD2_Update(MD2_CTX *c, const unsigned char *data, 46 | size_t len); 47 | OSSL_DEPRECATEDIN_3_0 int MD2_Final(unsigned char *md, MD2_CTX *c); 48 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD2(const unsigned char *d, size_t n, 49 | unsigned char *md); 50 | # endif 51 | 52 | # ifdef __cplusplus 53 | } 54 | # endif 55 | # endif 56 | #endif 57 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/dtls1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_DTLS1_H 11 | # define OPENSSL_DTLS1_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_DTLS1_H 17 | # endif 18 | 19 | # include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | #include 26 | 27 | /* DTLS*_VERSION constants are defined in prov_ssl.h */ 28 | # ifndef OPENSSL_NO_DEPRECATED_3_0 29 | # define DTLS_MIN_VERSION DTLS1_VERSION 30 | # define DTLS_MAX_VERSION DTLS1_2_VERSION 31 | # endif 32 | # define DTLS1_VERSION_MAJOR 0xFE 33 | 34 | /* Special value for method supporting multiple versions */ 35 | # define DTLS_ANY_VERSION 0x1FFFF 36 | 37 | /* lengths of messages */ 38 | 39 | # define DTLS1_COOKIE_LENGTH 255 40 | 41 | # define DTLS1_RT_HEADER_LENGTH 13 42 | 43 | # define DTLS1_HM_HEADER_LENGTH 12 44 | 45 | # define DTLS1_HM_BAD_FRAGMENT -2 46 | # define DTLS1_HM_FRAGMENT_RETRY -3 47 | 48 | # define DTLS1_CCS_HEADER_LENGTH 1 49 | 50 | # define DTLS1_AL_HEADER_LENGTH 2 51 | 52 | # define DTLS1_TMO_ALERT_COUNT 12 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | #endif 58 | -------------------------------------------------------------------------------- /include/spdlog/sinks/base_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | // 6 | // base sink templated over a mutex (either dummy or real) 7 | // concrete implementation should override the sink_it_() and flush_() methods. 8 | // locking is taken care of in this class - no locking needed by the 9 | // implementers.. 10 | // 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | namespace spdlog { 17 | namespace sinks { 18 | template 19 | class SPDLOG_API base_sink : public sink { 20 | public: 21 | base_sink(); 22 | explicit base_sink(std::unique_ptr formatter); 23 | ~base_sink() override = default; 24 | 25 | base_sink(const base_sink &) = delete; 26 | base_sink(base_sink &&) = delete; 27 | 28 | base_sink &operator=(const base_sink &) = delete; 29 | base_sink &operator=(base_sink &&) = delete; 30 | 31 | void log(const details::log_msg &msg) final; 32 | void flush() final; 33 | void set_pattern(const std::string &pattern) final; 34 | void set_formatter(std::unique_ptr sink_formatter) final; 35 | 36 | protected: 37 | // sink formatter 38 | std::unique_ptr formatter_; 39 | Mutex mutex_; 40 | 41 | virtual void sink_it_(const details::log_msg &msg) = 0; 42 | virtual void flush_() = 0; 43 | virtual void set_pattern_(const std::string &pattern); 44 | virtual void set_formatter_(std::unique_ptr sink_formatter); 45 | }; 46 | } // namespace sinks 47 | } // namespace spdlog 48 | 49 | #ifdef SPDLOG_HEADER_ONLY 50 | #include "base_sink-inl.h" 51 | #endif 52 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/dsaerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_DSAERR_H 12 | # define OPENSSL_DSAERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_DSA 21 | 22 | 23 | /* 24 | * DSA reason codes. 25 | */ 26 | # define DSA_R_BAD_FFC_PARAMETERS 114 27 | # define DSA_R_BAD_Q_VALUE 102 28 | # define DSA_R_BN_DECODE_ERROR 108 29 | # define DSA_R_BN_ERROR 109 30 | # define DSA_R_DECODE_ERROR 104 31 | # define DSA_R_INVALID_DIGEST_TYPE 106 32 | # define DSA_R_INVALID_PARAMETERS 112 33 | # define DSA_R_MISSING_PARAMETERS 101 34 | # define DSA_R_MISSING_PRIVATE_KEY 111 35 | # define DSA_R_MODULUS_TOO_LARGE 103 36 | # define DSA_R_NO_PARAMETERS_SET 107 37 | # define DSA_R_PARAMETER_ENCODING_ERROR 105 38 | # define DSA_R_P_NOT_PRIME 115 39 | # define DSA_R_Q_NOT_PRIME 113 40 | # define DSA_R_SEED_LEN_SMALL 110 41 | # define DSA_R_TOO_MANY_RETRIES 116 42 | 43 | # endif 44 | #endif 45 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/cmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CMAC_H 11 | # define OPENSSL_CMAC_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_CMAC_H 17 | # endif 18 | 19 | # ifndef OPENSSL_NO_CMAC 20 | 21 | # ifdef __cplusplus 22 | extern "C" { 23 | # endif 24 | 25 | # include 26 | 27 | # ifndef OPENSSL_NO_DEPRECATED_3_0 28 | /* Opaque */ 29 | typedef struct CMAC_CTX_st CMAC_CTX; 30 | # endif 31 | # ifndef OPENSSL_NO_DEPRECATED_3_0 32 | OSSL_DEPRECATEDIN_3_0 CMAC_CTX *CMAC_CTX_new(void); 33 | OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_cleanup(CMAC_CTX *ctx); 34 | OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_free(CMAC_CTX *ctx); 35 | OSSL_DEPRECATEDIN_3_0 EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); 36 | OSSL_DEPRECATEDIN_3_0 int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); 37 | OSSL_DEPRECATEDIN_3_0 int CMAC_Init(CMAC_CTX *ctx, 38 | const void *key, size_t keylen, 39 | const EVP_CIPHER *cipher, ENGINE *impl); 40 | OSSL_DEPRECATEDIN_3_0 int CMAC_Update(CMAC_CTX *ctx, 41 | const void *data, size_t dlen); 42 | OSSL_DEPRECATEDIN_3_0 int CMAC_Final(CMAC_CTX *ctx, 43 | unsigned char *out, size_t *poutlen); 44 | OSSL_DEPRECATEDIN_3_0 int CMAC_resume(CMAC_CTX *ctx); 45 | # endif 46 | 47 | # ifdef __cplusplus 48 | } 49 | # endif 50 | 51 | # endif 52 | #endif 53 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/cterr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_CTERR_H 12 | # define OPENSSL_CTERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_CT 21 | 22 | 23 | /* 24 | * CT reason codes. 25 | */ 26 | # define CT_R_BASE64_DECODE_ERROR 108 27 | # define CT_R_INVALID_LOG_ID_LENGTH 100 28 | # define CT_R_LOG_CONF_INVALID 109 29 | # define CT_R_LOG_CONF_INVALID_KEY 110 30 | # define CT_R_LOG_CONF_MISSING_DESCRIPTION 111 31 | # define CT_R_LOG_CONF_MISSING_KEY 112 32 | # define CT_R_LOG_KEY_INVALID 113 33 | # define CT_R_SCT_FUTURE_TIMESTAMP 116 34 | # define CT_R_SCT_INVALID 104 35 | # define CT_R_SCT_INVALID_SIGNATURE 107 36 | # define CT_R_SCT_LIST_INVALID 105 37 | # define CT_R_SCT_LOG_ID_MISMATCH 114 38 | # define CT_R_SCT_NOT_SET 106 39 | # define CT_R_SCT_UNSUPPORTED_VERSION 115 40 | # define CT_R_UNRECOGNIZED_SIGNATURE_NID 101 41 | # define CT_R_UNSUPPORTED_ENTRY_TYPE 102 42 | # define CT_R_UNSUPPORTED_VERSION 103 43 | 44 | # endif 45 | #endif 46 | -------------------------------------------------------------------------------- /include/spdlog/details/log_msg_buffer-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(const log_msg &orig_msg) 14 | : log_msg{orig_msg} { 15 | buffer.append(logger_name.begin(), logger_name.end()); 16 | buffer.append(payload.begin(), payload.end()); 17 | update_string_views(); 18 | } 19 | 20 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(const log_msg_buffer &other) 21 | : log_msg{other} { 22 | buffer.append(logger_name.begin(), logger_name.end()); 23 | buffer.append(payload.begin(), payload.end()); 24 | update_string_views(); 25 | } 26 | 27 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT 28 | : log_msg{other}, 29 | buffer{std::move(other.buffer)} { 30 | update_string_views(); 31 | } 32 | 33 | SPDLOG_INLINE log_msg_buffer &log_msg_buffer::operator=(const log_msg_buffer &other) { 34 | log_msg::operator=(other); 35 | buffer.clear(); 36 | buffer.append(other.buffer.data(), other.buffer.data() + other.buffer.size()); 37 | update_string_views(); 38 | return *this; 39 | } 40 | 41 | SPDLOG_INLINE log_msg_buffer &log_msg_buffer::operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT { 42 | log_msg::operator=(other); 43 | buffer = std::move(other.buffer); 44 | update_string_views(); 45 | return *this; 46 | } 47 | 48 | SPDLOG_INLINE void log_msg_buffer::update_string_views() { 49 | logger_name = string_view_t{buffer.data(), logger_name.size()}; 50 | payload = string_view_t{buffer.data() + logger_name.size(), payload.size()}; 51 | } 52 | 53 | } // namespace details 54 | } // namespace spdlog 55 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_BUFFER_H 11 | # define OPENSSL_BUFFER_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_BUFFER_H 17 | # endif 18 | 19 | # include 20 | # ifndef OPENSSL_CRYPTO_H 21 | # include 22 | # endif 23 | # include 24 | 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | # include 31 | # include 32 | 33 | # ifndef OPENSSL_NO_DEPRECATED_3_0 34 | # define BUF_strdup(s) OPENSSL_strdup(s) 35 | # define BUF_strndup(s, size) OPENSSL_strndup(s, size) 36 | # define BUF_memdup(data, size) OPENSSL_memdup(data, size) 37 | # define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) 38 | # define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) 39 | # define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) 40 | # endif 41 | 42 | struct buf_mem_st { 43 | size_t length; /* current number of bytes */ 44 | char *data; 45 | size_t max; /* size of buffer */ 46 | unsigned long flags; 47 | }; 48 | 49 | # define BUF_MEM_FLAG_SECURE 0x01 50 | 51 | BUF_MEM *BUF_MEM_new(void); 52 | BUF_MEM *BUF_MEM_new_ex(unsigned long flags); 53 | void BUF_MEM_free(BUF_MEM *a); 54 | size_t BUF_MEM_grow(BUF_MEM *str, size_t len); 55 | size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len); 56 | void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); 57 | 58 | 59 | # ifdef __cplusplus 60 | } 61 | # endif 62 | #endif 63 | -------------------------------------------------------------------------------- /include/spdlog/sinks/callback_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | 15 | // callbacks type 16 | typedef std::function custom_log_callback; 17 | 18 | namespace sinks { 19 | /* 20 | * Trivial callback sink, gets a callback function and calls it on each log 21 | */ 22 | template 23 | class callback_sink final : public base_sink { 24 | public: 25 | explicit callback_sink(const custom_log_callback &callback) 26 | : callback_{callback} {} 27 | 28 | protected: 29 | void sink_it_(const details::log_msg &msg) override { callback_(msg); } 30 | void flush_() override{}; 31 | 32 | private: 33 | custom_log_callback callback_; 34 | }; 35 | 36 | using callback_sink_mt = callback_sink; 37 | using callback_sink_st = callback_sink; 38 | 39 | } // namespace sinks 40 | 41 | // 42 | // factory functions 43 | // 44 | template 45 | inline std::shared_ptr callback_logger_mt(const std::string &logger_name, 46 | const custom_log_callback &callback) { 47 | return Factory::template create(logger_name, callback); 48 | } 49 | 50 | template 51 | inline std::shared_ptr callback_logger_st(const std::string &logger_name, 52 | const custom_log_callback &callback) { 53 | return Factory::template create(logger_name, callback); 54 | } 55 | 56 | } // namespace spdlog 57 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/comp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_COMP_H 11 | # define OPENSSL_COMP_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_COMP_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_COMP 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | 29 | 30 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 31 | const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx); 32 | int COMP_CTX_get_type(const COMP_CTX* comp); 33 | int COMP_get_type(const COMP_METHOD *meth); 34 | const char *COMP_get_name(const COMP_METHOD *meth); 35 | void COMP_CTX_free(COMP_CTX *ctx); 36 | 37 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 38 | unsigned char *in, int ilen); 39 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 40 | unsigned char *in, int ilen); 41 | 42 | COMP_METHOD *COMP_zlib(void); 43 | COMP_METHOD *COMP_zlib_oneshot(void); 44 | COMP_METHOD *COMP_brotli(void); 45 | COMP_METHOD *COMP_brotli_oneshot(void); 46 | COMP_METHOD *COMP_zstd(void); 47 | COMP_METHOD *COMP_zstd_oneshot(void); 48 | 49 | #ifndef OPENSSL_NO_DEPRECATED_1_1_0 50 | # define COMP_zlib_cleanup() while(0) continue 51 | #endif 52 | 53 | # ifdef OPENSSL_BIO_H 54 | const BIO_METHOD *BIO_f_zlib(void); 55 | const BIO_METHOD *BIO_f_brotli(void); 56 | const BIO_METHOD *BIO_f_zstd(void); 57 | # endif 58 | 59 | 60 | # ifdef __cplusplus 61 | } 62 | # endif 63 | # endif 64 | #endif 65 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_MD5_H 11 | # define OPENSSL_MD5_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_MD5_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_MD5 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | # define MD5_DIGEST_LENGTH 16 29 | 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | /* 32 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 33 | * ! MD5_LONG has to be at least 32 bits wide. ! 34 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 35 | */ 36 | # define MD5_LONG unsigned int 37 | 38 | # define MD5_CBLOCK 64 39 | # define MD5_LBLOCK (MD5_CBLOCK/4) 40 | 41 | typedef struct MD5state_st { 42 | MD5_LONG A, B, C, D; 43 | MD5_LONG Nl, Nh; 44 | MD5_LONG data[MD5_LBLOCK]; 45 | unsigned int num; 46 | } MD5_CTX; 47 | # endif 48 | # ifndef OPENSSL_NO_DEPRECATED_3_0 49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c); 50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len); 51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c); 52 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n, 53 | unsigned char *md); 54 | OSSL_DEPRECATEDIN_3_0 void MD5_Transform(MD5_CTX *c, const unsigned char *b); 55 | # endif 56 | 57 | # ifdef __cplusplus 58 | } 59 | # endif 60 | # endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_MD4_H 11 | # define OPENSSL_MD4_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_MD4_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_MD4 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | # define MD4_DIGEST_LENGTH 16 29 | 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | 32 | /*- 33 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 34 | * ! MD4_LONG has to be at least 32 bits wide. ! 35 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 36 | */ 37 | # define MD4_LONG unsigned int 38 | 39 | # define MD4_CBLOCK 64 40 | # define MD4_LBLOCK (MD4_CBLOCK/4) 41 | 42 | typedef struct MD4state_st { 43 | MD4_LONG A, B, C, D; 44 | MD4_LONG Nl, Nh; 45 | MD4_LONG data[MD4_LBLOCK]; 46 | unsigned int num; 47 | } MD4_CTX; 48 | # endif 49 | # ifndef OPENSSL_NO_DEPRECATED_3_0 50 | OSSL_DEPRECATEDIN_3_0 int MD4_Init(MD4_CTX *c); 51 | OSSL_DEPRECATEDIN_3_0 int MD4_Update(MD4_CTX *c, const void *data, size_t len); 52 | OSSL_DEPRECATEDIN_3_0 int MD4_Final(unsigned char *md, MD4_CTX *c); 53 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD4(const unsigned char *d, size_t n, 54 | unsigned char *md); 55 | OSSL_DEPRECATEDIN_3_0 void MD4_Transform(MD4_CTX *c, const unsigned char *b); 56 | # endif 57 | 58 | # ifdef __cplusplus 59 | } 60 | # endif 61 | # endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_RIPEMD_H 11 | # define OPENSSL_RIPEMD_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RIPEMD_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_RMD160 22 | # include 23 | # include 24 | 25 | # define RIPEMD160_DIGEST_LENGTH 20 26 | 27 | # ifdef __cplusplus 28 | extern "C" { 29 | # endif 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | 32 | # define RIPEMD160_LONG unsigned int 33 | 34 | # define RIPEMD160_CBLOCK 64 35 | # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 36 | 37 | typedef struct RIPEMD160state_st { 38 | RIPEMD160_LONG A, B, C, D, E; 39 | RIPEMD160_LONG Nl, Nh; 40 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 41 | unsigned int num; 42 | } RIPEMD160_CTX; 43 | # endif 44 | # ifndef OPENSSL_NO_DEPRECATED_3_0 45 | OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Init(RIPEMD160_CTX *c); 46 | OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, 47 | size_t len); 48 | OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 49 | OSSL_DEPRECATEDIN_3_0 unsigned char *RIPEMD160(const unsigned char *d, size_t n, 50 | unsigned char *md); 51 | OSSL_DEPRECATEDIN_3_0 void RIPEMD160_Transform(RIPEMD160_CTX *c, 52 | const unsigned char *b); 53 | # endif 54 | 55 | # ifdef __cplusplus 56 | } 57 | # endif 58 | # endif 59 | #endif 60 | -------------------------------------------------------------------------------- /CMakePresets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "configurePresets": [ 4 | { 5 | "name": "windows-base", 6 | "hidden": true, 7 | "generator": "Ninja", 8 | "binaryDir": "${sourceDir}/out/build/${presetName}", 9 | "installDir": "${sourceDir}/out/install/${presetName}", 10 | "cacheVariables": { 11 | "CMAKE_C_COMPILER": "cl.exe", 12 | "CMAKE_CXX_COMPILER": "cl.exe" 13 | }, 14 | "condition": { 15 | "type": "equals", 16 | "lhs": "${hostSystemName}", 17 | "rhs": "Windows" 18 | } 19 | }, 20 | { 21 | "name": "x64-debug", 22 | "displayName": "x64 Debug", 23 | "inherits": "windows-base", 24 | "architecture": { 25 | "value": "x64", 26 | "strategy": "external" 27 | }, 28 | "cacheVariables": { 29 | "CMAKE_BUILD_TYPE": "Debug" 30 | } 31 | }, 32 | { 33 | "name": "x64-release", 34 | "displayName": "x64 Release", 35 | "inherits": "x64-debug", 36 | "cacheVariables": { 37 | "CMAKE_BUILD_TYPE": "Release" 38 | } 39 | }, 40 | { 41 | "name": "x86-debug", 42 | "displayName": "x86 Debug", 43 | "inherits": "windows-base", 44 | "architecture": { 45 | "value": "x86", 46 | "strategy": "external" 47 | }, 48 | "cacheVariables": { 49 | "CMAKE_BUILD_TYPE": "Debug" 50 | } 51 | }, 52 | { 53 | "name": "x86-release", 54 | "displayName": "x86 Release", 55 | "inherits": "x86-debug", 56 | "cacheVariables": { 57 | "CMAKE_BUILD_TYPE": "Release" 58 | } 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/cmp_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * Copyright Nokia 2007-2019 4 | * Copyright Siemens AG 2015-2019 5 | * 6 | * Licensed under the Apache License 2.0 (the "License"). You may not use 7 | * this file except in compliance with the License. You can obtain a copy 8 | * in the file LICENSE in the source distribution or at 9 | * https://www.openssl.org/source/license.html 10 | */ 11 | 12 | #ifndef OPENSSL_CMP_UTIL_H 13 | # define OPENSSL_CMP_UTIL_H 14 | # pragma once 15 | 16 | # include 17 | # ifndef OPENSSL_NO_CMP 18 | 19 | # include 20 | # include 21 | 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | int OSSL_CMP_log_open(void); 27 | void OSSL_CMP_log_close(void); 28 | # define OSSL_CMP_LOG_PREFIX "CMP " 29 | 30 | /* 31 | * generalized logging/error callback mirroring the severity levels of syslog.h 32 | */ 33 | typedef int OSSL_CMP_severity; 34 | # define OSSL_CMP_LOG_EMERG 0 35 | # define OSSL_CMP_LOG_ALERT 1 36 | # define OSSL_CMP_LOG_CRIT 2 37 | # define OSSL_CMP_LOG_ERR 3 38 | # define OSSL_CMP_LOG_WARNING 4 39 | # define OSSL_CMP_LOG_NOTICE 5 40 | # define OSSL_CMP_LOG_INFO 6 41 | # define OSSL_CMP_LOG_DEBUG 7 42 | # define OSSL_CMP_LOG_TRACE 8 43 | # define OSSL_CMP_LOG_MAX OSSL_CMP_LOG_TRACE 44 | typedef int (*OSSL_CMP_log_cb_t)(const char *func, const char *file, int line, 45 | OSSL_CMP_severity level, const char *msg); 46 | 47 | int OSSL_CMP_print_to_bio(BIO *bio, const char *component, const char *file, 48 | int line, OSSL_CMP_severity level, const char *msg); 49 | /* use of the logging callback for outputting error queue */ 50 | void OSSL_CMP_print_errors_cb(OSSL_CMP_log_cb_t log_fn); 51 | 52 | # ifdef __cplusplus 53 | } 54 | # endif 55 | # endif /* !defined(OPENSSL_NO_CMP) */ 56 | #endif /* !defined(OPENSSL_CMP_UTIL_H) */ 57 | -------------------------------------------------------------------------------- /include/spdlog/sinks/stdout_color_sinks.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifdef _WIN32 7 | #include 8 | #else 9 | #include 10 | #endif 11 | 12 | #include 13 | 14 | namespace spdlog { 15 | namespace sinks { 16 | #ifdef _WIN32 17 | using stdout_color_sink_mt = wincolor_stdout_sink_mt; 18 | using stdout_color_sink_st = wincolor_stdout_sink_st; 19 | using stderr_color_sink_mt = wincolor_stderr_sink_mt; 20 | using stderr_color_sink_st = wincolor_stderr_sink_st; 21 | #else 22 | using stdout_color_sink_mt = ansicolor_stdout_sink_mt; 23 | using stdout_color_sink_st = ansicolor_stdout_sink_st; 24 | using stderr_color_sink_mt = ansicolor_stderr_sink_mt; 25 | using stderr_color_sink_st = ansicolor_stderr_sink_st; 26 | #endif 27 | } // namespace sinks 28 | 29 | template 30 | std::shared_ptr stdout_color_mt(const std::string &logger_name, 31 | color_mode mode = color_mode::automatic); 32 | 33 | template 34 | std::shared_ptr stdout_color_st(const std::string &logger_name, 35 | color_mode mode = color_mode::automatic); 36 | 37 | template 38 | std::shared_ptr stderr_color_mt(const std::string &logger_name, 39 | color_mode mode = color_mode::automatic); 40 | 41 | template 42 | std::shared_ptr stderr_color_st(const std::string &logger_name, 43 | color_mode mode = color_mode::automatic); 44 | 45 | } // namespace spdlog 46 | 47 | #ifdef SPDLOG_HEADER_ONLY 48 | #include "stdout_color_sinks-inl.h" 49 | #endif 50 | -------------------------------------------------------------------------------- /include/spdlog/details/file_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | // Helper class for file sinks. 13 | // When failing to open a file, retry several times(5) with a delay interval(10 ms). 14 | // Throw spdlog_ex exception on errors. 15 | 16 | class SPDLOG_API file_helper { 17 | public: 18 | file_helper() = default; 19 | explicit file_helper(const file_event_handlers &event_handlers); 20 | 21 | file_helper(const file_helper &) = delete; 22 | file_helper &operator=(const file_helper &) = delete; 23 | ~file_helper(); 24 | 25 | void open(const filename_t &fname, bool truncate = false); 26 | void reopen(bool truncate); 27 | void flush(); 28 | void sync(); 29 | void close(); 30 | void write(const memory_buf_t &buf); 31 | size_t size() const; 32 | const filename_t &filename() const; 33 | 34 | // 35 | // return file path and its extension: 36 | // 37 | // "mylog.txt" => ("mylog", ".txt") 38 | // "mylog" => ("mylog", "") 39 | // "mylog." => ("mylog.", "") 40 | // "/dir1/dir2/mylog.txt" => ("/dir1/dir2/mylog", ".txt") 41 | // 42 | // the starting dot in filenames is ignored (hidden files): 43 | // 44 | // ".mylog" => (".mylog". "") 45 | // "my_folder/.mylog" => ("my_folder/.mylog", "") 46 | // "my_folder/.mylog.txt" => ("my_folder/.mylog", ".txt") 47 | static std::tuple split_by_extension(const filename_t &fname); 48 | 49 | private: 50 | const int open_tries_ = 5; 51 | const unsigned int open_interval_ = 10; 52 | std::FILE *fd_{nullptr}; 53 | filename_t filename_; 54 | file_event_handlers event_handlers_; 55 | }; 56 | } // namespace details 57 | } // namespace spdlog 58 | 59 | #ifdef SPDLOG_HEADER_ONLY 60 | #include "file_helper-inl.h" 61 | #endif 62 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_TXT_DB_H 11 | # define OPENSSL_TXT_DB_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_TXT_DB_H 17 | # endif 18 | 19 | # include 20 | # include 21 | # include 22 | # include 23 | 24 | # define DB_ERROR_OK 0 25 | # define DB_ERROR_MALLOC 1 26 | # define DB_ERROR_INDEX_CLASH 2 27 | # define DB_ERROR_INDEX_OUT_OF_RANGE 3 28 | # define DB_ERROR_NO_INDEX 4 29 | # define DB_ERROR_INSERT_INDEX_CLASH 5 30 | # define DB_ERROR_WRONG_NUM_FIELDS 6 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | typedef OPENSSL_STRING *OPENSSL_PSTRING; 37 | DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) 38 | 39 | typedef struct txt_db_st { 40 | int num_fields; 41 | STACK_OF(OPENSSL_PSTRING) *data; 42 | LHASH_OF(OPENSSL_STRING) **index; 43 | int (**qual) (OPENSSL_STRING *); 44 | long error; 45 | long arg1; 46 | long arg2; 47 | OPENSSL_STRING *arg_row; 48 | } TXT_DB; 49 | 50 | TXT_DB *TXT_DB_read(BIO *in, int num); 51 | long TXT_DB_write(BIO *out, TXT_DB *db); 52 | int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), 53 | OPENSSL_LH_HASHFUNC hash, OPENSSL_LH_COMPFUNC cmp); 54 | void TXT_DB_free(TXT_DB *db); 55 | OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, 56 | OPENSSL_STRING *value); 57 | int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /include/spdlog/sinks/base_sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | template 17 | SPDLOG_INLINE spdlog::sinks::base_sink::base_sink() 18 | : formatter_{details::make_unique()} {} 19 | 20 | template 21 | SPDLOG_INLINE spdlog::sinks::base_sink::base_sink( 22 | std::unique_ptr formatter) 23 | : formatter_{std::move(formatter)} {} 24 | 25 | template 26 | void SPDLOG_INLINE spdlog::sinks::base_sink::log(const details::log_msg &msg) { 27 | std::lock_guard lock(mutex_); 28 | sink_it_(msg); 29 | } 30 | 31 | template 32 | void SPDLOG_INLINE spdlog::sinks::base_sink::flush() { 33 | std::lock_guard lock(mutex_); 34 | flush_(); 35 | } 36 | 37 | template 38 | void SPDLOG_INLINE spdlog::sinks::base_sink::set_pattern(const std::string &pattern) { 39 | std::lock_guard lock(mutex_); 40 | set_pattern_(pattern); 41 | } 42 | 43 | template 44 | void SPDLOG_INLINE 45 | spdlog::sinks::base_sink::set_formatter(std::unique_ptr sink_formatter) { 46 | std::lock_guard lock(mutex_); 47 | set_formatter_(std::move(sink_formatter)); 48 | } 49 | 50 | template 51 | void SPDLOG_INLINE spdlog::sinks::base_sink::set_pattern_(const std::string &pattern) { 52 | set_formatter_(details::make_unique(pattern)); 53 | } 54 | 55 | template 56 | void SPDLOG_INLINE 57 | spdlog::sinks::base_sink::set_formatter_(std::unique_ptr sink_formatter) { 58 | formatter_ = std::move(sink_formatter); 59 | } 60 | -------------------------------------------------------------------------------- /include/spdlog/details/periodic_worker.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | // periodic worker thread - periodically executes the given callback function. 7 | // 8 | // RAII over the owned thread: 9 | // creates the thread on construction. 10 | // stops and joins the thread on destruction (if the thread is executing a callback, wait for it 11 | // to finish first). 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | namespace spdlog { 19 | namespace details { 20 | 21 | class SPDLOG_API periodic_worker { 22 | public: 23 | template 24 | periodic_worker(const std::function &callback_fun, 25 | std::chrono::duration interval) { 26 | active_ = (interval > std::chrono::duration::zero()); 27 | if (!active_) { 28 | return; 29 | } 30 | 31 | worker_thread_ = std::thread([this, callback_fun, interval]() { 32 | for (;;) { 33 | std::unique_lock lock(this->mutex_); 34 | if (this->cv_.wait_for(lock, interval, [this] { return !this->active_; })) { 35 | return; // active_ == false, so exit this thread 36 | } 37 | callback_fun(); 38 | } 39 | }); 40 | } 41 | std::thread &get_thread() { return worker_thread_; } 42 | periodic_worker(const periodic_worker &) = delete; 43 | periodic_worker &operator=(const periodic_worker &) = delete; 44 | // stop the worker thread and join it 45 | ~periodic_worker(); 46 | 47 | private: 48 | bool active_; 49 | std::thread worker_thread_; 50 | std::mutex mutex_; 51 | std::condition_variable cv_; 52 | }; 53 | } // namespace details 54 | } // namespace spdlog 55 | 56 | #ifdef SPDLOG_HEADER_ONLY 57 | #include "periodic_worker-inl.h" 58 | #endif 59 | -------------------------------------------------------------------------------- /openssl-proj/include/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 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_WHRLPOOL_H 11 | # define OPENSSL_WHRLPOOL_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_WHRLPOOL_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_WHIRLPOOL 22 | # include 23 | # include 24 | # ifdef __cplusplus 25 | extern "C" { 26 | # endif 27 | 28 | # define WHIRLPOOL_DIGEST_LENGTH (512/8) 29 | 30 | # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 | 32 | # define WHIRLPOOL_BBLOCK 512 33 | # define WHIRLPOOL_COUNTER (256/8) 34 | 35 | typedef struct { 36 | union { 37 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; 38 | /* double q is here to ensure 64-bit alignment */ 39 | double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)]; 40 | } H; 41 | unsigned char data[WHIRLPOOL_BBLOCK / 8]; 42 | unsigned int bitoff; 43 | size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; 44 | } WHIRLPOOL_CTX; 45 | # endif 46 | # ifndef OPENSSL_NO_DEPRECATED_3_0 47 | OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); 48 | OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, 49 | const void *inp, size_t bytes); 50 | OSSL_DEPRECATEDIN_3_0 void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, 51 | const void *inp, size_t bits); 52 | OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); 53 | OSSL_DEPRECATEDIN_3_0 unsigned char *WHIRLPOOL(const void *inp, size_t bytes, 54 | unsigned char *md); 55 | # endif 56 | 57 | # ifdef __cplusplus 58 | } 59 | # endif 60 | # endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /include/spdlog/stopwatch.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | // Stopwatch support for spdlog (using std::chrono::steady_clock). 10 | // Displays elapsed seconds since construction as double. 11 | // 12 | // Usage: 13 | // 14 | // spdlog::stopwatch sw; 15 | // ... 16 | // spdlog::debug("Elapsed: {} seconds", sw); => "Elapsed 0.005116733 seconds" 17 | // spdlog::info("Elapsed: {:.6} seconds", sw); => "Elapsed 0.005163 seconds" 18 | // 19 | // 20 | // If other units are needed (e.g. millis instead of double), include "fmt/chrono.h" and use 21 | // "duration_cast<..>(sw.elapsed())": 22 | // 23 | // #include 24 | //.. 25 | // using std::chrono::duration_cast; 26 | // using std::chrono::milliseconds; 27 | // spdlog::info("Elapsed {}", duration_cast(sw.elapsed())); => "Elapsed 5ms" 28 | 29 | namespace spdlog { 30 | class stopwatch { 31 | using clock = std::chrono::steady_clock; 32 | std::chrono::time_point start_tp_; 33 | 34 | public: 35 | stopwatch() 36 | : start_tp_{clock::now()} {} 37 | 38 | std::chrono::duration elapsed() const { 39 | return std::chrono::duration(clock::now() - start_tp_); 40 | } 41 | 42 | std::chrono::milliseconds elapsed_ms() const { 43 | return std::chrono::duration_cast(clock::now() - start_tp_); 44 | } 45 | 46 | void reset() { start_tp_ = clock::now(); } 47 | }; 48 | } // namespace spdlog 49 | 50 | // Support for fmt formatting (e.g. "{:012.9}" or just "{}") 51 | namespace 52 | #ifdef SPDLOG_USE_STD_FORMAT 53 | std 54 | #else 55 | fmt 56 | #endif 57 | { 58 | 59 | template <> 60 | struct formatter : formatter { 61 | template 62 | auto format(const spdlog::stopwatch &sw, FormatContext &ctx) const -> decltype(ctx.out()) { 63 | return formatter::format(sw.elapsed().count(), ctx); 64 | } 65 | }; 66 | } // namespace std 67 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/bnerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_BNERR_H 12 | # define OPENSSL_BNERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * BN reason codes. 23 | */ 24 | # define BN_R_ARG2_LT_ARG3 100 25 | # define BN_R_BAD_RECIPROCAL 101 26 | # define BN_R_BIGNUM_TOO_LONG 114 27 | # define BN_R_BITS_TOO_SMALL 118 28 | # define BN_R_CALLED_WITH_EVEN_MODULUS 102 29 | # define BN_R_DIV_BY_ZERO 103 30 | # define BN_R_ENCODING_ERROR 104 31 | # define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105 32 | # define BN_R_INPUT_NOT_REDUCED 110 33 | # define BN_R_INVALID_LENGTH 106 34 | # define BN_R_INVALID_RANGE 115 35 | # define BN_R_INVALID_SHIFT 119 36 | # define BN_R_NOT_A_SQUARE 111 37 | # define BN_R_NOT_INITIALIZED 107 38 | # define BN_R_NO_INVERSE 108 39 | # define BN_R_NO_PRIME_CANDIDATE 121 40 | # define BN_R_NO_SOLUTION 116 41 | # define BN_R_NO_SUITABLE_DIGEST 120 42 | # define BN_R_PRIVATE_KEY_TOO_LARGE 117 43 | # define BN_R_P_IS_NOT_PRIME 112 44 | # define BN_R_TOO_MANY_ITERATIONS 113 45 | # define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /include/spdlog/sinks/udp_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #ifdef _WIN32 10 | #include 11 | #else 12 | #include 13 | #endif 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | // Simple udp client sink 21 | // Sends formatted log via udp 22 | 23 | namespace spdlog { 24 | namespace sinks { 25 | 26 | struct udp_sink_config { 27 | std::string server_host; 28 | uint16_t server_port; 29 | 30 | udp_sink_config(std::string host, uint16_t port) 31 | : server_host{std::move(host)}, 32 | server_port{port} {} 33 | }; 34 | 35 | template 36 | class udp_sink : public spdlog::sinks::base_sink { 37 | public: 38 | // host can be hostname or ip address 39 | explicit udp_sink(udp_sink_config sink_config) 40 | : client_{sink_config.server_host, sink_config.server_port} {} 41 | 42 | ~udp_sink() override = default; 43 | 44 | protected: 45 | void sink_it_(const spdlog::details::log_msg &msg) override { 46 | spdlog::memory_buf_t formatted; 47 | spdlog::sinks::base_sink::formatter_->format(msg, formatted); 48 | client_.send(formatted.data(), formatted.size()); 49 | } 50 | 51 | void flush_() override {} 52 | details::udp_client client_; 53 | }; 54 | 55 | using udp_sink_mt = udp_sink; 56 | using udp_sink_st = udp_sink; 57 | 58 | } // namespace sinks 59 | 60 | // 61 | // factory functions 62 | // 63 | template 64 | inline std::shared_ptr udp_logger_mt(const std::string &logger_name, 65 | sinks::udp_sink_config skin_config) { 66 | return Factory::template create(logger_name, skin_config); 67 | } 68 | 69 | } // namespace spdlog 70 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/crmferr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_CRMFERR_H 12 | # define OPENSSL_CRMFERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_CRMF 21 | 22 | 23 | /* 24 | * CRMF reason codes. 25 | */ 26 | # define CRMF_R_BAD_PBM_ITERATIONCOUNT 100 27 | # define CRMF_R_CRMFERROR 102 28 | # define CRMF_R_ERROR 103 29 | # define CRMF_R_ERROR_DECODING_CERTIFICATE 104 30 | # define CRMF_R_ERROR_DECRYPTING_CERTIFICATE 105 31 | # define CRMF_R_ERROR_DECRYPTING_SYMMETRIC_KEY 106 32 | # define CRMF_R_FAILURE_OBTAINING_RANDOM 107 33 | # define CRMF_R_ITERATIONCOUNT_BELOW_100 108 34 | # define CRMF_R_MALFORMED_IV 101 35 | # define CRMF_R_NULL_ARGUMENT 109 36 | # define CRMF_R_POPOSKINPUT_NOT_SUPPORTED 113 37 | # define CRMF_R_POPO_INCONSISTENT_PUBLIC_KEY 117 38 | # define CRMF_R_POPO_MISSING 121 39 | # define CRMF_R_POPO_MISSING_PUBLIC_KEY 118 40 | # define CRMF_R_POPO_MISSING_SUBJECT 119 41 | # define CRMF_R_POPO_RAVERIFIED_NOT_ACCEPTED 120 42 | # define CRMF_R_SETTING_MAC_ALGOR_FAILURE 110 43 | # define CRMF_R_SETTING_OWF_ALGOR_FAILURE 111 44 | # define CRMF_R_UNSUPPORTED_ALGORITHM 112 45 | # define CRMF_R_UNSUPPORTED_CIPHER 114 46 | # define CRMF_R_UNSUPPORTED_METHOD_FOR_CREATING_POPO 115 47 | # define CRMF_R_UNSUPPORTED_POPO_METHOD 116 48 | 49 | # endif 50 | #endif 51 | -------------------------------------------------------------------------------- /include/spdlog/details/backtracer-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | namespace spdlog { 10 | namespace details { 11 | SPDLOG_INLINE backtracer::backtracer(const backtracer &other) { 12 | std::lock_guard lock(other.mutex_); 13 | enabled_ = other.enabled(); 14 | messages_ = other.messages_; 15 | } 16 | 17 | SPDLOG_INLINE backtracer::backtracer(backtracer &&other) SPDLOG_NOEXCEPT { 18 | std::lock_guard lock(other.mutex_); 19 | enabled_ = other.enabled(); 20 | messages_ = std::move(other.messages_); 21 | } 22 | 23 | SPDLOG_INLINE backtracer &backtracer::operator=(backtracer other) { 24 | std::lock_guard lock(mutex_); 25 | enabled_ = other.enabled(); 26 | messages_ = std::move(other.messages_); 27 | return *this; 28 | } 29 | 30 | SPDLOG_INLINE void backtracer::enable(size_t size) { 31 | std::lock_guard lock{mutex_}; 32 | enabled_.store(true, std::memory_order_relaxed); 33 | messages_ = circular_q{size}; 34 | } 35 | 36 | SPDLOG_INLINE void backtracer::disable() { 37 | std::lock_guard lock{mutex_}; 38 | enabled_.store(false, std::memory_order_relaxed); 39 | } 40 | 41 | SPDLOG_INLINE bool backtracer::enabled() const { return enabled_.load(std::memory_order_relaxed); } 42 | 43 | SPDLOG_INLINE void backtracer::push_back(const log_msg &msg) { 44 | std::lock_guard lock{mutex_}; 45 | messages_.push_back(log_msg_buffer{msg}); 46 | } 47 | 48 | SPDLOG_INLINE bool backtracer::empty() const { 49 | std::lock_guard lock{mutex_}; 50 | return messages_.empty(); 51 | } 52 | 53 | // pop all items in the q and apply the given fun on each of them. 54 | SPDLOG_INLINE void backtracer::foreach_pop(std::function fun) { 55 | std::lock_guard lock{mutex_}; 56 | while (!messages_.empty()) { 57 | auto &front_msg = messages_.front(); 58 | fun(front_msg); 59 | messages_.pop_front(); 60 | } 61 | } 62 | } // namespace details 63 | } // namespace spdlog 64 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/storeerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_STOREERR_H 12 | # define OPENSSL_STOREERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OSSL_STORE reason codes. 23 | */ 24 | # define OSSL_STORE_R_AMBIGUOUS_CONTENT_TYPE 107 25 | # define OSSL_STORE_R_BAD_PASSWORD_READ 115 26 | # define OSSL_STORE_R_ERROR_VERIFYING_PKCS12_MAC 113 27 | # define OSSL_STORE_R_FINGERPRINT_SIZE_DOES_NOT_MATCH_DIGEST 121 28 | # define OSSL_STORE_R_INVALID_SCHEME 106 29 | # define OSSL_STORE_R_IS_NOT_A 112 30 | # define OSSL_STORE_R_LOADER_INCOMPLETE 116 31 | # define OSSL_STORE_R_LOADING_STARTED 117 32 | # define OSSL_STORE_R_NOT_A_CERTIFICATE 100 33 | # define OSSL_STORE_R_NOT_A_CRL 101 34 | # define OSSL_STORE_R_NOT_A_NAME 103 35 | # define OSSL_STORE_R_NOT_A_PRIVATE_KEY 102 36 | # define OSSL_STORE_R_NOT_A_PUBLIC_KEY 122 37 | # define OSSL_STORE_R_NOT_PARAMETERS 104 38 | # define OSSL_STORE_R_NO_LOADERS_FOUND 123 39 | # define OSSL_STORE_R_PASSPHRASE_CALLBACK_ERROR 114 40 | # define OSSL_STORE_R_PATH_MUST_BE_ABSOLUTE 108 41 | # define OSSL_STORE_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES 119 42 | # define OSSL_STORE_R_UI_PROCESS_INTERRUPTED_OR_CANCELLED 109 43 | # define OSSL_STORE_R_UNREGISTERED_SCHEME 105 44 | # define OSSL_STORE_R_UNSUPPORTED_CONTENT_TYPE 110 45 | # define OSSL_STORE_R_UNSUPPORTED_OPERATION 118 46 | # define OSSL_STORE_R_UNSUPPORTED_SEARCH_TYPE 120 47 | # define OSSL_STORE_R_URI_AUTHORITY_UNSUPPORTED 111 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /include/spdlog/common-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | namespace level { 15 | 16 | #if __cplusplus >= 201703L 17 | constexpr 18 | #endif 19 | static string_view_t level_string_views[] SPDLOG_LEVEL_NAMES; 20 | 21 | static const char *short_level_names[] SPDLOG_SHORT_LEVEL_NAMES; 22 | 23 | SPDLOG_INLINE const string_view_t &to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT { 24 | return level_string_views[l]; 25 | } 26 | 27 | SPDLOG_INLINE const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT { 28 | return short_level_names[l]; 29 | } 30 | 31 | SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT { 32 | auto it = std::find(std::begin(level_string_views), std::end(level_string_views), name); 33 | if (it != std::end(level_string_views)) 34 | return static_cast(std::distance(std::begin(level_string_views), it)); 35 | 36 | // check also for "warn" and "err" before giving up.. 37 | if (name == "warn") { 38 | return level::warn; 39 | } 40 | if (name == "err") { 41 | return level::err; 42 | } 43 | return level::off; 44 | } 45 | } // namespace level 46 | 47 | SPDLOG_INLINE spdlog_ex::spdlog_ex(std::string msg) 48 | : msg_(std::move(msg)) {} 49 | 50 | SPDLOG_INLINE spdlog_ex::spdlog_ex(const std::string &msg, int last_errno) { 51 | #ifdef SPDLOG_USE_STD_FORMAT 52 | msg_ = std::system_error(std::error_code(last_errno, std::generic_category()), msg).what(); 53 | #else 54 | memory_buf_t outbuf; 55 | fmt::format_system_error(outbuf, last_errno, msg.c_str()); 56 | msg_ = fmt::to_string(outbuf); 57 | #endif 58 | } 59 | 60 | SPDLOG_INLINE const char *spdlog_ex::what() const SPDLOG_NOEXCEPT { return msg_.c_str(); } 61 | 62 | SPDLOG_INLINE void throw_spdlog_ex(const std::string &msg, int last_errno) { 63 | SPDLOG_THROW(spdlog_ex(msg, last_errno)); 64 | } 65 | 66 | SPDLOG_INLINE void throw_spdlog_ex(std::string msg) { SPDLOG_THROW(spdlog_ex(std::move(msg))); } 67 | 68 | } // namespace spdlog 69 | -------------------------------------------------------------------------------- /include/spdlog/sinks/msvc_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2016 Alexander Dalshov & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #if defined(_WIN32) 7 | 8 | #include 9 | #if defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) 10 | #include 11 | #endif 12 | #include 13 | 14 | #include 15 | #include 16 | 17 | // Avoid including windows.h (https://stackoverflow.com/a/30741042) 18 | #if defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) 19 | extern "C" __declspec(dllimport) void __stdcall OutputDebugStringW(const wchar_t *lpOutputString); 20 | #else 21 | extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char *lpOutputString); 22 | #endif 23 | extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); 24 | 25 | namespace spdlog { 26 | namespace sinks { 27 | /* 28 | * MSVC sink (logging using OutputDebugStringA) 29 | */ 30 | template 31 | class msvc_sink : public base_sink { 32 | public: 33 | msvc_sink() = default; 34 | msvc_sink(bool check_debugger_present) 35 | : check_debugger_present_{check_debugger_present} {}; 36 | 37 | protected: 38 | void sink_it_(const details::log_msg &msg) override { 39 | if (check_debugger_present_ && !IsDebuggerPresent()) { 40 | return; 41 | } 42 | memory_buf_t formatted; 43 | base_sink::formatter_->format(msg, formatted); 44 | formatted.push_back('\0'); // add a null terminator for OutputDebugString 45 | #if defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) 46 | wmemory_buf_t wformatted; 47 | details::os::utf8_to_wstrbuf(string_view_t(formatted.data(), formatted.size()), wformatted); 48 | OutputDebugStringW(wformatted.data()); 49 | #else 50 | OutputDebugStringA(formatted.data()); 51 | #endif 52 | } 53 | 54 | void flush_() override {} 55 | 56 | bool check_debugger_present_ = true; 57 | }; 58 | 59 | using msvc_sink_mt = msvc_sink; 60 | using msvc_sink_st = msvc_sink; 61 | 62 | using windebug_sink_mt = msvc_sink_mt; 63 | using windebug_sink_st = msvc_sink_st; 64 | 65 | } // namespace sinks 66 | } // namespace spdlog 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /include/spdlog/sinks/ringbuffer_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "spdlog/details/circular_q.h" 7 | #include "spdlog/details/log_msg_buffer.h" 8 | #include "spdlog/details/null_mutex.h" 9 | #include "spdlog/sinks/base_sink.h" 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace spdlog { 16 | namespace sinks { 17 | /* 18 | * Ring buffer sink 19 | */ 20 | template 21 | class ringbuffer_sink final : public base_sink { 22 | public: 23 | explicit ringbuffer_sink(size_t n_items) 24 | : q_{n_items} {} 25 | 26 | std::vector last_raw(size_t lim = 0) { 27 | std::lock_guard lock(base_sink::mutex_); 28 | auto items_available = q_.size(); 29 | auto n_items = lim > 0 ? (std::min)(lim, items_available) : items_available; 30 | std::vector ret; 31 | ret.reserve(n_items); 32 | for (size_t i = (items_available - n_items); i < items_available; i++) { 33 | ret.push_back(q_.at(i)); 34 | } 35 | return ret; 36 | } 37 | 38 | std::vector last_formatted(size_t lim = 0) { 39 | std::lock_guard lock(base_sink::mutex_); 40 | auto items_available = q_.size(); 41 | auto n_items = lim > 0 ? (std::min)(lim, items_available) : items_available; 42 | std::vector ret; 43 | ret.reserve(n_items); 44 | for (size_t i = (items_available - n_items); i < items_available; i++) { 45 | memory_buf_t formatted; 46 | base_sink::formatter_->format(q_.at(i), formatted); 47 | ret.push_back(SPDLOG_BUF_TO_STRING(formatted)); 48 | } 49 | return ret; 50 | } 51 | 52 | protected: 53 | void sink_it_(const details::log_msg &msg) override { 54 | q_.push_back(details::log_msg_buffer{msg}); 55 | } 56 | void flush_() override {} 57 | 58 | private: 59 | details::circular_q q_; 60 | }; 61 | 62 | using ringbuffer_sink_mt = ringbuffer_sink; 63 | using ringbuffer_sink_st = ringbuffer_sink; 64 | 65 | } // namespace sinks 66 | 67 | } // namespace spdlog 68 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/cast.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CAST_H 11 | # define OPENSSL_CAST_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_CAST_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_CAST 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define CAST_BLOCK 8 27 | # define CAST_KEY_LENGTH 16 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | 31 | # define CAST_ENCRYPT 1 32 | # define CAST_DECRYPT 0 33 | 34 | # define CAST_LONG unsigned int 35 | 36 | typedef struct cast_key_st { 37 | CAST_LONG data[32]; 38 | int short_key; /* Use reduced rounds for short key */ 39 | } CAST_KEY; 40 | 41 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 42 | # ifndef OPENSSL_NO_DEPRECATED_3_0 43 | OSSL_DEPRECATEDIN_3_0 44 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 45 | OSSL_DEPRECATEDIN_3_0 46 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, 47 | const CAST_KEY *key, int enc); 48 | OSSL_DEPRECATEDIN_3_0 49 | void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); 50 | OSSL_DEPRECATEDIN_3_0 51 | void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); 52 | OSSL_DEPRECATEDIN_3_0 53 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, 54 | long length, const CAST_KEY *ks, unsigned char *iv, 55 | int enc); 56 | OSSL_DEPRECATEDIN_3_0 57 | void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 58 | long length, const CAST_KEY *schedule, 59 | unsigned char *ivec, int *num, int enc); 60 | OSSL_DEPRECATEDIN_3_0 61 | void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 62 | long length, const CAST_KEY *schedule, 63 | unsigned char *ivec, int *num); 64 | # endif 65 | 66 | # ifdef __cplusplus 67 | } 68 | # endif 69 | # endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_HMAC_H 11 | # define OPENSSL_HMAC_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_HMAC_H 17 | # endif 18 | 19 | # include 20 | 21 | # include 22 | 23 | # ifndef OPENSSL_NO_DEPRECATED_3_0 24 | # define HMAC_MAX_MD_CBLOCK 200 /* Deprecated */ 25 | # endif 26 | 27 | # ifdef __cplusplus 28 | extern "C" { 29 | # endif 30 | 31 | # ifndef OPENSSL_NO_DEPRECATED_3_0 32 | OSSL_DEPRECATEDIN_3_0 size_t HMAC_size(const HMAC_CTX *e); 33 | OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void); 34 | OSSL_DEPRECATEDIN_3_0 int HMAC_CTX_reset(HMAC_CTX *ctx); 35 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx); 36 | # endif 37 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 38 | OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx, 39 | const void *key, int len, 40 | const EVP_MD *md); 41 | # endif 42 | # ifndef OPENSSL_NO_DEPRECATED_3_0 43 | OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 44 | const EVP_MD *md, ENGINE *impl); 45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, 46 | size_t len); 47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, 48 | unsigned int *len); 49 | OSSL_DEPRECATEDIN_3_0 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 50 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 51 | OSSL_DEPRECATEDIN_3_0 const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx); 52 | # endif 53 | 54 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 55 | const unsigned char *data, size_t data_len, 56 | unsigned char *md, unsigned int *md_len); 57 | 58 | # ifdef __cplusplus 59 | } 60 | # endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/ocsperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_OCSPERR_H 12 | # define OPENSSL_OCSPERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_OCSP 21 | 22 | 23 | /* 24 | * OCSP reason codes. 25 | */ 26 | # define OCSP_R_CERTIFICATE_VERIFY_ERROR 101 27 | # define OCSP_R_DIGEST_ERR 102 28 | # define OCSP_R_DIGEST_NAME_ERR 106 29 | # define OCSP_R_DIGEST_SIZE_ERR 107 30 | # define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD 122 31 | # define OCSP_R_ERROR_IN_THISUPDATE_FIELD 123 32 | # define OCSP_R_MISSING_OCSPSIGNING_USAGE 103 33 | # define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE 124 34 | # define OCSP_R_NOT_BASIC_RESPONSE 104 35 | # define OCSP_R_NO_CERTIFICATES_IN_CHAIN 105 36 | # define OCSP_R_NO_RESPONSE_DATA 108 37 | # define OCSP_R_NO_REVOKED_TIME 109 38 | # define OCSP_R_NO_SIGNER_KEY 130 39 | # define OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 110 40 | # define OCSP_R_REQUEST_NOT_SIGNED 128 41 | # define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA 111 42 | # define OCSP_R_ROOT_CA_NOT_TRUSTED 112 43 | # define OCSP_R_SIGNATURE_FAILURE 117 44 | # define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND 118 45 | # define OCSP_R_STATUS_EXPIRED 125 46 | # define OCSP_R_STATUS_NOT_YET_VALID 126 47 | # define OCSP_R_STATUS_TOO_OLD 127 48 | # define OCSP_R_UNKNOWN_MESSAGE_DIGEST 119 49 | # define OCSP_R_UNKNOWN_NID 120 50 | # define OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE 129 51 | 52 | # endif 53 | #endif 54 | -------------------------------------------------------------------------------- /include/spdlog/sinks/tcp_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #ifdef _WIN32 10 | #include 11 | #else 12 | #include 13 | #endif 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #pragma once 21 | 22 | // Simple tcp client sink 23 | // Connects to remote address and send the formatted log. 24 | // Will attempt to reconnect if connection drops. 25 | // If more complicated behaviour is needed (i.e get responses), you can inherit it and override the 26 | // sink_it_ method. 27 | 28 | namespace spdlog { 29 | namespace sinks { 30 | 31 | struct tcp_sink_config { 32 | std::string server_host; 33 | int server_port; 34 | bool lazy_connect = false; // if true connect on first log call instead of on construction 35 | 36 | tcp_sink_config(std::string host, int port) 37 | : server_host{std::move(host)}, 38 | server_port{port} {} 39 | }; 40 | 41 | template 42 | class tcp_sink : public spdlog::sinks::base_sink { 43 | public: 44 | // connect to tcp host/port or throw if failed 45 | // host can be hostname or ip address 46 | 47 | explicit tcp_sink(tcp_sink_config sink_config) 48 | : config_{std::move(sink_config)} { 49 | if (!config_.lazy_connect) { 50 | this->client_.connect(config_.server_host, config_.server_port); 51 | } 52 | } 53 | 54 | ~tcp_sink() override = default; 55 | 56 | protected: 57 | void sink_it_(const spdlog::details::log_msg &msg) override { 58 | spdlog::memory_buf_t formatted; 59 | spdlog::sinks::base_sink::formatter_->format(msg, formatted); 60 | if (!client_.is_connected()) { 61 | client_.connect(config_.server_host, config_.server_port); 62 | } 63 | client_.send(formatted.data(), formatted.size()); 64 | } 65 | 66 | void flush_() override {} 67 | tcp_sink_config config_; 68 | details::tcp_client client_; 69 | }; 70 | 71 | using tcp_sink_mt = tcp_sink; 72 | using tcp_sink_st = tcp_sink; 73 | 74 | } // namespace sinks 75 | } // namespace spdlog 76 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/srtp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * DTLS code by Eric Rescorla 12 | * 13 | * Copyright (C) 2006, Network Resonance, Inc. Copyright (C) 2011, RTFM, Inc. 14 | */ 15 | 16 | #ifndef OPENSSL_SRTP_H 17 | # define OPENSSL_SRTP_H 18 | # pragma once 19 | 20 | # include 21 | # ifndef OPENSSL_NO_DEPRECATED_3_0 22 | # define HEADER_D1_SRTP_H 23 | # endif 24 | 25 | # include 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | # define SRTP_AES128_CM_SHA1_80 0x0001 32 | # define SRTP_AES128_CM_SHA1_32 0x0002 33 | # define SRTP_AES128_F8_SHA1_80 0x0003 34 | # define SRTP_AES128_F8_SHA1_32 0x0004 35 | # define SRTP_NULL_SHA1_80 0x0005 36 | # define SRTP_NULL_SHA1_32 0x0006 37 | 38 | /* AEAD SRTP protection profiles from RFC 7714 */ 39 | # define SRTP_AEAD_AES_128_GCM 0x0007 40 | # define SRTP_AEAD_AES_256_GCM 0x0008 41 | 42 | /* 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 | -------------------------------------------------------------------------------- /openssl-proj/include/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 | -------------------------------------------------------------------------------- /openssl-proj/include/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 | -------------------------------------------------------------------------------- /.github/workflows/check.yml: -------------------------------------------------------------------------------- 1 | # XXXXXXXX 2 | 3 | name: Check Pull Request 4 | on: 5 | pull_request: 6 | branches: [ '*' ] # 可以指定分支,或者用 * 表示所有分支 7 | push: 8 | branches: [ '*' ] # 可以指定分支,或者用 * 表示所有分支 9 | paths: 10 | - 'json/localization.json' # 仅当推送此文件时触发 11 | 12 | jobs: 13 | Configuration_Environment: 14 | runs-on: windows-latest 15 | permissions: 16 | contents: read 17 | pull-requests: write 18 | 19 | steps: 20 | - uses: actions/checkout@v4 21 | 22 | - name: utf8 23 | # 使用utf8编码环境编译 24 | run: chcp 65001 25 | 26 | - name: Download Data_json 27 | shell: pwsh 28 | run: Invoke-WebRequest -Uri "https://api.github.com/repos/desktop/desktop/releases/latest" -OutFile "${{github.workspace}}\release.json" 29 | 30 | - name: Download GitHubDesktop2Chinese.exe 31 | shell: pwsh 32 | run: Invoke-WebRequest -Uri "https://github.com/cngege/GitHubDesktop2Chinese/releases/latest/download/GitHubDesktop2Chinese.exe" -OutFile "${{github.workspace}}\GitHubDesktop2Chinese.exe" 33 | 34 | - name: Parse json_file,Read download url 35 | shell: pwsh 36 | id: forjson 37 | run: | 38 | $jsonContent = Get-Content -Path '${{github.workspace}}\release.json' -Raw 39 | $jsonObj = ConvertFrom-Json -InputObject $jsonContent 40 | if ( $($jsonObj.assets[4].browser_download_url) -like "*-x64-full.nupkg" ) { 41 | Add-Content -Path $env:GITHUB_ENV -Value "browser_download_url=$($jsonObj.assets[4].browser_download_url)" 42 | } else { 43 | echo "下标为4的资源不是以 -x64-full.nupkg结尾,请手动打开链接确认..." 44 | echo "https://api.github.com/repos/desktop/desktop/releases/latest" 45 | exit 1 46 | } 47 | 48 | - name: download github desktop 49 | shell: pwsh 50 | run: | 51 | Invoke-WebRequest -Uri "${{env.browser_download_url}}" -OutFile "${{github.workspace}}\GitHubDesktop_full.zip" 52 | 53 | - name: unzip GitHub Desktop Full 54 | shell: pwsh 55 | run: | 56 | Expand-Archive -Path "${{github.workspace}}\GitHubDesktop_full.zip" -DestinationPath "${{github.workspace}}\GitHubDesktopFull" -Force 57 | 58 | - name: run and check GitHubDesktop2Chinese.exe 59 | shell: pwsh 60 | run: | 61 | ${{github.workspace}}\GitHubDesktop2Chinese.exe --nopause -j "json/localization.json" -g "${{github.workspace}}\GitHubDesktopFull\lib\net45\resources\app" dev --invalidcheck 62 | 63 | #- name: Test Tree 64 | # shell: pwsh 65 | # run: tree . /A /F 66 | -------------------------------------------------------------------------------- /include/spdlog/sinks/basic_file_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | namespace spdlog { 15 | namespace sinks { 16 | /* 17 | * Trivial file sink with single file as target 18 | */ 19 | template 20 | class basic_file_sink final : public base_sink { 21 | public: 22 | explicit basic_file_sink(const filename_t &filename, 23 | bool truncate = false, 24 | const file_event_handlers &event_handlers = {}); 25 | const filename_t &filename() const; 26 | 27 | protected: 28 | void sink_it_(const details::log_msg &msg) override; 29 | void flush_() override; 30 | 31 | private: 32 | details::file_helper file_helper_; 33 | }; 34 | 35 | using basic_file_sink_mt = basic_file_sink; 36 | using basic_file_sink_st = basic_file_sink; 37 | 38 | } // namespace sinks 39 | 40 | // 41 | // factory functions 42 | // 43 | template 44 | inline std::shared_ptr basic_logger_mt(const std::string &logger_name, 45 | const filename_t &filename, 46 | bool truncate = false, 47 | const file_event_handlers &event_handlers = {}) { 48 | return Factory::template create(logger_name, filename, truncate, 49 | event_handlers); 50 | } 51 | 52 | template 53 | inline std::shared_ptr basic_logger_st(const std::string &logger_name, 54 | const filename_t &filename, 55 | bool truncate = false, 56 | const file_event_handlers &event_handlers = {}) { 57 | return Factory::template create(logger_name, filename, truncate, 58 | event_handlers); 59 | } 60 | 61 | } // namespace spdlog 62 | 63 | #ifdef SPDLOG_HEADER_ONLY 64 | #include "basic_file_sink-inl.h" 65 | #endif 66 | -------------------------------------------------------------------------------- /include/spdlog/details/udp_client.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | // Helper RAII over unix udp client socket. 7 | // Will throw on construction if the socket creation failed. 8 | 9 | #ifdef _WIN32 10 | #error "include udp_client-windows.h instead" 11 | #endif 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include 24 | 25 | namespace spdlog { 26 | namespace details { 27 | 28 | class udp_client { 29 | static constexpr int TX_BUFFER_SIZE = 1024 * 10; 30 | int socket_ = -1; 31 | struct sockaddr_in sockAddr_; 32 | 33 | void cleanup_() { 34 | if (socket_ != -1) { 35 | ::close(socket_); 36 | socket_ = -1; 37 | } 38 | } 39 | 40 | public: 41 | udp_client(const std::string &host, uint16_t port) { 42 | socket_ = ::socket(PF_INET, SOCK_DGRAM, 0); 43 | if (socket_ < 0) { 44 | throw_spdlog_ex("error: Create Socket Failed!"); 45 | } 46 | 47 | int option_value = TX_BUFFER_SIZE; 48 | if (::setsockopt(socket_, SOL_SOCKET, SO_SNDBUF, 49 | reinterpret_cast(&option_value), sizeof(option_value)) < 0) { 50 | cleanup_(); 51 | throw_spdlog_ex("error: setsockopt(SO_SNDBUF) Failed!"); 52 | } 53 | 54 | sockAddr_.sin_family = AF_INET; 55 | sockAddr_.sin_port = htons(port); 56 | 57 | if (::inet_aton(host.c_str(), &sockAddr_.sin_addr) == 0) { 58 | cleanup_(); 59 | throw_spdlog_ex("error: Invalid address!"); 60 | } 61 | 62 | ::memset(sockAddr_.sin_zero, 0x00, sizeof(sockAddr_.sin_zero)); 63 | } 64 | 65 | ~udp_client() { cleanup_(); } 66 | 67 | int fd() const { return socket_; } 68 | 69 | // Send exactly n_bytes of the given data. 70 | // On error close the connection and throw. 71 | void send(const char *data, size_t n_bytes) { 72 | ssize_t toslen = 0; 73 | socklen_t tolen = sizeof(struct sockaddr); 74 | if ((toslen = ::sendto(socket_, data, n_bytes, 0, (struct sockaddr *)&sockAddr_, tolen)) == 75 | -1) { 76 | throw_spdlog_ex("sendto(2) failed", errno); 77 | } 78 | } 79 | }; 80 | } // namespace details 81 | } // namespace spdlog 82 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/fips_names.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_FIPS_NAMES_H 11 | # define OPENSSL_FIPS_NAMES_H 12 | # pragma once 13 | 14 | # ifdef __cplusplus 15 | extern "C" { 16 | # endif 17 | 18 | /* 19 | * Parameter names that the FIPS Provider defines 20 | */ 21 | 22 | /* 23 | * The calculated MAC of the module file (Used for FIPS Self Testing) 24 | * Type: OSSL_PARAM_UTF8_STRING 25 | */ 26 | # define OSSL_PROV_FIPS_PARAM_MODULE_MAC "module-mac" 27 | /* 28 | * A version number for the fips install process (Used for FIPS Self Testing) 29 | * Type: OSSL_PARAM_UTF8_STRING 30 | */ 31 | # define OSSL_PROV_FIPS_PARAM_INSTALL_VERSION "install-version" 32 | /* 33 | * The calculated MAC of the install status indicator (Used for FIPS Self Testing) 34 | * Type: OSSL_PARAM_UTF8_STRING 35 | */ 36 | # define OSSL_PROV_FIPS_PARAM_INSTALL_MAC "install-mac" 37 | /* 38 | * The install status indicator (Used for FIPS Self Testing) 39 | * Type: OSSL_PARAM_UTF8_STRING 40 | */ 41 | # define OSSL_PROV_FIPS_PARAM_INSTALL_STATUS "install-status" 42 | 43 | /* 44 | * A boolean that determines if the FIPS conditional test errors result in 45 | * the module entering an error state. 46 | * Type: OSSL_PARAM_UTF8_STRING 47 | */ 48 | # define OSSL_PROV_FIPS_PARAM_CONDITIONAL_ERRORS "conditional-errors" 49 | 50 | /* 51 | * A boolean that determines if the runtime FIPS security checks are performed. 52 | * This is enabled by default. 53 | * Type: OSSL_PARAM_UTF8_STRING 54 | */ 55 | # define OSSL_PROV_FIPS_PARAM_SECURITY_CHECKS "security-checks" 56 | 57 | /* 58 | * A boolean that determines if the runtime FIPS check for TLS1_PRF EMS is performed. 59 | * This is disabled by default. 60 | * Type: OSSL_PARAM_UTF8_STRING 61 | */ 62 | # define OSSL_PROV_FIPS_PARAM_TLS1_PRF_EMS_CHECK "tls1-prf-ems-check" 63 | 64 | /* 65 | * A boolean that determines if truncated digests can be used with Hash and HMAC 66 | * DRBGs. FIPS 140-3 IG D.R disallows such use for efficiency rather than 67 | * security reasons. 68 | * This is disabled by default. 69 | * Type: OSSL_PARAM_UTF8_STRING 70 | */ 71 | # define OSSL_PROV_FIPS_PARAM_DRBG_TRUNC_DIGEST "drbg-no-trunc-md" 72 | 73 | # ifdef __cplusplus 74 | } 75 | # endif 76 | 77 | #endif /* OPENSSL_FIPS_NAMES_H */ 78 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_RC2_H 11 | # define OPENSSL_RC2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RC2_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_RC2 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define RC2_BLOCK 8 27 | # define RC2_KEY_LENGTH 16 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | typedef unsigned int RC2_INT; 31 | 32 | # define RC2_ENCRYPT 1 33 | # define RC2_DECRYPT 0 34 | 35 | typedef struct rc2_key_st { 36 | RC2_INT data[64]; 37 | } RC2_KEY; 38 | # endif 39 | # ifndef OPENSSL_NO_DEPRECATED_3_0 40 | OSSL_DEPRECATEDIN_3_0 void RC2_set_key(RC2_KEY *key, int len, 41 | const unsigned char *data, int bits); 42 | OSSL_DEPRECATEDIN_3_0 void RC2_ecb_encrypt(const unsigned char *in, 43 | unsigned char *out, RC2_KEY *key, 44 | int enc); 45 | OSSL_DEPRECATEDIN_3_0 void RC2_encrypt(unsigned long *data, RC2_KEY *key); 46 | OSSL_DEPRECATEDIN_3_0 void RC2_decrypt(unsigned long *data, RC2_KEY *key); 47 | OSSL_DEPRECATEDIN_3_0 void RC2_cbc_encrypt(const unsigned char *in, 48 | unsigned char *out, long length, 49 | RC2_KEY *ks, unsigned char *iv, 50 | int enc); 51 | OSSL_DEPRECATEDIN_3_0 void RC2_cfb64_encrypt(const unsigned char *in, 52 | unsigned char *out, long length, 53 | RC2_KEY *schedule, 54 | unsigned char *ivec, 55 | int *num, int enc); 56 | OSSL_DEPRECATEDIN_3_0 void RC2_ofb64_encrypt(const unsigned char *in, 57 | unsigned char *out, long length, 58 | RC2_KEY *schedule, 59 | unsigned char *ivec, 60 | int *num); 61 | # endif 62 | 63 | # ifdef __cplusplus 64 | } 65 | # endif 66 | # endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/cryptoerr.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_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_RECORDS 114 51 | # define CRYPTO_R_TOO_SMALL_BUFFER 116 52 | # define CRYPTO_R_UNKNOWN_NAME_IN_RANDOM_SECTION 120 53 | # define CRYPTO_R_ZERO_LENGTH_NUMBER 115 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /include/spdlog/sinks/dist_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "base_sink.h" 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | // Distribution sink (mux). Stores a vector of sinks which get called when log 17 | // is called 18 | 19 | namespace spdlog { 20 | namespace sinks { 21 | 22 | template 23 | class dist_sink : public base_sink { 24 | public: 25 | dist_sink() = default; 26 | explicit dist_sink(std::vector> sinks) 27 | : sinks_(sinks) {} 28 | 29 | dist_sink(const dist_sink &) = delete; 30 | dist_sink &operator=(const dist_sink &) = delete; 31 | 32 | void add_sink(std::shared_ptr sub_sink) { 33 | std::lock_guard lock(base_sink::mutex_); 34 | sinks_.push_back(sub_sink); 35 | } 36 | 37 | void remove_sink(std::shared_ptr sub_sink) { 38 | std::lock_guard lock(base_sink::mutex_); 39 | sinks_.erase(std::remove(sinks_.begin(), sinks_.end(), sub_sink), sinks_.end()); 40 | } 41 | 42 | void set_sinks(std::vector> sinks) { 43 | std::lock_guard lock(base_sink::mutex_); 44 | sinks_ = std::move(sinks); 45 | } 46 | 47 | std::vector> &sinks() { return sinks_; } 48 | 49 | protected: 50 | void sink_it_(const details::log_msg &msg) override { 51 | for (auto &sub_sink : sinks_) { 52 | if (sub_sink->should_log(msg.level)) { 53 | sub_sink->log(msg); 54 | } 55 | } 56 | } 57 | 58 | void flush_() override { 59 | for (auto &sub_sink : sinks_) { 60 | sub_sink->flush(); 61 | } 62 | } 63 | 64 | void set_pattern_(const std::string &pattern) override { 65 | set_formatter_(details::make_unique(pattern)); 66 | } 67 | 68 | void set_formatter_(std::unique_ptr sink_formatter) override { 69 | base_sink::formatter_ = std::move(sink_formatter); 70 | for (auto &sub_sink : sinks_) { 71 | sub_sink->set_formatter(base_sink::formatter_->clone()); 72 | } 73 | } 74 | std::vector> sinks_; 75 | }; 76 | 77 | using dist_sink_mt = dist_sink; 78 | using dist_sink_st = dist_sink; 79 | 80 | } // namespace sinks 81 | } // namespace spdlog 82 | -------------------------------------------------------------------------------- /openssl-proj/include/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 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /include/spdlog/sinks/stdout_sinks.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #ifdef _WIN32 12 | #include 13 | #endif 14 | 15 | namespace spdlog { 16 | 17 | namespace sinks { 18 | 19 | template 20 | class stdout_sink_base : public sink { 21 | public: 22 | using mutex_t = typename ConsoleMutex::mutex_t; 23 | explicit stdout_sink_base(FILE *file); 24 | ~stdout_sink_base() override = default; 25 | 26 | stdout_sink_base(const stdout_sink_base &other) = delete; 27 | stdout_sink_base(stdout_sink_base &&other) = delete; 28 | 29 | stdout_sink_base &operator=(const stdout_sink_base &other) = delete; 30 | stdout_sink_base &operator=(stdout_sink_base &&other) = delete; 31 | 32 | void log(const details::log_msg &msg) override; 33 | void flush() override; 34 | void set_pattern(const std::string &pattern) override; 35 | 36 | void set_formatter(std::unique_ptr sink_formatter) override; 37 | 38 | protected: 39 | mutex_t &mutex_; 40 | FILE *file_; 41 | std::unique_ptr formatter_; 42 | #ifdef _WIN32 43 | HANDLE handle_; 44 | #endif // WIN32 45 | }; 46 | 47 | template 48 | class stdout_sink : public stdout_sink_base { 49 | public: 50 | stdout_sink(); 51 | }; 52 | 53 | template 54 | class stderr_sink : public stdout_sink_base { 55 | public: 56 | stderr_sink(); 57 | }; 58 | 59 | using stdout_sink_mt = stdout_sink; 60 | using stdout_sink_st = stdout_sink; 61 | 62 | using stderr_sink_mt = stderr_sink; 63 | using stderr_sink_st = stderr_sink; 64 | 65 | } // namespace sinks 66 | 67 | // factory methods 68 | template 69 | std::shared_ptr stdout_logger_mt(const std::string &logger_name); 70 | 71 | template 72 | std::shared_ptr stdout_logger_st(const std::string &logger_name); 73 | 74 | template 75 | std::shared_ptr stderr_logger_mt(const std::string &logger_name); 76 | 77 | template 78 | std::shared_ptr stderr_logger_st(const std::string &logger_name); 79 | 80 | } // namespace spdlog 81 | 82 | #ifdef SPDLOG_HEADER_ONLY 83 | #include "stdout_sinks-inl.h" 84 | #endif 85 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/dherr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_DHERR_H 12 | # define OPENSSL_DHERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_DH 21 | 22 | 23 | /* 24 | * DH reason codes. 25 | */ 26 | # define DH_R_BAD_FFC_PARAMETERS 127 27 | # define DH_R_BAD_GENERATOR 101 28 | # define DH_R_BN_DECODE_ERROR 109 29 | # define DH_R_BN_ERROR 106 30 | # define DH_R_CHECK_INVALID_J_VALUE 115 31 | # define DH_R_CHECK_INVALID_Q_VALUE 116 32 | # define DH_R_CHECK_PUBKEY_INVALID 122 33 | # define DH_R_CHECK_PUBKEY_TOO_LARGE 123 34 | # define DH_R_CHECK_PUBKEY_TOO_SMALL 124 35 | # define DH_R_CHECK_P_NOT_PRIME 117 36 | # define DH_R_CHECK_P_NOT_SAFE_PRIME 118 37 | # define DH_R_CHECK_Q_NOT_PRIME 119 38 | # define DH_R_DECODE_ERROR 104 39 | # define DH_R_INVALID_PARAMETER_NAME 110 40 | # define DH_R_INVALID_PARAMETER_NID 114 41 | # define DH_R_INVALID_PUBKEY 102 42 | # define DH_R_INVALID_SECRET 128 43 | # define DH_R_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 | -------------------------------------------------------------------------------- /include/spdlog/async_logger.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | // Fast asynchronous logger. 7 | // Uses pre allocated queue. 8 | // Creates a single back thread to pop messages from the queue and log them. 9 | // 10 | // Upon each log write the logger: 11 | // 1. Checks if its log level is enough to log the message 12 | // 2. Push a new copy of the message to a queue (or block the caller until 13 | // space is available in the queue) 14 | // Upon destruction, logs all remaining messages in the queue before 15 | // destructing.. 16 | 17 | #include 18 | 19 | namespace spdlog { 20 | 21 | // Async overflow policy - block by default. 22 | enum class async_overflow_policy { 23 | block, // Block until message can be enqueued 24 | overrun_oldest, // Discard oldest message in the queue if full when trying to 25 | // add new item. 26 | discard_new // Discard new message if the queue is full when trying to add new item. 27 | }; 28 | 29 | namespace details { 30 | class thread_pool; 31 | } 32 | 33 | class SPDLOG_API async_logger final : public std::enable_shared_from_this, 34 | public logger { 35 | friend class details::thread_pool; 36 | 37 | public: 38 | template 39 | async_logger(std::string logger_name, 40 | It begin, 41 | It end, 42 | std::weak_ptr tp, 43 | async_overflow_policy overflow_policy = async_overflow_policy::block) 44 | : logger(std::move(logger_name), begin, end), 45 | thread_pool_(std::move(tp)), 46 | overflow_policy_(overflow_policy) {} 47 | 48 | async_logger(std::string logger_name, 49 | sinks_init_list sinks_list, 50 | std::weak_ptr tp, 51 | async_overflow_policy overflow_policy = async_overflow_policy::block); 52 | 53 | async_logger(std::string logger_name, 54 | sink_ptr single_sink, 55 | std::weak_ptr tp, 56 | async_overflow_policy overflow_policy = async_overflow_policy::block); 57 | 58 | std::shared_ptr clone(std::string new_name) override; 59 | 60 | protected: 61 | void sink_it_(const details::log_msg &msg) override; 62 | void flush_() override; 63 | void backend_sink_it_(const details::log_msg &incoming_log_msg); 64 | void backend_flush_(); 65 | 66 | private: 67 | std::weak_ptr thread_pool_; 68 | async_overflow_policy overflow_policy_; 69 | }; 70 | } // namespace spdlog 71 | 72 | #ifdef SPDLOG_HEADER_ONLY 73 | #include "async_logger-inl.h" 74 | #endif 75 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/pemerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_PEMERR_H 12 | # define OPENSSL_PEMERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * PEM reason codes. 23 | */ 24 | # define PEM_R_BAD_BASE64_DECODE 100 25 | # define PEM_R_BAD_DECRYPT 101 26 | # define PEM_R_BAD_END_LINE 102 27 | # define PEM_R_BAD_IV_CHARS 103 28 | # define PEM_R_BAD_MAGIC_NUMBER 116 29 | # define PEM_R_BAD_PASSWORD_READ 104 30 | # define PEM_R_BAD_VERSION_NUMBER 117 31 | # define PEM_R_BIO_WRITE_FAILURE 118 32 | # define PEM_R_CIPHER_IS_NULL 127 33 | # define PEM_R_ERROR_CONVERTING_PRIVATE_KEY 115 34 | # define PEM_R_EXPECTING_DSS_KEY_BLOB 131 35 | # define PEM_R_EXPECTING_PRIVATE_KEY_BLOB 119 36 | # define PEM_R_EXPECTING_PUBLIC_KEY_BLOB 120 37 | # define PEM_R_EXPECTING_RSA_KEY_BLOB 132 38 | # define PEM_R_HEADER_TOO_LONG 128 39 | # define PEM_R_INCONSISTENT_HEADER 121 40 | # define PEM_R_KEYBLOB_HEADER_PARSE_ERROR 122 41 | # define PEM_R_KEYBLOB_TOO_SHORT 123 42 | # define PEM_R_MISSING_DEK_IV 129 43 | # define PEM_R_NOT_DEK_INFO 105 44 | # define PEM_R_NOT_ENCRYPTED 106 45 | # define PEM_R_NOT_PROC_TYPE 107 46 | # define PEM_R_NO_START_LINE 108 47 | # define PEM_R_PROBLEMS_GETTING_PASSWORD 109 48 | # define PEM_R_PVK_DATA_TOO_SHORT 124 49 | # define PEM_R_PVK_TOO_SHORT 125 50 | # define PEM_R_READ_KEY 111 51 | # define PEM_R_SHORT_HEADER 112 52 | # define PEM_R_UNEXPECTED_DEK_IV 130 53 | # define PEM_R_UNSUPPORTED_CIPHER 113 54 | # define PEM_R_UNSUPPORTED_ENCRYPTION 114 55 | # define PEM_R_UNSUPPORTED_KEY_COMPONENTS 126 56 | # define PEM_R_UNSUPPORTED_PUBLIC_KEY_TYPE 110 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /openssl-proj/include/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 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/blowfish.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_BLOWFISH_H 11 | # define OPENSSL_BLOWFISH_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_BLOWFISH_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_BF 22 | # include 23 | # ifdef __cplusplus 24 | extern "C" { 25 | # endif 26 | 27 | # define BF_BLOCK 8 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | 31 | # define BF_ENCRYPT 1 32 | # define BF_DECRYPT 0 33 | 34 | /*- 35 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 36 | * ! BF_LONG has to be at least 32 bits wide. ! 37 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 38 | */ 39 | # define BF_LONG unsigned int 40 | 41 | # define BF_ROUNDS 16 42 | 43 | typedef struct bf_key_st { 44 | BF_LONG P[BF_ROUNDS + 2]; 45 | BF_LONG S[4 * 256]; 46 | } BF_KEY; 47 | 48 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 49 | # ifndef OPENSSL_NO_DEPRECATED_3_0 50 | OSSL_DEPRECATEDIN_3_0 void BF_set_key(BF_KEY *key, int len, 51 | const unsigned char *data); 52 | OSSL_DEPRECATEDIN_3_0 void BF_encrypt(BF_LONG *data, const BF_KEY *key); 53 | OSSL_DEPRECATEDIN_3_0 void BF_decrypt(BF_LONG *data, const BF_KEY *key); 54 | OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char *in, 55 | unsigned char *out, const BF_KEY *key, 56 | int enc); 57 | OSSL_DEPRECATEDIN_3_0 void BF_cbc_encrypt(const unsigned char *in, 58 | unsigned char *out, long length, 59 | const BF_KEY *schedule, 60 | unsigned char *ivec, int enc); 61 | OSSL_DEPRECATEDIN_3_0 void BF_cfb64_encrypt(const unsigned char *in, 62 | unsigned char *out, 63 | long length, const BF_KEY *schedule, 64 | unsigned char *ivec, int *num, 65 | int enc); 66 | OSSL_DEPRECATEDIN_3_0 void BF_ofb64_encrypt(const unsigned char *in, 67 | unsigned char *out, 68 | long length, const BF_KEY *schedule, 69 | unsigned char *ivec, int *num); 70 | OSSL_DEPRECATEDIN_3_0 const char *BF_options(void); 71 | # endif 72 | 73 | # ifdef __cplusplus 74 | } 75 | # endif 76 | # endif 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /include/spdlog/sinks/wincolor_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | namespace spdlog { 18 | namespace sinks { 19 | /* 20 | * Windows color console sink. Uses WriteConsoleA to write to the console with 21 | * colors 22 | */ 23 | template 24 | class wincolor_sink : public sink { 25 | public: 26 | wincolor_sink(void *out_handle, color_mode mode); 27 | ~wincolor_sink() override; 28 | 29 | wincolor_sink(const wincolor_sink &other) = delete; 30 | wincolor_sink &operator=(const wincolor_sink &other) = delete; 31 | 32 | // change the color for the given level 33 | void set_color(level::level_enum level, std::uint16_t color); 34 | void log(const details::log_msg &msg) final override; 35 | void flush() final override; 36 | void set_pattern(const std::string &pattern) override final; 37 | void set_formatter(std::unique_ptr sink_formatter) override final; 38 | void set_color_mode(color_mode mode); 39 | 40 | protected: 41 | using mutex_t = typename ConsoleMutex::mutex_t; 42 | void *out_handle_; 43 | mutex_t &mutex_; 44 | bool should_do_colors_; 45 | std::unique_ptr formatter_; 46 | std::array colors_; 47 | 48 | // set foreground color and return the orig console attributes (for resetting later) 49 | std::uint16_t set_foreground_color_(std::uint16_t attribs); 50 | 51 | // print a range of formatted message to console 52 | void print_range_(const memory_buf_t &formatted, size_t start, size_t end); 53 | 54 | // in case we are redirected to file (not in console mode) 55 | void write_to_file_(const memory_buf_t &formatted); 56 | 57 | void set_color_mode_impl(color_mode mode); 58 | }; 59 | 60 | template 61 | class wincolor_stdout_sink : public wincolor_sink { 62 | public: 63 | explicit wincolor_stdout_sink(color_mode mode = color_mode::automatic); 64 | }; 65 | 66 | template 67 | class wincolor_stderr_sink : public wincolor_sink { 68 | public: 69 | explicit wincolor_stderr_sink(color_mode mode = color_mode::automatic); 70 | }; 71 | 72 | using wincolor_stdout_sink_mt = wincolor_stdout_sink; 73 | using wincolor_stdout_sink_st = wincolor_stdout_sink; 74 | 75 | using wincolor_stderr_sink_mt = wincolor_stderr_sink; 76 | using wincolor_stderr_sink_st = wincolor_stderr_sink; 77 | } // namespace sinks 78 | } // namespace spdlog 79 | 80 | #ifdef SPDLOG_HEADER_ONLY 81 | #include "wincolor_sink-inl.h" 82 | #endif 83 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/param_build.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_PARAM_BUILD_H 12 | # define OPENSSL_PARAM_BUILD_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | OSSL_PARAM_BLD *OSSL_PARAM_BLD_new(void); 23 | OSSL_PARAM *OSSL_PARAM_BLD_to_param(OSSL_PARAM_BLD *bld); 24 | void OSSL_PARAM_BLD_free(OSSL_PARAM_BLD *bld); 25 | 26 | int OSSL_PARAM_BLD_push_int(OSSL_PARAM_BLD *bld, const char *key, int val); 27 | int OSSL_PARAM_BLD_push_uint(OSSL_PARAM_BLD *bld, const char *key, 28 | unsigned int val); 29 | int OSSL_PARAM_BLD_push_long(OSSL_PARAM_BLD *bld, const char *key, 30 | long int val); 31 | int OSSL_PARAM_BLD_push_ulong(OSSL_PARAM_BLD *bld, const char *key, 32 | unsigned long int val); 33 | int OSSL_PARAM_BLD_push_int32(OSSL_PARAM_BLD *bld, const char *key, 34 | int32_t val); 35 | int OSSL_PARAM_BLD_push_uint32(OSSL_PARAM_BLD *bld, const char *key, 36 | uint32_t val); 37 | int OSSL_PARAM_BLD_push_int64(OSSL_PARAM_BLD *bld, const char *key, 38 | int64_t val); 39 | int OSSL_PARAM_BLD_push_uint64(OSSL_PARAM_BLD *bld, const char *key, 40 | uint64_t val); 41 | int OSSL_PARAM_BLD_push_size_t(OSSL_PARAM_BLD *bld, const char *key, 42 | size_t val); 43 | int OSSL_PARAM_BLD_push_time_t(OSSL_PARAM_BLD *bld, const char *key, 44 | time_t val); 45 | int OSSL_PARAM_BLD_push_double(OSSL_PARAM_BLD *bld, const char *key, 46 | double val); 47 | int OSSL_PARAM_BLD_push_BN(OSSL_PARAM_BLD *bld, const char *key, 48 | const BIGNUM *bn); 49 | int OSSL_PARAM_BLD_push_BN_pad(OSSL_PARAM_BLD *bld, const char *key, 50 | const BIGNUM *bn, size_t sz); 51 | int OSSL_PARAM_BLD_push_utf8_string(OSSL_PARAM_BLD *bld, const char *key, 52 | const char *buf, size_t bsize); 53 | int OSSL_PARAM_BLD_push_utf8_ptr(OSSL_PARAM_BLD *bld, const char *key, 54 | char *buf, size_t bsize); 55 | int OSSL_PARAM_BLD_push_octet_string(OSSL_PARAM_BLD *bld, const char *key, 56 | const void *buf, size_t bsize); 57 | int OSSL_PARAM_BLD_push_octet_ptr(OSSL_PARAM_BLD *bld, const char *key, 58 | void *buf, size_t bsize); 59 | 60 | # ifdef __cplusplus 61 | } 62 | # endif 63 | #endif /* OPENSSL_PARAM_BUILD_H */ 64 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/engineerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ENGINEERR_H 12 | # define OPENSSL_ENGINEERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_ENGINE 21 | 22 | 23 | /* 24 | * ENGINE reason codes. 25 | */ 26 | # define ENGINE_R_ALREADY_LOADED 100 27 | # define ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER 133 28 | # define ENGINE_R_CMD_NOT_EXECUTABLE 134 29 | # define ENGINE_R_COMMAND_TAKES_INPUT 135 30 | # define ENGINE_R_COMMAND_TAKES_NO_INPUT 136 31 | # define ENGINE_R_CONFLICTING_ENGINE_ID 103 32 | # define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119 33 | # define ENGINE_R_DSO_FAILURE 104 34 | # define ENGINE_R_DSO_NOT_FOUND 132 35 | # define ENGINE_R_ENGINES_SECTION_ERROR 148 36 | # define ENGINE_R_ENGINE_CONFIGURATION_ERROR 102 37 | # define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105 38 | # define ENGINE_R_ENGINE_SECTION_ERROR 149 39 | # define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128 40 | # define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129 41 | # define ENGINE_R_FINISH_FAILED 106 42 | # define ENGINE_R_ID_OR_NAME_MISSING 108 43 | # define ENGINE_R_INIT_FAILED 109 44 | # define ENGINE_R_INTERNAL_LIST_ERROR 110 45 | # define ENGINE_R_INVALID_ARGUMENT 143 46 | # define ENGINE_R_INVALID_CMD_NAME 137 47 | # define ENGINE_R_INVALID_CMD_NUMBER 138 48 | # define ENGINE_R_INVALID_INIT_VALUE 151 49 | # define ENGINE_R_INVALID_STRING 150 50 | # define ENGINE_R_NOT_INITIALISED 117 51 | # define ENGINE_R_NOT_LOADED 112 52 | # define ENGINE_R_NO_CONTROL_FUNCTION 120 53 | # define ENGINE_R_NO_INDEX 144 54 | # define ENGINE_R_NO_LOAD_FUNCTION 125 55 | # define ENGINE_R_NO_REFERENCE 130 56 | # define ENGINE_R_NO_SUCH_ENGINE 116 57 | # define ENGINE_R_UNIMPLEMENTED_CIPHER 146 58 | # define ENGINE_R_UNIMPLEMENTED_DIGEST 147 59 | # define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101 60 | # define ENGINE_R_VERSION_INCOMPATIBILITY 145 61 | 62 | # endif 63 | #endif 64 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/rc5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_RC5_H 11 | # define OPENSSL_RC5_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RC5_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_RC5 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define RC5_32_BLOCK 8 27 | # define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */ 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | # define RC5_ENCRYPT 1 31 | # define RC5_DECRYPT 0 32 | 33 | # define RC5_32_INT unsigned int 34 | 35 | /* 36 | * This are the only values supported. Tweak the code if you want more The 37 | * most supported modes will be RC5-32/12/16 RC5-32/16/8 38 | */ 39 | # define RC5_8_ROUNDS 8 40 | # define RC5_12_ROUNDS 12 41 | # define RC5_16_ROUNDS 16 42 | 43 | typedef struct rc5_key_st { 44 | /* Number of rounds */ 45 | int rounds; 46 | RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)]; 47 | } RC5_32_KEY; 48 | # endif 49 | # ifndef OPENSSL_NO_DEPRECATED_3_0 50 | OSSL_DEPRECATEDIN_3_0 int RC5_32_set_key(RC5_32_KEY *key, int len, 51 | const unsigned char *data, 52 | int rounds); 53 | OSSL_DEPRECATEDIN_3_0 void RC5_32_ecb_encrypt(const unsigned char *in, 54 | unsigned char *out, 55 | RC5_32_KEY *key, 56 | int enc); 57 | OSSL_DEPRECATEDIN_3_0 void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key); 58 | OSSL_DEPRECATEDIN_3_0 void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key); 59 | OSSL_DEPRECATEDIN_3_0 void RC5_32_cbc_encrypt(const unsigned char *in, 60 | unsigned char *out, long length, 61 | RC5_32_KEY *ks, unsigned char *iv, 62 | int enc); 63 | OSSL_DEPRECATEDIN_3_0 void RC5_32_cfb64_encrypt(const unsigned char *in, 64 | unsigned char *out, long length, 65 | RC5_32_KEY *schedule, 66 | unsigned char *ivec, int *num, 67 | int enc); 68 | OSSL_DEPRECATEDIN_3_0 void RC5_32_ofb64_encrypt(const unsigned char *in, 69 | unsigned char *out, long length, 70 | RC5_32_KEY *schedule, 71 | unsigned char *ivec, int *num); 72 | # endif 73 | 74 | # ifdef __cplusplus 75 | } 76 | # endif 77 | # endif 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/pkcs7err.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_PKCS7ERR_H 12 | # define OPENSSL_PKCS7ERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * PKCS7 reason codes. 23 | */ 24 | # define PKCS7_R_CERTIFICATE_VERIFY_ERROR 117 25 | # define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 144 26 | # define PKCS7_R_CIPHER_NOT_INITIALIZED 116 27 | # define PKCS7_R_CONTENT_AND_DATA_PRESENT 118 28 | # define PKCS7_R_CTRL_ERROR 152 29 | # define PKCS7_R_DECRYPT_ERROR 119 30 | # define PKCS7_R_DIGEST_FAILURE 101 31 | # define PKCS7_R_ENCRYPTION_CTRL_FAILURE 149 32 | # define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 150 33 | # define PKCS7_R_ERROR_ADDING_RECIPIENT 120 34 | # define PKCS7_R_ERROR_SETTING_CIPHER 121 35 | # define PKCS7_R_INVALID_NULL_POINTER 143 36 | # define PKCS7_R_INVALID_SIGNED_DATA_TYPE 155 37 | # define PKCS7_R_NO_CONTENT 122 38 | # define PKCS7_R_NO_DEFAULT_DIGEST 151 39 | # define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND 154 40 | # define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE 115 41 | # define PKCS7_R_NO_SIGNATURES_ON_DATA 123 42 | # define PKCS7_R_NO_SIGNERS 142 43 | # define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE 104 44 | # define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR 124 45 | # define PKCS7_R_PKCS7_ADD_SIGNER_ERROR 153 46 | # define PKCS7_R_PKCS7_DATASIGN 145 47 | # define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 127 48 | # define PKCS7_R_SIGNATURE_FAILURE 105 49 | # define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND 128 50 | # define PKCS7_R_SIGNING_CTRL_FAILURE 147 51 | # define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 148 52 | # define PKCS7_R_SMIME_TEXT_ERROR 129 53 | # define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE 106 54 | # define PKCS7_R_UNABLE_TO_FIND_MEM_BIO 107 55 | # define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST 108 56 | # define PKCS7_R_UNKNOWN_DIGEST_TYPE 109 57 | # define PKCS7_R_UNKNOWN_OPERATION 110 58 | # define PKCS7_R_UNSUPPORTED_CIPHER_TYPE 111 59 | # define PKCS7_R_UNSUPPORTED_CONTENT_TYPE 112 60 | # define PKCS7_R_WRONG_CONTENT_TYPE 113 61 | # define PKCS7_R_WRONG_PKCS7_TYPE 114 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /include/spdlog/async_logger-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | SPDLOG_INLINE spdlog::async_logger::async_logger(std::string logger_name, 17 | sinks_init_list sinks_list, 18 | std::weak_ptr tp, 19 | async_overflow_policy overflow_policy) 20 | : async_logger(std::move(logger_name), 21 | sinks_list.begin(), 22 | sinks_list.end(), 23 | std::move(tp), 24 | overflow_policy) {} 25 | 26 | SPDLOG_INLINE spdlog::async_logger::async_logger(std::string logger_name, 27 | sink_ptr single_sink, 28 | std::weak_ptr tp, 29 | async_overflow_policy overflow_policy) 30 | : async_logger( 31 | std::move(logger_name), {std::move(single_sink)}, std::move(tp), overflow_policy) {} 32 | 33 | // send the log message to the thread pool 34 | SPDLOG_INLINE void spdlog::async_logger::sink_it_(const details::log_msg &msg){ 35 | SPDLOG_TRY{if (auto pool_ptr = thread_pool_.lock()){ 36 | pool_ptr->post_log(shared_from_this(), msg, overflow_policy_); 37 | } 38 | else { 39 | throw_spdlog_ex("async log: thread pool doesn't exist anymore"); 40 | } 41 | } 42 | SPDLOG_LOGGER_CATCH(msg.source) 43 | } 44 | 45 | // send flush request to the thread pool 46 | SPDLOG_INLINE void spdlog::async_logger::flush_(){SPDLOG_TRY{auto pool_ptr = thread_pool_.lock(); 47 | if (!pool_ptr) { 48 | throw_spdlog_ex("async flush: thread pool doesn't exist anymore"); 49 | } 50 | 51 | std::future future = pool_ptr->post_flush(shared_from_this(), overflow_policy_); 52 | // Wait for the flush operation to complete. 53 | // This might throw exception if the flush message get dropped because of overflow. 54 | future.get(); 55 | } 56 | SPDLOG_LOGGER_CATCH(source_loc()) 57 | } 58 | 59 | // 60 | // backend functions - called from the thread pool to do the actual job 61 | // 62 | SPDLOG_INLINE void spdlog::async_logger::backend_sink_it_(const details::log_msg &msg) { 63 | for (auto &sink : sinks_) { 64 | if (sink->should_log(msg.level)) { 65 | SPDLOG_TRY { sink->log(msg); } 66 | SPDLOG_LOGGER_CATCH(msg.source) 67 | } 68 | } 69 | 70 | if (should_flush_(msg)) { 71 | backend_flush_(); 72 | } 73 | } 74 | 75 | SPDLOG_INLINE void spdlog::async_logger::backend_flush_() { 76 | for (auto &sink : sinks_) { 77 | SPDLOG_TRY { sink->flush(); } 78 | SPDLOG_LOGGER_CATCH(source_loc()) 79 | } 80 | } 81 | 82 | SPDLOG_INLINE std::shared_ptr spdlog::async_logger::clone(std::string new_name) { 83 | auto cloned = std::make_shared(*this); 84 | cloned->name_ = std::move(new_name); 85 | return cloned; 86 | } 87 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/tserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_TSERR_H 12 | # define OPENSSL_TSERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_TS 21 | 22 | 23 | /* 24 | * TS reason codes. 25 | */ 26 | # define TS_R_BAD_PKCS7_TYPE 132 27 | # define TS_R_BAD_TYPE 133 28 | # define TS_R_CANNOT_LOAD_CERT 137 29 | # define TS_R_CANNOT_LOAD_KEY 138 30 | # define TS_R_CERTIFICATE_VERIFY_ERROR 100 31 | # define TS_R_COULD_NOT_SET_ENGINE 127 32 | # define TS_R_COULD_NOT_SET_TIME 115 33 | # define TS_R_DETACHED_CONTENT 134 34 | # define TS_R_ESS_ADD_SIGNING_CERT_ERROR 116 35 | # define TS_R_ESS_ADD_SIGNING_CERT_V2_ERROR 139 36 | # define TS_R_ESS_SIGNING_CERTIFICATE_ERROR 101 37 | # define TS_R_INVALID_NULL_POINTER 102 38 | # define TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE 117 39 | # define TS_R_MESSAGE_IMPRINT_MISMATCH 103 40 | # define TS_R_NONCE_MISMATCH 104 41 | # define TS_R_NONCE_NOT_RETURNED 105 42 | # define TS_R_NO_CONTENT 106 43 | # define TS_R_NO_TIME_STAMP_TOKEN 107 44 | # define TS_R_PKCS7_ADD_SIGNATURE_ERROR 118 45 | # define TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR 119 46 | # define TS_R_PKCS7_TO_TS_TST_INFO_FAILED 129 47 | # define TS_R_POLICY_MISMATCH 108 48 | # define TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 120 49 | # define TS_R_RESPONSE_SETUP_ERROR 121 50 | # define TS_R_SIGNATURE_FAILURE 109 51 | # define TS_R_THERE_MUST_BE_ONE_SIGNER 110 52 | # define TS_R_TIME_SYSCALL_ERROR 122 53 | # define TS_R_TOKEN_NOT_PRESENT 130 54 | # define TS_R_TOKEN_PRESENT 131 55 | # define TS_R_TSA_NAME_MISMATCH 111 56 | # define TS_R_TSA_UNTRUSTED 112 57 | # define TS_R_TST_INFO_SETUP_ERROR 123 58 | # define TS_R_TS_DATASIGN 124 59 | # define TS_R_UNACCEPTABLE_POLICY 125 60 | # define TS_R_UNSUPPORTED_MD_ALGORITHM 126 61 | # define TS_R_UNSUPPORTED_VERSION 113 62 | # define TS_R_VAR_BAD_VALUE 135 63 | # define TS_R_VAR_LOOKUP_FAILURE 136 64 | # define TS_R_WRONG_CONTENT_TYPE 114 65 | 66 | # endif 67 | #endif 68 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/idea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_IDEA_H 11 | # define OPENSSL_IDEA_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_IDEA_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_IDEA 22 | # ifdef __cplusplus 23 | extern "C" { 24 | # endif 25 | 26 | # define IDEA_BLOCK 8 27 | # define IDEA_KEY_LENGTH 16 28 | 29 | # ifndef OPENSSL_NO_DEPRECATED_3_0 30 | 31 | typedef unsigned int IDEA_INT; 32 | 33 | # define IDEA_ENCRYPT 1 34 | # define IDEA_DECRYPT 0 35 | 36 | typedef struct idea_key_st { 37 | IDEA_INT data[9][6]; 38 | } IDEA_KEY_SCHEDULE; 39 | #endif 40 | #ifndef OPENSSL_NO_DEPRECATED_3_0 41 | OSSL_DEPRECATEDIN_3_0 const char *IDEA_options(void); 42 | OSSL_DEPRECATEDIN_3_0 void IDEA_ecb_encrypt(const unsigned char *in, 43 | unsigned char *out, 44 | IDEA_KEY_SCHEDULE *ks); 45 | OSSL_DEPRECATEDIN_3_0 void IDEA_set_encrypt_key(const unsigned char *key, 46 | IDEA_KEY_SCHEDULE *ks); 47 | OSSL_DEPRECATEDIN_3_0 void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, 48 | IDEA_KEY_SCHEDULE *dk); 49 | OSSL_DEPRECATEDIN_3_0 void IDEA_cbc_encrypt(const unsigned char *in, 50 | unsigned char *out, long length, 51 | IDEA_KEY_SCHEDULE *ks, 52 | unsigned char *iv, int enc); 53 | OSSL_DEPRECATEDIN_3_0 void IDEA_cfb64_encrypt(const unsigned char *in, 54 | unsigned char *out, long length, 55 | IDEA_KEY_SCHEDULE *ks, 56 | unsigned char *iv, int *num, 57 | int enc); 58 | OSSL_DEPRECATEDIN_3_0 void IDEA_ofb64_encrypt(const unsigned char *in, 59 | unsigned char *out, long length, 60 | IDEA_KEY_SCHEDULE *ks, 61 | unsigned char *iv, int *num); 62 | OSSL_DEPRECATEDIN_3_0 void IDEA_encrypt(unsigned long *in, 63 | IDEA_KEY_SCHEDULE *ks); 64 | #endif 65 | 66 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 67 | # define idea_options IDEA_options 68 | # define idea_ecb_encrypt IDEA_ecb_encrypt 69 | # define idea_set_encrypt_key IDEA_set_encrypt_key 70 | # define idea_set_decrypt_key IDEA_set_decrypt_key 71 | # define idea_cbc_encrypt IDEA_cbc_encrypt 72 | # define idea_cfb64_encrypt IDEA_cfb64_encrypt 73 | # define idea_ofb64_encrypt IDEA_ofb64_encrypt 74 | # define idea_encrypt IDEA_encrypt 75 | # endif 76 | 77 | # ifdef __cplusplus 78 | } 79 | # endif 80 | # endif 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /include/spdlog/details/udp_client-windows.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | // Helper RAII over winsock udp client socket. 7 | // Will throw on construction if socket creation failed. 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #if defined(_MSC_VER) 19 | #pragma comment(lib, "Ws2_32.lib") 20 | #pragma comment(lib, "Mswsock.lib") 21 | #pragma comment(lib, "AdvApi32.lib") 22 | #endif 23 | 24 | namespace spdlog { 25 | namespace details { 26 | class udp_client { 27 | static constexpr int TX_BUFFER_SIZE = 1024 * 10; 28 | SOCKET socket_ = INVALID_SOCKET; 29 | sockaddr_in addr_ = {}; 30 | 31 | static void init_winsock_() { 32 | WSADATA wsaData; 33 | auto rv = ::WSAStartup(MAKEWORD(2, 2), &wsaData); 34 | if (rv != 0) { 35 | throw_winsock_error_("WSAStartup failed", ::WSAGetLastError()); 36 | } 37 | } 38 | 39 | static void throw_winsock_error_(const std::string &msg, int last_error) { 40 | char buf[512]; 41 | ::FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, 42 | last_error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 43 | (sizeof(buf) / sizeof(char)), NULL); 44 | 45 | throw_spdlog_ex(fmt_lib::format("udp_sink - {}: {}", msg, buf)); 46 | } 47 | 48 | void cleanup_() { 49 | if (socket_ != INVALID_SOCKET) { 50 | ::closesocket(socket_); 51 | } 52 | socket_ = INVALID_SOCKET; 53 | ::WSACleanup(); 54 | } 55 | 56 | public: 57 | udp_client(const std::string &host, uint16_t port) { 58 | init_winsock_(); 59 | 60 | addr_.sin_family = PF_INET; 61 | addr_.sin_port = htons(port); 62 | addr_.sin_addr.s_addr = INADDR_ANY; 63 | if (InetPtonA(PF_INET, host.c_str(), &addr_.sin_addr.s_addr) != 1) { 64 | int last_error = ::WSAGetLastError(); 65 | ::WSACleanup(); 66 | throw_winsock_error_("error: Invalid address!", last_error); 67 | } 68 | 69 | socket_ = ::socket(PF_INET, SOCK_DGRAM, 0); 70 | if (socket_ == INVALID_SOCKET) { 71 | int last_error = ::WSAGetLastError(); 72 | ::WSACleanup(); 73 | throw_winsock_error_("error: Create Socket failed", last_error); 74 | } 75 | 76 | int option_value = TX_BUFFER_SIZE; 77 | if (::setsockopt(socket_, SOL_SOCKET, SO_SNDBUF, 78 | reinterpret_cast(&option_value), sizeof(option_value)) < 0) { 79 | int last_error = ::WSAGetLastError(); 80 | cleanup_(); 81 | throw_winsock_error_("error: setsockopt(SO_SNDBUF) Failed!", last_error); 82 | } 83 | } 84 | 85 | ~udp_client() { cleanup_(); } 86 | 87 | SOCKET fd() const { return socket_; } 88 | 89 | void send(const char *data, size_t n_bytes) { 90 | socklen_t tolen = sizeof(struct sockaddr); 91 | if (::sendto(socket_, data, static_cast(n_bytes), 0, (struct sockaddr *)&addr_, 92 | tolen) == -1) { 93 | throw_spdlog_ex("sendto(2) failed", errno); 94 | } 95 | } 96 | }; 97 | } // namespace details 98 | } // namespace spdlog 99 | -------------------------------------------------------------------------------- /openssl-proj/include/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 | -------------------------------------------------------------------------------- /openssl-proj/include/openssl/x509err.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_X509ERR_H 12 | # define OPENSSL_X509ERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * X509 reason codes. 23 | */ 24 | # define X509_R_AKID_MISMATCH 110 25 | # define X509_R_BAD_SELECTOR 133 26 | # define X509_R_BAD_X509_FILETYPE 100 27 | # define X509_R_BASE64_DECODE_ERROR 118 28 | # define X509_R_CANT_CHECK_DH_KEY 114 29 | # define X509_R_CERTIFICATE_VERIFICATION_FAILED 139 30 | # define X509_R_CERT_ALREADY_IN_HASH_TABLE 101 31 | # define X509_R_CRL_ALREADY_DELTA 127 32 | # define X509_R_CRL_VERIFY_FAILURE 131 33 | # define X509_R_DUPLICATE_ATTRIBUTE 140 34 | # define X509_R_ERROR_GETTING_MD_BY_NID 141 35 | # define X509_R_ERROR_USING_SIGINF_SET 142 36 | # define X509_R_IDP_MISMATCH 128 37 | # define X509_R_INVALID_ATTRIBUTES 138 38 | # define X509_R_INVALID_DIRECTORY 113 39 | # define X509_R_INVALID_DISTPOINT 143 40 | # define X509_R_INVALID_FIELD_NAME 119 41 | # define X509_R_INVALID_TRUST 123 42 | # define X509_R_ISSUER_MISMATCH 129 43 | # define X509_R_KEY_TYPE_MISMATCH 115 44 | # define X509_R_KEY_VALUES_MISMATCH 116 45 | # define X509_R_LOADING_CERT_DIR 103 46 | # define X509_R_LOADING_DEFAULTS 104 47 | # define X509_R_METHOD_NOT_SUPPORTED 124 48 | # define X509_R_NAME_TOO_LONG 134 49 | # define X509_R_NEWER_CRL_NOT_NEWER 132 50 | # define X509_R_NO_CERTIFICATE_FOUND 135 51 | # define X509_R_NO_CERTIFICATE_OR_CRL_FOUND 136 52 | # define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105 53 | # define X509_R_NO_CRL_FOUND 137 54 | # define X509_R_NO_CRL_NUMBER 130 55 | # define X509_R_PUBLIC_KEY_DECODE_ERROR 125 56 | # define X509_R_PUBLIC_KEY_ENCODE_ERROR 126 57 | # define X509_R_SHOULD_RETRY 106 58 | # define X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN 107 59 | # define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY 108 60 | # define X509_R_UNKNOWN_KEY_TYPE 117 61 | # define X509_R_UNKNOWN_NID 109 62 | # define X509_R_UNKNOWN_PURPOSE_ID 121 63 | # define X509_R_UNKNOWN_SIGID_ALGS 144 64 | # define X509_R_UNKNOWN_TRUST_ID 120 65 | # define X509_R_UNSUPPORTED_ALGORITHM 111 66 | # define X509_R_WRONG_LOOKUP_TYPE 112 67 | # define X509_R_WRONG_TYPE 122 68 | 69 | #endif 70 | --------------------------------------------------------------------------------