ZaStoGram/Tools/mtproxy_host_stubs/openssl/hmac.h
loop-uh 3f8f8f27e7 Extract mtproxy module with unified retry authority
Move MTProxy policy engine from tgnet/ to self-contained jni/mtproxy/ module. Consolidate reconnect hold computation into single MtProxyRetryAuthority owner (was split across Connection, ConnectionSocket, endpoint policy, and probe coordinator, causing hold misalignment bugs). Add MtProxyTerminalDiagnostic module with host tests for pre-I/O verdict preservation (fixes 02.07/30.06 clobber livelocks). Auto-generate phase classification (isPreIoTerminalVerdict, needsReconnectBackoff, isObservationFacadePhase, isLocalSchedulerTimeout) from single Python contract into both C++ and Java to eliminate parallel maintenance. Pass native hold (coordinator terminal hold + endpoint cooldown) via JNI to Java so reconnect timer and health store use THE clock, not re-derived ones. Optimize log flushing: batch debug lines, flush errors immediately. Add module boundary guard, host build system (MSVC), and unit tests for retry logic and terminal diagnostic derivation.
2026-07-02 18:25:13 +03:00

29 lines
736 B
C

// Host-build stub for Tools/build_mtproxy_host.py (no BoringSSL on host).
// Signatures mirror BoringSSL. Compile-only: never linked or run.
#ifndef MTPROXY_HOST_STUB_OPENSSL_HMAC_H
#define MTPROXY_HOST_STUB_OPENSSL_HMAC_H
#include <stddef.h>
#include <stdint.h>
typedef struct env_md_st EVP_MD;
inline const EVP_MD *EVP_sha256(void) {
return nullptr;
}
inline uint8_t *HMAC(const EVP_MD *evp_md, const void *key, size_t key_len,
const uint8_t *data, size_t data_len, uint8_t *out,
unsigned int *out_len) {
(void) evp_md;
(void) key;
(void) key_len;
(void) data;
(void) data_len;
if (out_len != nullptr) {
*out_len = 32;
}
return out;
}
#endif