From 179b66ec2266200a86c0ed6e3404327bb1a29229 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Tue, 11 Nov 2025 00:10:24 -0800 Subject: [PATCH 1/2] kryoptic: init at 1.3.1 --- pkgs/by-name/kr/kryoptic/cargo-lock.patch | 1108 +++++++++++++++++++++ pkgs/by-name/kr/kryoptic/package.nix | 85 ++ 2 files changed, 1193 insertions(+) create mode 100644 pkgs/by-name/kr/kryoptic/cargo-lock.patch create mode 100644 pkgs/by-name/kr/kryoptic/package.nix diff --git a/pkgs/by-name/kr/kryoptic/cargo-lock.patch b/pkgs/by-name/kr/kryoptic/cargo-lock.patch new file mode 100644 index 000000000000..54265aa2955d --- /dev/null +++ b/pkgs/by-name/kr/kryoptic/cargo-lock.patch @@ -0,0 +1,1108 @@ +From 5386104b9b4bffa044587a9ab573c8ed24a0bab2 Mon Sep 17 00:00:00 2001 +From: Morgan Jones +Date: Mon, 10 Nov 2025 23:25:00 -0800 +Subject: [PATCH] Add Cargo.lock + +--- + Cargo.lock | 1089 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 1089 insertions(+) + create mode 100644 Cargo.lock + +diff --git a/Cargo.lock b/Cargo.lock +new file mode 100644 +index 0000000..a4a3c6e +--- /dev/null ++++ b/Cargo.lock +@@ -0,0 +1,1089 @@ ++# This file is automatically @generated by Cargo. ++# It is not intended for manual editing. ++version = 4 ++ ++[[package]] ++name = "ahash" ++version = "0.8.12" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" ++dependencies = [ ++ "cfg-if", ++ "once_cell", ++ "version_check", ++ "zerocopy", ++] ++ ++[[package]] ++name = "aho-corasick" ++version = "1.1.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" ++dependencies = [ ++ "memchr", ++] ++ ++[[package]] ++name = "anstyle" ++version = "1.0.13" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" ++ ++[[package]] ++name = "asn1" ++version = "0.21.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2d9c3502a6f1b50a2c69b97b71638a81ad3b21b9874604880401b9b2b0bf758f" ++dependencies = [ ++ "asn1_derive", ++ "itoa", ++] ++ ++[[package]] ++name = "asn1_derive" ++version = "0.21.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1766ebcb519d8dd186d60dfa912571edcaa2c1f995e2e56643a261a87df69a61" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "autocfg" ++version = "1.5.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" ++ ++[[package]] ++name = "bimap" ++version = "0.6.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" ++ ++[[package]] ++name = "bindgen" ++version = "0.71.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" ++dependencies = [ ++ "bitflags 2.10.0", ++ "cexpr", ++ "clang-sys", ++ "itertools 0.13.0", ++ "log", ++ "prettyplease", ++ "proc-macro2", ++ "quote", ++ "regex", ++ "rustc-hash", ++ "shlex", ++ "syn", ++] ++ ++[[package]] ++name = "bitflags" ++version = "1.3.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" ++ ++[[package]] ++name = "bitflags" ++version = "2.10.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" ++ ++[[package]] ++name = "bumpalo" ++version = "3.19.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" ++ ++[[package]] ++name = "cc" ++version = "1.2.45" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" ++dependencies = [ ++ "find-msvc-tools", ++ "shlex", ++] ++ ++[[package]] ++name = "cexpr" ++version = "0.6.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" ++dependencies = [ ++ "nom", ++] ++ ++[[package]] ++name = "cfg-if" ++version = "1.0.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" ++ ++[[package]] ++name = "clang-sys" ++version = "1.8.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" ++dependencies = [ ++ "glob", ++ "libc", ++ "libloading", ++] ++ ++[[package]] ++name = "clap" ++version = "4.5.51" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" ++dependencies = [ ++ "clap_builder", ++ "clap_derive", ++] ++ ++[[package]] ++name = "clap_builder" ++version = "4.5.51" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" ++dependencies = [ ++ "anstyle", ++ "clap_lex", ++] ++ ++[[package]] ++name = "clap_derive" ++version = "4.5.49" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" ++dependencies = [ ++ "heck", ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "clap_lex" ++version = "0.7.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" ++ ++[[package]] ++name = "constant_time_eq" ++version = "0.3.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" ++ ++[[package]] ++name = "cryptoki" ++version = "0.10.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "781357a7779a8e92ea985121bbf379a9adf0777f44ab6392efc6abd5aa9b67db" ++dependencies = [ ++ "bitflags 1.3.2", ++ "cryptoki-sys", ++ "libloading", ++ "log", ++ "paste", ++ "secrecy", ++] ++ ++[[package]] ++name = "cryptoki-sys" ++version = "0.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "753e27d860277930ae9f394c119c8c70303236aab0ffab1d51f3d207dbb2bc4b" ++dependencies = [ ++ "libloading", ++] ++ ++[[package]] ++name = "data-encoding" ++version = "2.9.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" ++ ++[[package]] ++name = "deranged" ++version = "0.5.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" ++dependencies = [ ++ "powerfmt", ++] ++ ++[[package]] ++name = "either" ++version = "1.15.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" ++ ++[[package]] ++name = "fallible-iterator" ++version = "0.3.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" ++ ++[[package]] ++name = "fallible-streaming-iterator" ++version = "0.1.9" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" ++ ++[[package]] ++name = "find-msvc-tools" ++version = "0.1.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" ++ ++[[package]] ++name = "futures" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" ++dependencies = [ ++ "futures-channel", ++ "futures-core", ++ "futures-executor", ++ "futures-io", ++ "futures-sink", ++ "futures-task", ++ "futures-util", ++] ++ ++[[package]] ++name = "futures-channel" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" ++dependencies = [ ++ "futures-core", ++ "futures-sink", ++] ++ ++[[package]] ++name = "futures-core" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" ++ ++[[package]] ++name = "futures-executor" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" ++dependencies = [ ++ "futures-core", ++ "futures-task", ++ "futures-util", ++] ++ ++[[package]] ++name = "futures-io" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" ++ ++[[package]] ++name = "futures-sink" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" ++ ++[[package]] ++name = "futures-task" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" ++ ++[[package]] ++name = "futures-util" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" ++dependencies = [ ++ "futures-channel", ++ "futures-core", ++ "futures-io", ++ "futures-sink", ++ "futures-task", ++ "memchr", ++ "pin-project-lite", ++ "pin-utils", ++ "slab", ++] ++ ++[[package]] ++name = "getrandom" ++version = "0.3.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" ++dependencies = [ ++ "cfg-if", ++ "libc", ++ "r-efi", ++ "wasip2", ++] ++ ++[[package]] ++name = "glob" ++version = "0.3.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" ++ ++[[package]] ++name = "hashbrown" ++version = "0.14.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" ++dependencies = [ ++ "ahash", ++] ++ ++[[package]] ++name = "hashlink" ++version = "0.9.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" ++dependencies = [ ++ "hashbrown", ++] ++ ++[[package]] ++name = "heck" ++version = "0.5.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" ++ ++[[package]] ++name = "hex" ++version = "0.4.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" ++ ++[[package]] ++name = "itertools" ++version = "0.13.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" ++dependencies = [ ++ "either", ++] ++ ++[[package]] ++name = "itertools" ++version = "0.14.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" ++dependencies = [ ++ "either", ++] ++ ++[[package]] ++name = "itoa" ++version = "1.0.15" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" ++ ++[[package]] ++name = "js-sys" ++version = "0.3.82" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" ++dependencies = [ ++ "once_cell", ++ "wasm-bindgen", ++] ++ ++[[package]] ++name = "kryoptic" ++version = "1.3.1" ++dependencies = [ ++ "kryoptic-lib", ++ "ossl", ++] ++ ++[[package]] ++name = "kryoptic-lib" ++version = "1.3.1" ++dependencies = [ ++ "asn1", ++ "bimap", ++ "bindgen", ++ "bitflags 2.10.0", ++ "constant_time_eq", ++ "data-encoding", ++ "hex", ++ "itertools 0.14.0", ++ "libc", ++ "log", ++ "num-bigint", ++ "num-integer", ++ "num-traits", ++ "ossl", ++ "rusqlite", ++ "serde", ++ "serde_json", ++ "serial_test", ++ "simplelog", ++ "toml", ++ "uuid", ++] ++ ++[[package]] ++name = "kryoptic-tools" ++version = "1.3.1" ++dependencies = [ ++ "clap", ++ "cryptoki", ++ "hex", ++ "kryoptic-lib", ++ "libc", ++ "quick-xml", ++ "serde", ++ "serde_json", ++] ++ ++[[package]] ++name = "libc" ++version = "0.2.177" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" ++ ++[[package]] ++name = "libloading" ++version = "0.8.9" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" ++dependencies = [ ++ "cfg-if", ++ "windows-link", ++] ++ ++[[package]] ++name = "libsqlite3-sys" ++version = "0.28.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" ++dependencies = [ ++ "cc", ++ "pkg-config", ++ "vcpkg", ++] ++ ++[[package]] ++name = "lock_api" ++version = "0.4.14" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" ++dependencies = [ ++ "scopeguard", ++] ++ ++[[package]] ++name = "log" ++version = "0.4.28" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" ++ ++[[package]] ++name = "memchr" ++version = "2.7.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" ++ ++[[package]] ++name = "minimal-lexical" ++version = "0.2.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" ++ ++[[package]] ++name = "nom" ++version = "7.1.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" ++dependencies = [ ++ "memchr", ++ "minimal-lexical", ++] ++ ++[[package]] ++name = "num-bigint" ++version = "0.4.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" ++dependencies = [ ++ "num-integer", ++ "num-traits", ++] ++ ++[[package]] ++name = "num-conv" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" ++ ++[[package]] ++name = "num-integer" ++version = "0.1.46" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" ++dependencies = [ ++ "num-traits", ++] ++ ++[[package]] ++name = "num-traits" ++version = "0.2.19" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" ++dependencies = [ ++ "autocfg", ++] ++ ++[[package]] ++name = "once_cell" ++version = "1.21.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" ++ ++[[package]] ++name = "ossl" ++version = "1.3.1" ++dependencies = [ ++ "bindgen", ++ "cfg-if", ++ "getrandom", ++ "hex", ++ "libc", ++ "log", ++ "pkg-config", ++ "serial_test", ++ "vsprintf", ++] ++ ++[[package]] ++name = "parking_lot" ++version = "0.12.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" ++dependencies = [ ++ "lock_api", ++ "parking_lot_core", ++] ++ ++[[package]] ++name = "parking_lot_core" ++version = "0.9.12" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" ++dependencies = [ ++ "cfg-if", ++ "libc", ++ "redox_syscall", ++ "smallvec", ++ "windows-link", ++] ++ ++[[package]] ++name = "paste" ++version = "1.0.15" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" ++ ++[[package]] ++name = "pin-project-lite" ++version = "0.2.16" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" ++ ++[[package]] ++name = "pin-utils" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" ++ ++[[package]] ++name = "pkg-config" ++version = "0.3.32" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" ++ ++[[package]] ++name = "powerfmt" ++version = "0.2.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" ++ ++[[package]] ++name = "prettyplease" ++version = "0.2.37" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" ++dependencies = [ ++ "proc-macro2", ++ "syn", ++] ++ ++[[package]] ++name = "proc-macro2" ++version = "1.0.103" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" ++dependencies = [ ++ "unicode-ident", ++] ++ ++[[package]] ++name = "quick-xml" ++version = "0.38.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" ++dependencies = [ ++ "memchr", ++ "serde", ++] ++ ++[[package]] ++name = "quote" ++version = "1.0.42" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" ++dependencies = [ ++ "proc-macro2", ++] ++ ++[[package]] ++name = "r-efi" ++version = "5.3.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" ++ ++[[package]] ++name = "redox_syscall" ++version = "0.5.18" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" ++dependencies = [ ++ "bitflags 2.10.0", ++] ++ ++[[package]] ++name = "regex" ++version = "1.12.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" ++dependencies = [ ++ "aho-corasick", ++ "memchr", ++ "regex-automata", ++ "regex-syntax", ++] ++ ++[[package]] ++name = "regex-automata" ++version = "0.4.13" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" ++dependencies = [ ++ "aho-corasick", ++ "memchr", ++ "regex-syntax", ++] ++ ++[[package]] ++name = "regex-syntax" ++version = "0.8.8" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" ++ ++[[package]] ++name = "rusqlite" ++version = "0.31.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" ++dependencies = [ ++ "bitflags 2.10.0", ++ "fallible-iterator", ++ "fallible-streaming-iterator", ++ "hashlink", ++ "libsqlite3-sys", ++ "smallvec", ++] ++ ++[[package]] ++name = "rustc-hash" ++version = "2.1.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" ++ ++[[package]] ++name = "rustversion" ++version = "1.0.22" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" ++ ++[[package]] ++name = "ryu" ++version = "1.0.20" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" ++ ++[[package]] ++name = "scc" ++version = "2.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "46e6f046b7fef48e2660c57ed794263155d713de679057f2d0c169bfc6e756cc" ++dependencies = [ ++ "sdd", ++] ++ ++[[package]] ++name = "scopeguard" ++version = "1.2.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" ++ ++[[package]] ++name = "sdd" ++version = "3.0.10" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" ++ ++[[package]] ++name = "secrecy" ++version = "0.8.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" ++dependencies = [ ++ "zeroize", ++] ++ ++[[package]] ++name = "serde" ++version = "1.0.228" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" ++dependencies = [ ++ "serde_core", ++ "serde_derive", ++] ++ ++[[package]] ++name = "serde_core" ++version = "1.0.228" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" ++dependencies = [ ++ "serde_derive", ++] ++ ++[[package]] ++name = "serde_derive" ++version = "1.0.228" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "serde_json" ++version = "1.0.145" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" ++dependencies = [ ++ "itoa", ++ "memchr", ++ "ryu", ++ "serde", ++ "serde_core", ++] ++ ++[[package]] ++name = "serde_spanned" ++version = "1.0.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" ++dependencies = [ ++ "serde_core", ++] ++ ++[[package]] ++name = "serial_test" ++version = "3.2.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1b258109f244e1d6891bf1053a55d63a5cd4f8f4c30cf9a1280989f80e7a1fa9" ++dependencies = [ ++ "futures", ++ "log", ++ "once_cell", ++ "parking_lot", ++ "scc", ++ "serial_test_derive", ++] ++ ++[[package]] ++name = "serial_test_derive" ++version = "3.2.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "shlex" ++version = "1.3.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" ++ ++[[package]] ++name = "simplelog" ++version = "0.12.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "16257adbfaef1ee58b1363bdc0664c9b8e1e30aed86049635fb5f147d065a9c0" ++dependencies = [ ++ "log", ++ "time", ++] ++ ++[[package]] ++name = "slab" ++version = "0.4.11" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" ++ ++[[package]] ++name = "smallvec" ++version = "1.15.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" ++ ++[[package]] ++name = "syn" ++version = "2.0.110" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "unicode-ident", ++] ++ ++[[package]] ++name = "time" ++version = "0.3.44" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" ++dependencies = [ ++ "deranged", ++ "itoa", ++ "num-conv", ++ "powerfmt", ++ "serde", ++ "time-core", ++ "time-macros", ++] ++ ++[[package]] ++name = "time-core" ++version = "0.1.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" ++ ++[[package]] ++name = "time-macros" ++version = "0.2.24" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" ++dependencies = [ ++ "num-conv", ++ "time-core", ++] ++ ++[[package]] ++name = "toml" ++version = "0.9.8" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" ++dependencies = [ ++ "serde_core", ++ "serde_spanned", ++ "toml_datetime", ++ "toml_parser", ++ "toml_writer", ++ "winnow", ++] ++ ++[[package]] ++name = "toml_datetime" ++version = "0.7.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" ++dependencies = [ ++ "serde_core", ++] ++ ++[[package]] ++name = "toml_parser" ++version = "1.0.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" ++dependencies = [ ++ "winnow", ++] ++ ++[[package]] ++name = "toml_writer" ++version = "1.0.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" ++ ++[[package]] ++name = "unicode-ident" ++version = "1.0.22" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" ++ ++[[package]] ++name = "uuid" ++version = "1.18.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" ++dependencies = [ ++ "getrandom", ++ "js-sys", ++ "wasm-bindgen", ++] ++ ++[[package]] ++name = "vcpkg" ++version = "0.2.15" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" ++ ++[[package]] ++name = "version_check" ++version = "0.9.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" ++ ++[[package]] ++name = "vsprintf" ++version = "2.0.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "aec2f81b75ca063294776b4f7e8da71d1d5ae81c2b1b149c8d89969230265d63" ++dependencies = [ ++ "cc", ++ "libc", ++] ++ ++[[package]] ++name = "wasip2" ++version = "1.0.1+wasi-0.2.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" ++dependencies = [ ++ "wit-bindgen", ++] ++ ++[[package]] ++name = "wasm-bindgen" ++version = "0.2.105" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" ++dependencies = [ ++ "cfg-if", ++ "once_cell", ++ "rustversion", ++ "wasm-bindgen-macro", ++ "wasm-bindgen-shared", ++] ++ ++[[package]] ++name = "wasm-bindgen-macro" ++version = "0.2.105" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" ++dependencies = [ ++ "quote", ++ "wasm-bindgen-macro-support", ++] ++ ++[[package]] ++name = "wasm-bindgen-macro-support" ++version = "0.2.105" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" ++dependencies = [ ++ "bumpalo", ++ "proc-macro2", ++ "quote", ++ "syn", ++ "wasm-bindgen-shared", ++] ++ ++[[package]] ++name = "wasm-bindgen-shared" ++version = "0.2.105" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" ++dependencies = [ ++ "unicode-ident", ++] ++ ++[[package]] ++name = "windows-link" ++version = "0.2.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" ++ ++[[package]] ++name = "winnow" ++version = "0.7.13" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" ++ ++[[package]] ++name = "wit-bindgen" ++version = "0.46.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" ++ ++[[package]] ++name = "zerocopy" ++version = "0.8.27" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" ++dependencies = [ ++ "zerocopy-derive", ++] ++ ++[[package]] ++name = "zerocopy-derive" ++version = "0.8.27" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "zeroize" ++version = "1.8.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +-- +2.50.1 + diff --git a/pkgs/by-name/kr/kryoptic/package.nix b/pkgs/by-name/kr/kryoptic/package.nix new file mode 100644 index 000000000000..b18fc723e570 --- /dev/null +++ b/pkgs/by-name/kr/kryoptic/package.nix @@ -0,0 +1,85 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + nix-update-script, + clang, + glibc, + openssl, + pkg-config, + sqlite, + fips ? false, +}: + +rustPlatform.buildRustPackage (finalPackage: { + pname = "kryoptic"; + version = "1.3.1"; + + src = fetchFromGitHub { + owner = "latchset"; + repo = "kryoptic"; + tag = "v${finalPackage.version}"; + hash = "sha256-EzWZQLAtO7ZR28aOSfwXQOyHbL8Ss75dCxVnPkJIEbw="; + }; + + postPatch = + let + # Creates an -I command line for overriding an include. + inc = name: ''format!("-I{}", env!("${name}_INCLUDE")).as_str()''; + fipsArgs = lib.optionalString fips ''"-D_KRYOPTIC_FIPS"''; + in + '' + substituteInPlace ossl/build.rs \ + --replace-fail 'ossl_bindings(&["-std=c90"], out_file)' 'ossl_bindings(&["-std=c90", ${inc "OPENSSL"}, ${inc "LIBC"}, ${fipsArgs}], out_file)' + ''; + + env = { + # Pass these include paths for bindgen in via the environment. + OPENSSL_INCLUDE = "${lib.getInclude openssl}/include"; + LIBC_INCLUDE = "${lib.getInclude glibc}/include"; + LIBCLANG_PATH = "${lib.getLib clang.cc}/lib"; + }; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ + openssl + sqlite + ]; + + cargoPatches = [ ./cargo-lock.patch ]; + + cargoHash = "sha256-NWtL1ZzxGqTn8SS4XitOYJvGRYA/j52f14oul4ZPoyw="; + + cargoBuildFlags = [ + "--no-default-features" + "--features=${ + lib.concatStringsSep "," ( + [ + (if fips then "fips" else "standard") + "dynamic" # dynamic linking + "sqlitedb" + "nssdb" + "log" + ] + ++ lib.optionals (!fips) [ + "pqc" # post-quantum + ] + ) + }" + ]; + + doCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "A PKCS#11 soft token written in Rust."; + homepage = "https://github.com/latchset/kryoptic"; + maintainers = with lib.maintainers; [ + numinit + ]; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.all; + }; +}) From fb74b741f82bb88b481262f7c849cadb117d505a Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Tue, 11 Nov 2025 00:52:11 -0800 Subject: [PATCH 2/2] pkcs11-provider: enable entire test suite We can now test using both Kryoptic (a Rust PKCS#11 software token implementation) and SoftHSM. --- pkgs/by-name/pk/pkcs11-provider/package.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/pk/pkcs11-provider/package.nix b/pkgs/by-name/pk/pkcs11-provider/package.nix index 975bb04bbf4d..a19126f0f492 100644 --- a/pkgs/by-name/pk/pkcs11-provider/package.nix +++ b/pkgs/by-name/pk/pkcs11-provider/package.nix @@ -6,6 +6,8 @@ nss, p11-kit, opensc, + softhsm, + kryoptic, gnutls, expect, which, @@ -44,10 +46,11 @@ stdenv.mkDerivation rec { which ]; - # don't add SoftHSM to here: https://github.com/openssl/openssl/issues/22508 nativeCheckInputs = [ p11-kit.bin opensc + softhsm + kryoptic nss.tools gnutls openssl.bin @@ -56,8 +59,16 @@ stdenv.mkDerivation rec { pkcs11ProviderPython3 ]; + env = { + KRYOPTIC = "${lib.getLib kryoptic}/lib"; + }; + + # Fix a typo in the Kryoptic test (remove this in v1.2). postPatch = '' patchShebangs --build . + substituteInPlace tests/kryoptic-init.sh \ + --replace-fail /usr/local/lib/kryoptic "\\''${KRYOPTIC}" \ + --replace-fail "libkryoptic_pkcs11so" libkryoptic_pkcs11.so ''; preInstall = ''