初始提交:terminalX 可运行态(M0/M1/M1.5 已真机验证)
- M0: libghostty SSH 终端(渲染/输入/连接)+ 白屏修复(OutputGate) + 会话状态机/自动重连 - M1: tsnet 用户态组网 + SSH-over-tsnet(fd 桥),shell 级真机验证;R5(Go+gvisor+C+++Swift 同进程) retire - M1.5: tmux -CC 原生 tab(MVP) - 结构: packages/(TXCore·TXTransport), apps/TerminalX, vendor/(libghostty-spm/libssh2/mbedtls/tsnet-bridge), artifacts/ - 文档: CLAUDE.md + docs/HANDOFF.md(新会话入口) - 环境: 认证代理→依赖 vendor 本地化;Go 在 ~/.local/go;仅模拟器/未签名 - 待续: M2 mosh, tmux 多 pane, M4 安全(host key/SE) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
72
vendor/mbedtls/library/psa_crypto_random.h
vendored
Normal file
72
vendor/mbedtls/library/psa_crypto_random.h
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* PSA crypto random generator internal functions.
|
||||
*/
|
||||
/*
|
||||
* Copyright The Mbed TLS Contributors
|
||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef PSA_CRYPTO_RANDOM_H
|
||||
#define PSA_CRYPTO_RANDOM_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#if !defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
|
||||
|
||||
#include <psa/crypto.h>
|
||||
#include "psa_crypto_random_impl.h"
|
||||
|
||||
/** Initialize the PSA random generator.
|
||||
*
|
||||
* \param[out] rng The random generator context to initialize.
|
||||
*/
|
||||
void psa_random_internal_init(mbedtls_psa_random_context_t *rng);
|
||||
|
||||
/** Deinitialize the PSA random generator.
|
||||
*
|
||||
* \param[in,out] rng The random generator context to deinitialize.
|
||||
*/
|
||||
void psa_random_internal_free(mbedtls_psa_random_context_t *rng);
|
||||
|
||||
/** Seed the PSA random generator.
|
||||
*
|
||||
* \note This function is not thread-safe.
|
||||
*
|
||||
* \param[in,out] rng The random generator context to seed.
|
||||
*
|
||||
* \retval #PSA_SUCCESS
|
||||
* Success.
|
||||
* \retval #PSA_ERROR_INSUFFICIENT_ENTROPY
|
||||
* The entropy source failed.
|
||||
*/
|
||||
psa_status_t psa_random_internal_seed(mbedtls_psa_random_context_t *rng);
|
||||
|
||||
/**
|
||||
* \brief Generate random bytes. Like psa_generate_random(), but for use
|
||||
* inside the library.
|
||||
*
|
||||
* This function is thread-safe.
|
||||
*
|
||||
* \warning This function **can** fail! Callers MUST check the return status
|
||||
* and MUST NOT use the content of the output buffer if the return
|
||||
* status is not #PSA_SUCCESS.
|
||||
*
|
||||
* \param[in,out] rng The random generator context to seed.
|
||||
* \param[out] output Output buffer for the generated data.
|
||||
* \param output_size Number of bytes to generate and output.
|
||||
*
|
||||
* \retval #PSA_SUCCESS
|
||||
* Success.
|
||||
* \retval #PSA_ERROR_INSUFFICIENT_ENTROPY
|
||||
* The random generator needed to reseed, and the entropy
|
||||
* source failed.
|
||||
* \retval #PSA_ERROR_HARDWARE_FAILURE
|
||||
* A hardware accelerator failed.
|
||||
*/
|
||||
psa_status_t psa_random_internal_generate(
|
||||
mbedtls_psa_random_context_t *rng,
|
||||
uint8_t *output, size_t output_size);
|
||||
|
||||
#endif /* !defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG) */
|
||||
|
||||
#endif /* PSA_CRYPTO_RANDOM_H */
|
||||
Reference in New Issue
Block a user