From 07e167186751d7753759d1808e032c93829b8d52 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sat, 27 Sep 2025 16:56:05 +0800 Subject: [PATCH] feat: v1.13.20, fix incomp with future compiler --- Cargo.lock | 152 +++++++++------------------------------- Cargo.toml | 4 +- src/cmd_ssh_parse.rs | 4 +- src/cmd_ssh_piv_cert.rs | 8 +-- 4 files changed, 42 insertions(+), 126 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ae8788..0bbd572 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -149,12 +149,6 @@ dependencies = [ "password-hash", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "ascii-canvas" version = "3.0.0" @@ -173,9 +167,9 @@ dependencies = [ "asn1-rs-derive 0.4.0", "asn1-rs-impl 0.1.0", "displaydoc", - "nom 7.1.3", + "nom", "num-traits", - "rusticata-macros 4.1.0", + "rusticata-macros", "thiserror 1.0.69", "time 0.3.44", ] @@ -189,9 +183,9 @@ dependencies = [ "asn1-rs-derive 0.6.0", "asn1-rs-impl 0.2.0", "displaydoc", - "nom 7.1.3", + "nom", "num-traits", - "rusticata-macros 4.1.0", + "rusticata-macros", "thiserror 2.0.16", "time 0.3.44", ] @@ -441,18 +435,6 @@ version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" -[[package]] -name = "bitvec" -version = "0.19.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "blake2" version = "0.10.6" @@ -593,7 +575,7 @@ dependencies = [ [[package]] name = "card-cli" -version = "1.13.19" +version = "1.13.20" dependencies = [ "aes-gcm-stream", "authenticator 0.3.1", @@ -639,7 +621,7 @@ dependencies = [ "ssh-agent-lib", "ssh-encoding", "ssh-key", - "sshcerts", + "sshcerts-hatter-fork", "swift-secure-enclave-tool-rs", "tabled", "tokio 1.47.1", @@ -668,7 +650,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -980,11 +962,10 @@ dependencies = [ [[package]] name = "der-oid-macro" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4cccf60bb98c0fca115a581f894aed0e43fa55bf289fdac5599bec440bb4fd6" +checksum = "c73af209b6a5dc8ca7cbaba720732304792cddc933cfea3d74509c2b1ef2f436" dependencies = [ - "nom 6.1.2", "num-bigint", "num-traits", "syn 1.0.109", @@ -992,14 +973,14 @@ dependencies = [ [[package]] name = "der-parser" -version = "5.1.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7ededb7525bb4114bc209685ce7894edc2965f4914312a1ea578a645a237f0" +checksum = "4cddf120f700b411b2b02ebeb7f04dc0b7c8835909a6c2f52bf72ed0dd3433b2" dependencies = [ "der-oid-macro", - "nom 6.1.2", + "nom", "num-traits", - "rusticata-macros 3.2.0", + "rusticata-macros", ] [[package]] @@ -1010,10 +991,10 @@ checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ "asn1-rs 0.5.2", "displaydoc", - "nom 7.1.3", + "nom", "num-bigint", "num-traits", - "rusticata-macros 4.1.0", + "rusticata-macros", ] [[package]] @@ -1024,10 +1005,10 @@ checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" dependencies = [ "asn1-rs 0.7.1", "displaydoc", - "nom 7.1.3", + "nom", "num-bigint", "num-traits", - "rusticata-macros 4.1.0", + "rusticata-macros", ] [[package]] @@ -1066,7 +1047,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9313f104b590510b46fc01c0a324fc76505c13871454d3c48490468d04c8d395" dependencies = [ "libc", - "nom 7.1.3", + "nom", ] [[package]] @@ -1409,12 +1390,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "futures" version = "0.1.31" @@ -2151,19 +2126,6 @@ dependencies = [ "spin 0.9.8", ] -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec", - "bitflags 1.3.2", - "cfg-if 1.0.3", - "ryu", - "static_assertions", -] - [[package]] name = "libc" version = "0.2.176" @@ -2461,19 +2423,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" -[[package]] -name = "nom" -version = "6.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" -dependencies = [ - "bitvec", - "funty", - "lexical-core", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.3" @@ -2613,7 +2562,7 @@ dependencies = [ "chrono", "hex-slice", "log", - "nom 7.1.3", + "nom", "thiserror 1.0.69", ] @@ -2627,7 +2576,7 @@ dependencies = [ "chrono", "hex-slice", "log", - "nom 7.1.3", + "nom", "thiserror 1.0.69", ] @@ -2954,7 +2903,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ecb857a7b11a03e8872c704d0a1ae1efc20533b3be98338008527a1928ffa6" dependencies = [ "log", - "nom 7.1.3", + "nom", "percent-encoding", "secrecy 0.10.3", "which 4.4.2", @@ -3149,12 +3098,6 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - [[package]] name = "rand" version = "0.7.3" @@ -3537,22 +3480,13 @@ dependencies = [ "semver 1.0.27", ] -[[package]] -name = "rusticata-macros" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbee512c633ecabd4481c40111b6ded03ddd9ab10ba6caa5a74e14c889921ad" -dependencies = [ - "nom 6.1.2", -] - [[package]] name = "rusticata-macros" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -4155,10 +4089,10 @@ dependencies = [ ] [[package]] -name = "sshcerts" -version = "0.14.0" +name = "sshcerts-hatter-fork" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86255551f89d85d725a8aa6c795e87f582c4a152563defec247f76600416ee" +checksum = "35019ff8e5bf5b636e353ee5f4717d90df4e70398ca1107a85f37576cecc4d94" dependencies = [ "aes 0.7.5", "authenticator 0.4.1", @@ -4166,7 +4100,7 @@ dependencies = [ "bcrypt-pbkdf", "chrono", "ctr", - "der-parser 5.1.2", + "der-parser 6.0.1", "minicbor", "num-bigint", "rcgen", @@ -4184,12 +4118,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "string_cache" version = "0.8.9" @@ -4344,12 +4272,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tempfile" version = "3.23.0" @@ -5430,12 +5352,6 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "x509" version = "0.2.0" @@ -5471,9 +5387,9 @@ dependencies = [ "data-encoding", "der-parser 8.2.0", "lazy_static", - "nom 7.1.3", + "nom", "oid-registry 0.6.1", - "rusticata-macros 4.1.0", + "rusticata-macros", "thiserror 1.0.69", "time 0.3.44", ] @@ -5488,10 +5404,10 @@ dependencies = [ "data-encoding", "der-parser 8.2.0", "lazy_static", - "nom 7.1.3", + "nom", "oid-registry 0.6.1", "ring 0.16.20", - "rusticata-macros 4.1.0", + "rusticata-macros", "thiserror 1.0.69", "time 0.3.44", ] @@ -5506,10 +5422,10 @@ dependencies = [ "data-encoding", "der-parser 10.0.0", "lazy_static", - "nom 7.1.3", + "nom", "oid-registry 0.8.1", "ring 0.17.14", - "rusticata-macros 4.1.0", + "rusticata-macros", "thiserror 2.0.16", "time 0.3.44", ] @@ -5583,7 +5499,7 @@ dependencies = [ "elliptic-curve 0.12.3", "hmac 0.12.1", "log", - "nom 7.1.3", + "nom", "num-bigint-dig", "num-integer", "num-traits", @@ -5616,7 +5532,7 @@ dependencies = [ "elliptic-curve 0.13.8", "hmac 0.12.1", "log", - "nom 7.1.3", + "nom", "num-bigint-dig", "num-integer", "num-traits", diff --git a/Cargo.toml b/Cargo.toml index 3fb466f..8593394 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "card-cli" -version = "1.13.19" +version = "1.13.20" authors = ["Hatter Jiang "] edition = "2018" @@ -52,7 +52,7 @@ pinentry = "0.6" rpassword = "7.3" secrecy = "0.10" der-parser = "10.0" -sshcerts = "0.14" +sshcerts-hatter-fork = "0.14.1" regex = "1.11" aes-gcm-stream = "0.2" swift-secure-enclave-tool-rs = "1.0" diff --git a/src/cmd_ssh_parse.rs b/src/cmd_ssh_parse.rs index 642d289..d863692 100644 --- a/src/cmd_ssh_parse.rs +++ b/src/cmd_ssh_parse.rs @@ -1,7 +1,7 @@ use clap::{App, Arg, ArgMatches, SubCommand}; use rust_util::util_clap::{Command, CommandError}; -use sshcerts::ssh::PublicKeyKind; -use sshcerts::{Certificate, PrivateKey, PublicKey}; +use sshcerts_hatter_fork::ssh::PublicKeyKind; +use sshcerts_hatter_fork::{Certificate, PrivateKey, PublicKey}; use std::fs; pub struct CommandImpl; diff --git a/src/cmd_ssh_piv_cert.rs b/src/cmd_ssh_piv_cert.rs index 8281226..4495066 100644 --- a/src/cmd_ssh_piv_cert.rs +++ b/src/cmd_ssh_piv_cert.rs @@ -3,10 +3,10 @@ use ecdsa::elliptic_curve::pkcs8::der::Encode; use rand::random; use rust_util::util_clap::{Command, CommandError}; use rust_util::{util_time, XResult}; -use sshcerts::ssh::{CurveKind, PublicKeyKind, SSHCertificateSigner}; -use sshcerts::utils::format_signature_for_ssh; -use sshcerts::x509::extract_ssh_pubkey_from_x509_certificate; -use sshcerts::{CertType, Certificate, PublicKey}; +use sshcerts_hatter_fork::ssh::{CurveKind, PublicKeyKind, SSHCertificateSigner}; +use sshcerts_hatter_fork::utils::format_signature_for_ssh; +use sshcerts_hatter_fork::x509::extract_ssh_pubkey_from_x509_certificate; +use sshcerts_hatter_fork::{CertType, Certificate, PublicKey}; use std::fs; use std::sync::Mutex; use std::time::SystemTime;