feat(gateway): TLS 1.3 only control plane and LNEx v3 channel-bound handshake
Replace the X25519/HKDF/ChaCha20 TCP layer with rustls TLS 1.3 (ALPN vnox-lnex/3). Auto-generate a self-signed certificate keyed by the server identity or load an operator certificate, publish the SPKI fingerprint, bind HELLO and AUTH signatures to the TLS exporter, reject plaintext, TLS 1.2 and LNEx v2 peers with an explicit error. BREAKING: protocol v3. Claude-Session: https://claude.ai/code/session_01GDjxLvBcnJqniFQGUGb1V4
This commit is contained in:
parent
a5b9c324f7
commit
0d2af0ddd6
45 changed files with 1322 additions and 806 deletions
|
|
@ -117,9 +117,8 @@ pub(super) async fn may_manage(
|
|||
pub(super) async fn denied(
|
||||
stream: &mut (impl tokio::io::AsyncRead + tokio::io::AsyncWrite + Unpin),
|
||||
seq: &mut u32,
|
||||
crypto: &crate::proto::SessionCrypto,
|
||||
) -> anyhow::Result<()> {
|
||||
crate::net::io::send_encrypted(
|
||||
crate::net::io::send_frame(
|
||||
stream,
|
||||
PacketId::Error,
|
||||
seq,
|
||||
|
|
@ -127,7 +126,6 @@ pub(super) async fn denied(
|
|||
code: crate::proto::ErrorCode::PermissionDenied as u32,
|
||||
message: "guild MANAGE_CHANNELS permission required".into(),
|
||||
}),
|
||||
crypto,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue