[PR #7011] [MERGED] Clear stale rest-021.tsv rows main already implements #7268

Closed
opened 2026-11-03 06:36:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7011
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/ledger-rest-021-rows


📝 Commits (1)

  • 8af6df8 rest-021: the chat key reader is ported

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tools/port_map/rest-021.tsv (+1 -1)

📄 Description

Crypt.byteToPrivateKey read missing for behaviour main has: the account chat key pair's private key is decoded and read as PKCS8EncodedKeySpec.

  • Crypt.byteToPrivateKey — "PKCS#8 private key reader for the account chat key pair; Horizon has none". crates/horizon-protocol/src/rsa.rs::RsaPrivateKey::from_der is that reader (doc: "PKCS8EncodedKeySpec: PrivateKeyInfo { version, AlgorithmIdentifier, OCTET STRING RSAPrivateKey }. A bare PKCS#1 RSAPrivateKey is read too"), and crates/horizon-client-render/src/auth.rs::parse_certificates runs it over the certificates endpoint's keyPair.privateKey once pem_der has stripped the armour and base64-decoded it.

Proven:

  • python3 tools/port_ledger.py map-check tools/port_map/rest-021.tsv, after python3 tools/port_ledger.py build --jar /data/home/horizon/.local/minecraft/26.3/jars/server.jar, run once the build VM came back (it was in cooldown when this opened) → 135 rows, no problems.
  • javap -p -c -constants on net.minecraft.util.Crypt.byteToPrivateKey(byte[]) → new PKCS8EncodedKeySpec(bytes), then KeyFactory.getInstance("RSA").generatePrivate(spec), any exception wrapped in CryptException; crates/horizon-protocol/src/rsa.rs:555 (pub fn from_der(der_bytes: &[u8])) parses the PrivateKeyInfo wrapper, its RSA AlgorithmIdentifier and the inner RSAPrivateKey, and falls back to a bare PKCS#1 key, erroring on anything else.
  • grep -n 'RsaPrivateKey::from_der' crates/horizon-client-render/src/auth.rs → 386, inside parse_certificates (PEM → pem_der → from_der, and the public key must be the private key's other half).

Not proven:

  • I did not run the game: no certificates-endpoint fetch was exercised.
  • Crypt.rsaPublicKeyToString and Crypt.pemRsaPrivateKeyToString stay missing: no -----BEGIN RSA …----- header and no PEM writer anywhere under crates/; auth.rs::pem_der only reads.
  • The eleven Ease.* rows stay missing: crates/horizon-optifine/src/cem/curves.rs carries the easings.net curves for CEM (ease/easeIn* functions of OptiFine's registry), not vanilla's EasingType one, and the timeline loader (environment.rs) matches constant and cubic_bezier only, so no named vanilla easing is reachable.
  • EasingType.CubicBezierControls.validate stays missing: the control points are taken as parsed with no [0;1] test, where javap shows x1/x2 refusals ("x1 must be in range [0; 1]").
  • FormattedCharSequence.decorateOutput stays missing: grep -rl decorateOutput over the 26.3 classes hits only FormattedCharSequence itself and FunctionCommand's unrelated decorateOutputIfNeeded, and Horizon's bidi pass reorders and mirrors characters directly rather than wrapping a sink.
  • I read no row outside the ones above against the tree, so the rest of the file's verdicts are unchanged and unchecked here beyond what map-check resolves.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7011 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/ledger-rest-021-rows` --- ### 📝 Commits (1) - [`8af6df8`](https://github.com/horizon-rust/horizon/commit/8af6df80ba4523a6c0f1a0d66ed745882d38b8e2) rest-021: the chat key reader is ported ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-021.tsv` (+1 -1) </details> ### 📄 Description `Crypt.byteToPrivateKey` read `missing` for behaviour main has: the account chat key pair's private key is decoded and read as `PKCS8EncodedKeySpec`. - `Crypt.byteToPrivateKey` — "PKCS#8 private key reader for the account chat key pair; Horizon has none". `crates/horizon-protocol/src/rsa.rs::RsaPrivateKey::from_der` is that reader (doc: "PKCS8EncodedKeySpec: PrivateKeyInfo { version, AlgorithmIdentifier, OCTET STRING RSAPrivateKey }. A bare PKCS#1 RSAPrivateKey is read too"), and `crates/horizon-client-render/src/auth.rs::parse_certificates` runs it over the certificates endpoint's `keyPair.privateKey` once `pem_der` has stripped the armour and base64-decoded it. **Proven:** - `python3 tools/port_ledger.py map-check tools/port_map/rest-021.tsv`, after `python3 tools/port_ledger.py build --jar /data/home/horizon/.local/minecraft/26.3/jars/server.jar`, run once the build VM came back (it was in cooldown when this opened) → `135 rows, no problems.` - `javap -p -c -constants` on `net.minecraft.util.Crypt.byteToPrivateKey(byte[])` → `new PKCS8EncodedKeySpec(bytes)`, then `KeyFactory.getInstance("RSA").generatePrivate(spec)`, any exception wrapped in `CryptException`; `crates/horizon-protocol/src/rsa.rs:555` (`pub fn from_der(der_bytes: &[u8])`) parses the PrivateKeyInfo wrapper, its RSA `AlgorithmIdentifier` and the inner `RSAPrivateKey`, and falls back to a bare PKCS#1 key, erroring on anything else. - `grep -n 'RsaPrivateKey::from_der' crates/horizon-client-render/src/auth.rs` → `386`, inside `parse_certificates` (`PEM` → `pem_der` → `from_der`, and the public key must be the private key's other half). **Not proven:** - I did not run the game: no certificates-endpoint fetch was exercised. - `Crypt.rsaPublicKeyToString` and `Crypt.pemRsaPrivateKeyToString` stay `missing`: no `-----BEGIN RSA …-----` header and no PEM writer anywhere under `crates/`; `auth.rs::pem_der` only reads. - The eleven `Ease.*` rows stay `missing`: `crates/horizon-optifine/src/cem/curves.rs` carries the easings.net curves for CEM (`ease`/`easeIn*` functions of OptiFine's registry), not vanilla's `EasingType` one, and the timeline loader (`environment.rs`) matches `constant` and `cubic_bezier` only, so no named vanilla easing is reachable. - `EasingType.CubicBezierControls.validate` stays `missing`: the control points are taken as parsed with no `[0;1]` test, where `javap` shows `x1`/`x2` refusals ("x1 must be in range [0; 1]"). - `FormattedCharSequence.decorateOutput` stays `missing`: `grep -rl decorateOutput` over the 26.3 classes hits only `FormattedCharSequence` itself and `FunctionCommand`'s unrelated `decorateOutputIfNeeded`, and Horizon's bidi pass reorders and mirrors characters directly rather than wrapping a sink. - I read no row outside the ones above against the tree, so the rest of the file's verdicts are unchanged and unchecked here beyond what `map-check` resolves. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:36:47 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7268
No description provided.