From f930dc1c45ae0729bbff13b4c59e800e895f66d8 Mon Sep 17 00:00:00 2001 From: DGonzalezVillal Date: Wed, 6 Nov 2024 21:53:22 +0000 Subject: [PATCH] Adding from PEM stack for CA chain functionality and caching turin certs Turin certs are a different size from previous generation certificates. Adding those certs to our cert cache. When requesting certificates from the KDS, those certificates will come as a pem stack. Adding the ability to generate a ca Chain from a pem stack, that way cert size is not a concern. Also adding testing for this new functionality. Signed-off-by: DGonzalezVillal --- src/certs/snp/builtin/mod.rs | 3 ++ src/certs/snp/builtin/turin/ark.pem | 37 ++++++++++++++ src/certs/snp/builtin/turin/ask.pem | 37 ++++++++++++++ src/certs/snp/builtin/turin/mod.rs | 40 +++++++++++++++ src/certs/snp/ca/mod.rs | 12 +++++ tests/certs.rs | 37 ++++++++++++++ tests/certs_data/cert_chain_milan | 74 ++++++++++++++++++++++++++++ tests/certs_data/cert_chain_turin | 74 ++++++++++++++++++++++++++++ tests/certs_data/vcek_turin.der | Bin 0 -> 1289 bytes 9 files changed, 314 insertions(+) create mode 100644 src/certs/snp/builtin/turin/ark.pem create mode 100644 src/certs/snp/builtin/turin/ask.pem create mode 100644 src/certs/snp/builtin/turin/mod.rs create mode 100644 tests/certs_data/cert_chain_milan create mode 100644 tests/certs_data/cert_chain_turin create mode 100644 tests/certs_data/vcek_turin.der diff --git a/src/certs/snp/builtin/mod.rs b/src/certs/snp/builtin/mod.rs index 503b711e..86411065 100644 --- a/src/certs/snp/builtin/mod.rs +++ b/src/certs/snp/builtin/mod.rs @@ -8,4 +8,7 @@ pub mod genoa; /// Milan generation. pub mod milan; +/// TURIN generation +pub mod turin; + use super::*; diff --git a/src/certs/snp/builtin/turin/ark.pem b/src/certs/snp/builtin/turin/ark.pem new file mode 100644 index 00000000..dc894918 --- /dev/null +++ b/src/certs/snp/builtin/turin/ark.pem @@ -0,0 +1,37 @@ +-----BEGIN CERTIFICATE----- +MIIGYzCCBBKgAwIBAgIDAwAAMEYGCSqGSIb3DQEBCjA5oA8wDQ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ZMJ4VgNKDgTQdcsAL0MCEMr +zpacMwFusA== +-----END CERTIFICATE----- diff --git a/src/certs/snp/builtin/turin/ask.pem b/src/certs/snp/builtin/turin/ask.pem new file mode 100644 index 00000000..ba57582a --- /dev/null +++ b/src/certs/snp/builtin/turin/ask.pem @@ -0,0 +1,37 @@ +-----BEGIN CERTIFICATE----- +MIIGiTCCBDigAwIBAgIDAwABMEYGCSqGSIb3DQEBCjA5oA8wDQYJYIZIAWUDBAIC +BQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWUDBAICBQCiAwIBMKMDAgEBMHsxFDAS +BgNVBAsMC0VuZ2luZWVyaW5nMQswCQYDVQQGEwJVUzEUMBIGA1UEBwwLU2FudGEg +Q2xhcmExCzAJBgNVBAgMAkNBMR8wHQYDVQQKDBZBZHZhbmNlZCBNaWNybyBEZXZp +Y2VzMRIwEAYDVQQDDAlBUkstVHVyaW4wHhcNMjMwNTE1MjAyNTIxWhcNNDgwNTE1 +MjAyNTIxWjB7MRQwEgYDVQQLDAtFbmdpbmVlcmluZzELMAkGA1UEBhMCVVMxFDAS +BgNVBAcMC1NhbnRhIENsYXJhMQswCQYDVQQIDAJDQTEfMB0GA1UECgwWQWR2YW5j +ZWQgTWljcm8gRGV2aWNlczESMBAGA1UEAwwJU0VWLVR1cmluMIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAnvg5Grv2Emd9lAhKdO64RXU3UESb6JTm0Hhz +evx1PyxinxYqJL329qTJM0XmdozLYb7rsHxgM5I2pU18M8gect2pN/YB2LQ1/bIq +37TPDbg7ym0MN6KkZ6aERxAX0voYtdDyNxjDAUjpRpCe1FccAev/Es2n/Fz1G1Tm +C2XepTQqaKpmt6mnDWSCHCVsQoY0gSibeaG6doM6OiNUCbKXaC7KHH5b/96BD1DJ +84M+JHqPClFhHqUJwzKF5Qxj4wgWAZzK8UPhiNGjrF6+TBdlFGdSzEqw1jOrCTHd +uYyLK+5OQ3OIw4S+vZeOVoxJajTI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BoFD63a +D5ZG/Qiz+tmhnptyPVcweC9uJlSWYm25KiV4lT52uBjxatDZKQcrpdgcU8+ozzKU +8ICnZPOwfWeyuNMq/juyd/rzg5IePyyvt+13aJ5MlZBXZxJKoxCYIMKUwZigf0Xs +BteT8gw10/xk5smIFIB2ERtTQPMuTENgrPTUjOeiqmBg663c2dLVol+MDiT4ltqf +Em4Kl/cc4f+H6bEwhj1QKAN2ipRf+mP0NfzJb+6ZHNsOvyq/WByYpLXV9JJoiDW/ +8RZwPU/Mn7IuQBauCy78G7FS0ta3q1et74faYBBgeJ6awEasa25CvmsmlU0R +-----END CERTIFICATE----- diff --git a/src/certs/snp/builtin/turin/mod.rs b/src/certs/snp/builtin/turin/mod.rs new file mode 100644 index 00000000..0aa03840 --- /dev/null +++ b/src/certs/snp/builtin/turin/mod.rs @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: Apache-2.0 + +use super::*; + +/// The public TURIN ARK certificate (PEM-encoded). +pub const ARK: &[u8] = include_bytes!("ark.pem"); + +/// The public TURIN ASK certificate (PEM-encoded). +pub const ASK: &[u8] = include_bytes!("ask.pem"); + +/// Get the TURIN ARK Certificate. +pub fn ark() -> Result { + Certificate::from_pem(ARK) +} + +/// Get the TURIN ASK Certificate. +pub fn ask() -> Result { + Certificate::from_pem(ASK) +} + +mod tests { + #[test] + fn ark_self_signed() { + use super::*; + + let ark = ark().unwrap(); + + (&ark, &ark).verify().unwrap(); + } + + #[test] + fn ark_signs_ask() { + use super::*; + + let ark = ark().unwrap(); + let ask = ask().unwrap(); + + (&ark, &ask).verify().unwrap(); + } +} diff --git a/src/certs/snp/ca/mod.rs b/src/certs/snp/ca/mod.rs index 43f981f3..637dad9b 100644 --- a/src/certs/snp/ca/mod.rs +++ b/src/certs/snp/ca/mod.rs @@ -118,6 +118,18 @@ impl Chain { ask: Certificate::from_der(ask)?, }) } + + #[cfg(feature = "openssl")] + /// Deserialize the certificates from a PEM stack to a CA chain. + pub fn from_pem_bytes(stack: &[u8]) -> Result { + let certificates = X509::stack_from_pem(stack)?; + let ark_cert = &certificates[1]; + let ask_cert = &certificates[0]; + Ok(Self { + ark: ark_cert.into(), + ask: ask_cert.into(), + }) + } } mod tests { diff --git a/tests/certs.rs b/tests/certs.rs index 3666430a..da94a66c 100644 --- a/tests/certs.rs +++ b/tests/certs.rs @@ -28,8 +28,14 @@ mod snp { const TEST_MILAN_VCEK_DER: &[u8] = include_bytes!("certs_data/vcek_milan.der"); + const TEST_TURIN_VCEK_DER: &[u8] = include_bytes!("certs_data/vcek_turin.der"); + const TEST_MILAN_ATTESTATION_REPORT: &[u8] = include_bytes!("certs_data/report_milan.hex"); + const TEST_MILAN_CA: &[u8] = include_bytes!("certs_data/cert_chain_milan"); + + const TEST_TURIN_CA: &[u8] = include_bytes!("certs_data/cert_chain_turin"); + #[test] fn milan_chain() { let ark = milan::ark().unwrap(); @@ -101,4 +107,35 @@ mod snp { assert_eq!((&chain, &report).verify().ok(), None); } + + + #[cfg(feature = "openssl")] + #[test] + fn milan_ca_stack() { + let vcek = Certificate::from_der(TEST_MILAN_VCEK_DER).unwrap(); + + let ca = ca::Chain::from_pem_bytes(TEST_MILAN_CA).unwrap(); + + let chain = Chain { + ca, + vek: vcek.clone(), + }; + + assert_eq!(chain.verify().ok(), Some(&vcek)); + } + + #[cfg(feature = "openssl")] + #[test] + fn turin_ca_stack() { + let vcek = Certificate::from_der(TEST_TURIN_VCEK_DER).unwrap(); + + let ca = ca::Chain::from_pem_bytes(TEST_TURIN_CA).unwrap(); + + let chain = Chain { + ca, + vek: vcek.clone(), + }; + + assert_eq!(chain.verify().ok(), Some(&vcek)); + } } diff --git a/tests/certs_data/cert_chain_milan b/tests/certs_data/cert_chain_milan new file mode 100644 index 00000000..148ca467 --- /dev/null +++ b/tests/certs_data/cert_chain_milan @@ -0,0 +1,74 @@ +-----BEGIN CERTIFICATE----- +MIIGiTCCBDigAwIBAgIDAQABMEYGCSqGSIb3DQEBCjA5oA8wDQYJYIZIAWUDBAI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09xQDwHtOQUVIqx4maBZPBtSMf+qUDtjXSSq8lfWcd8bLr9mdsUn +JZJ0+tuPMKmBnSH860llKk+VpVQsgqbzDIvOLvD6W1Umq25boxCYJ+TuBoa4s+HH +CViAvgT9kf/rBq1d+ivj6skkHxuzcxbk1xv6ZGxrteJxVH7KlX7YRdZ6eARKwLe4 +AFZEAwoKCQ== +-----END CERTIFICATE----- diff --git a/tests/certs_data/cert_chain_turin b/tests/certs_data/cert_chain_turin new file mode 100644 index 00000000..b98ed53a --- /dev/null +++ b/tests/certs_data/cert_chain_turin @@ -0,0 +1,74 @@ +-----BEGIN CERTIFICATE----- +MIIGiTCCBDigAwIBAgIDAwABMEYGCSqGSIb3DQEBCjA5oA8wDQYJYIZIAWUDBAIC +BQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWUDBAICBQCiAwIBMKMDAgEBMHsxFDAS +BgNVBAsMC0VuZ2luZWVyaW5nMQswCQYDVQQGEwJVUzEUMBIGA1UEBwwLU2FudGEg +Q2xhcmExCzAJBgNVBAgMAkNBMR8wHQYDVQQKDBZBZHZhbmNlZCBNaWNybyBEZXZp +Y2VzMRIwEAYDVQQDDAlBUkstVHVyaW4wHhcNMjMwNTE1MjAyNTIxWhcNNDgwNTE1 +MjAyNTIxWjB7MRQwEgYDVQQLDAtFbmdpbmVlcmluZzELMAkGA1UEBhMCVVMxFDAS +BgNVBAcMC1NhbnRhIENsYXJhMQswCQYDVQQIDAJDQTEfMB0GA1UECgwWQWR2YW5j +ZWQgTWljcm8gRGV2aWNlczESMBAGA1UEAwwJU0VWLVR1cmluMIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAnvg5Grv2Emd9lAhKdO64RXU3UESb6JTm0Hhz +evx1PyxinxYqJL329qTJM0XmdozLYb7rsHxgM5I2pU18M8gect2pN/YB2LQ1/bIq +37TPDbg7ym0MN6KkZ6aERxAX0voYtdDyNxjDAUjpRpCe1FccAev/Es2n/Fz1G1Tm +C2XepTQqaKp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5ix0 +sb2qfSSy9CRnOktGqfpel4e3KAhLgF5n2qZrqyq/8EPPldtSjEXn78sZMlIlUcQK +SnnNCQZVFpktDfDiEiGNuitux3ghHUrcVuxSbZcrXDbsbMF7NDdfLUUS9TijrL33 +lrCXJs7m8kggGyCusiRQKHli1AEswiA4xU+8xsZrByYTopiGYtbJK8s0UCCXylyO +uKSubvdAnMDJ5GDD0+DX46LSfv7fgGNSG+LOBWdif7KoQf9cIhKJtxGxZCn/tvHm +wMzu4Jnx8N2vRnT+8DpBqhxtNvdXmrZUelSeQakx4djMKvmTR8Gd25EnC4RppCkj +bmPxY3zPd1X7raalTn34EOF9DeLsC9JfzkDuojxpHWMm30wKnDo20mlDQk/zKCDa +2Zc+YjtsTZCrTbvdgCukTKNZOUUVlWRu+sO/OwrmS2p16seHTIqHEbE1LntPv3gk +CcHGDSUAKx9c0Aol+Dj9xpb2nmGqoDeJ59Ja6REkHCdw5TduXyqqMqfD1AX0/QDN +devCMKlWBRCQ7DFlog3H1a+r/kuMUZ/Ij9yyKlSgYZMJ4VgNKDgTQdcsAL0MCEMr +zpacMwFusA== +-----END CERTIFICATE----- diff --git a/tests/certs_data/vcek_turin.der b/tests/certs_data/vcek_turin.der new file mode 100644 index 0000000000000000000000000000000000000000..7cb59aa0d58694ba998bd1e0028c5cd939ea7c75 GIT binary patch literal 1289 zcmXqLVr4aGV%oWYnTe5!iIKs;k&RQU&7t88*&?Pf<)PbnL>kMO4xb0 zgA?;g5*3_t5{nXHN;r6!oE;724P-&;xp>4JQ_2$al2cO@d^3}a@)cZC%QBNwiw%Vg z1V9Ryc{qbz!*oMRfwmaPiSrtn7#bRw85tUy7#Ku}^BNl>aSf_qHq+X1f(HB$$8mrh z7v}8hZBPbuFFP=F&)G6DvaxD6vM?wyCo!-DetfvoQ9DDe%pk^bv6f@!KRd4IkXfo> zT5M7aR_uM_uvI|o`-8T$$qBBi)-|jg)vmXAb-Xh##NOGqIA+GA-#K}FZ|~38{-F1} zWO8tJL(l599V@zh^*xMOobDy3B~CoOxbc=j<8`3joZ4)RER1t17#UfB5yfaAf)HV1 zVHabCgrFcB7fc;9CrBZK0kRNSFRBm|rYdGkAy!NwHcTOQOd$@C5T}7C!nG_c9CD#t zeNWHN_oYIDWo`ocG0WDrS#m?fo-MTx%WBoWEUfjv%Xppr=aT2Az81x}Iq)lk3GOv}F0#5gGQD#wUVQJ%t=|j&{rsCK7V`V8#joxY{!3@eoZHyIZJfN( z_?VP8^Y4Qa@6WqBWNa!o*wlpQ(G&edyvsNh9s-Lt)# zJ2x)-{cifad$>w{?$S$7Yy1CC z`P#>ryyBng48h86JkNjKydTYzvT^e9wdspYpEhhV-=o3#X2A!KDZy6`^adncoU(p~ z!$q4f)A_ly`J^YzyCe2g|D1o#til%ki!=H=MNWKQ^YVcF#=F0rtZL@ZmfaU{Za$N8 zr`YF}Ecb#pXCGblw>;|4j?=8)Q%lURN-$hM>8k(ND{`^8_v+m_>%>IQ>@#}$jxqbk z{8cGapG=jlGtpUe)%4X`zD-{)y@{BaxA(QmvkUhRbqoJn{%-EAs2!T;cba{y=X+4Y npz}pMr_40