Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: Add tool to generate platrform id certs from CSRs. #193

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 43 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"dice-cert-tmpl",
"dice-mfg",
"dice-mfg-msgs",
"platform-id-certgen",
"yhsm-audit",
"verifier-cli",
]
Expand All @@ -21,12 +22,14 @@ derive_more = "0.99"
ecdsa = { version = "0.16", default-features = false }
ed25519-dalek = { version = "2.1", default-features = false }
env_logger = { version = "0.11", default-features = false }
flagset = "0.4.4"
getrandom = "0.2.12"
hex.version = "0.4"
hubpack = "0.1"
log = { version = "0.4", features = ["std"] }
p384 = { version = "0.13", default-features = false }
pem-rfc7468 = { version = "0.7.0", default-features = false }
pkcs8 = { version = "0.10.2", default-features = false }
ron = "0.8"
rpassword = "7.3.1"
salty = { version = "0.3", default-features = false }
Expand All @@ -35,6 +38,7 @@ serde-big-array = "0.5"
serde_json = { version = "1", features = ["std", "alloc"] }
serde_with = { version = "3.6", default-features = false }
serialport = { git = "https://github.com/jgallagher/serialport-rs", branch = "illumos-support" }
sha1 = "0.10.6"
sha2 = "0.10"
sha3 = { version = "0.10", default-features = false }
string-error = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion dice-mfg-msgs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ fn validate_pdv1(s: &str) -> Result<(), PlatformIdError> {
validate_0xv2_noprefix(s)
}

fn validate_pdv2(s: &str) -> Result<(), PlatformIdError> {
pub fn validate_pdv2(s: &str) -> Result<(), PlatformIdError> {
if s.len() != PLATFORM_ID_V2_LEN {
return Err(PlatformIdError::BadSize);
}
Expand Down
22 changes: 22 additions & 0 deletions platform-id-certgen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "platform-id-certgen"
version = "0.1.0"
edition = "2021"
description = "prototype to generate platform identity certs"
license = "MPL-2.0"

[dependencies]
anyhow = { workspace = true, features = ["std"] }
clap.workspace = true
clap-verbosity-flag = "2.2"
const-oid = { workspace = true, features = ["db"] }
dice-mfg-msgs.path = "../dice-mfg-msgs"
ed25519-dalek = { workspace = true, features = ["std"] }
env_logger.workspace = true
flagset.workspace = true
getrandom.workspace = true
log.workspace = true
p384.workspace = true
pkcs8 = { workspace = true, features = ["alloc", "pem", "std"] }
sha1.workspace = true
x509-cert = { workspace = true, features = ["pem", "std"] }
Loading
Loading