Skip to content

Commit

Permalink
refactor: move test data to picky-test-data crate
Browse files Browse the repository at this point in the history
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
  • Loading branch information
elmarco authored and CBenoit committed Nov 26, 2024
1 parent b045b44 commit 026bcb7
Show file tree
Hide file tree
Showing 149 changed files with 425 additions and 453 deletions.
6 changes: 6 additions & 0 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ members = [
"picky-asn1",
"picky-asn1-der",
"picky-asn1-x509",
"picky-test-data",
"ffi",
]

Expand All @@ -16,4 +17,4 @@ default-members = [
"picky-asn1",
"picky-asn1-der",
"picky-asn1-x509",
]
]
1 change: 1 addition & 0 deletions picky-asn1-x509/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ num-bigint-dig = "0.8"
pretty_assertions = "1.4"
hex = "0.4"
expect-test = "1"
picky-test-data = { path = "../picky-test-data", version = "0.1" }

[features]
legacy = ["num-bigint-dig"]
Expand Down
2 changes: 1 addition & 1 deletion picky-asn1-x509/src/certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ mod tests {

#[test]
fn missing_authority_key_identifier_field_accepted() {
let encoded = include_bytes!("../../test_assets/missing_authority_key_identifier_field.crt");
let encoded = picky_test_data::MISSING_AUTH_KEY_ID;
let _decoded = picky_asn1_der::from_bytes::<Certificate>(encoded).unwrap();
}
}
10 changes: 5 additions & 5 deletions picky-asn1-x509/src/pkcs12/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ mod tests {
// This test validates PFX structure parsing and parsing of `Certificate`/`PrivateKeyInfo`
// structures encapsulated inside PFX

let encoded = include_bytes!("../../../test_assets/pkcs12/openssl_nocrypt.pfx");
let encoded = picky_test_data::OPENSSL_NOCRYPT;
let decoded: Pfx = picky_asn1_der::from_bytes(encoded).unwrap();

// Validate parsed PFX structure via debug representation
Expand Down Expand Up @@ -194,7 +194,7 @@ mod tests {

#[test]
fn pfx_openssl_rc2_roundtrip() {
let encoded = include_bytes!("../../../test_assets/pkcs12/leaf_password_is_abc.pfx");
let encoded = picky_test_data::LEAF_PASSWORD_IS_ABC;
let decoded: Pfx = picky_asn1_der::from_bytes(encoded).unwrap();
// Validate parsed PFX structure via debug representation
expect_file!["leaf_password_is_abc.parsed.txt"].assert_debug_eq(&decoded);
Expand All @@ -205,7 +205,7 @@ mod tests {

#[test]
fn pfx_certmgr_aes256_roundtrip() {
let encoded = include_bytes!("../../../test_assets/pkcs12/certmgr_aes256.pfx");
let encoded = picky_test_data::CERTMGR_AES256;
let decoded: Pfx = picky_asn1_der::from_bytes(encoded).unwrap();
expect_file!["certmgr_aes256.parsed.txt"].assert_debug_eq(&decoded);
// For certmgr-generated PFXs, we can't compare the bytes directly because
Expand All @@ -216,15 +216,15 @@ mod tests {

#[test]
fn pfx_certmgr_3des_roundtrip() {
let encoded = include_bytes!("../../../test_assets/pkcs12/certmgr_3des.pfx");
let encoded = picky_test_data::CERTMGR_3DES;
let decoded: Pfx = picky_asn1_der::from_bytes(encoded).unwrap();

expect_file!["certmgr_3des.parsed.txt"].assert_debug_eq(&decoded);
}

#[test]
fn unparsed_auth_safe_openssl_rc2_roundtrip() {
let encoded = include_bytes!("../../../test_assets/pkcs12/leaf_password_is_abc.pfx");
let encoded = picky_test_data::LEAF_PASSWORD_IS_ABC;
let decoded: RawPfx = picky_asn1_der::from_bytes(encoded).unwrap();

let auth_safe = if let AuthenticatedSafeContentInfo::Data(auth_safe) = &decoded.auth_safe {
Expand Down
8 changes: 2 additions & 6 deletions picky-server/src/http/authorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,12 @@ mod tests {
use saphir::http::{request, Method};

fn get_private_key_1() -> PrivateKey {
let pem = include_str!("../../../test_assets/private_keys/rsa-2048-pk_4.key")
.parse::<Pem>()
.expect("pem 1");
let pem = picky_test_data::RSA_2048_PK_1.parse::<Pem>().expect("pem 1");
PrivateKey::from_pem(&pem).expect("key 1")
}

fn get_private_key_2() -> PrivateKey {
let pem = include_str!("../../../test_assets/private_keys/rsa-2048-pk_7.key")
.parse::<Pem>()
.expect("pem 2");
let pem = picky_test_data::RSA_2048_PK_7.parse::<Pem>().expect("pem 2");
PrivateKey::from_pem(&pem).expect("key 2")
}

Expand Down
13 changes: 0 additions & 13 deletions picky-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,3 @@ async fn main() {
http_server.run().await;
}

#[cfg(any(feature = "pre-gen-pk", all(debug_assertions, test)))]
pub mod test_files {
pub const RSA_2048_PK_1: &str = include_str!("../../test_assets/private_keys/rsa-2048-pk_1.key");
pub const RSA_2048_PK_2: &str = include_str!("../../test_assets/private_keys/rsa-2048-pk_2.key");
pub const RSA_2048_PK_3: &str = include_str!("../../test_assets/private_keys/rsa-2048-pk_3.key");
pub const RSA_2048_PK_4: &str = include_str!("../../test_assets/private_keys/rsa-2048-pk_4.key");
pub const RSA_2048_PK_5: &str = include_str!("../../test_assets/private_keys/rsa-2048-pk_5.key");
pub const RSA_2048_PK_6: &str = include_str!("../../test_assets/private_keys/rsa-2048-pk_6.key");
pub const RSA_2048_PK_7: &str = include_str!("../../test_assets/private_keys/rsa-2048-pk_7.key");
pub const RSA_4096_PK_1: &str = include_str!("../../test_assets/private_keys/rsa-4096-pk_1.key");
pub const RSA_4096_PK_2: &str = include_str!("../../test_assets/private_keys/rsa-4096-pk_2.key");
pub const RSA_4096_PK_3: &str = include_str!("../../test_assets/private_keys/rsa-4096-pk_3.key");
}
1 change: 0 additions & 1 deletion picky-server/src/picky_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ impl Picky {
/// It returns a random pre-generated private key from a pool: security-wise, this is extremely bad.
#[cfg(any(feature = "pre-gen-pk", all(debug_assertions, test)))]
pub fn generate_private_key(bits: usize) -> Result<PrivateKey, PickyError> {
use crate::test_files::*;
use picky::pem::Pem;
use rand::prelude::*;

Expand Down
4 changes: 4 additions & 0 deletions picky-test-data/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[package]
name = "picky-test-data"
version = "0.1.0"
description = "Test data for the picky crates"
214 changes: 214 additions & 0 deletions picky-test-data/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
//! Test data shared between various picky crates.
pub const RSA_2048_PK_1: &str = include_str!("../test_assets/private_keys/rsa-2048-pk_1.key");
pub const RSA_2048_PK_5: &str = include_str!("../test_assets/private_keys/rsa-2048-pk_5.key");
pub const RSA_2048_PK_6: &str = include_str!("../test_assets/private_keys/rsa-2048-pk_6.key");
pub const RSA_2048_PK_7: &str = include_str!("../test_assets/private_keys/rsa-2048-pk_7.key");
pub const RSA_4096_PK_1: &str = include_str!("../test_assets/private_keys/rsa-4096-pk_1.key");
pub const RSA_4096_PK_2: &str = include_str!("../test_assets/private_keys/rsa-4096-pk_2.key");
pub const RSA_4096_PK_3: &str = include_str!("../test_assets/private_keys/rsa-4096-pk_3.key");

pub const EC_NIST256_PK_1: &str = include_str!("../test_assets/private_keys/ec-nist256-pk_1.key");

// openssl ec -in ec-secp256r1-priv-key.pem -no_public -out ec-secp256r1-nopublic-priv-key.pem
pub const EC_NIST256_NOPUBLIC_DER_PK_1: &str =
include_str!("../test_assets/private_keys/ec-nist256-nopublic-der-pk_1.key");

// openssl ec -in ec-secp384r1-priv-key.pem -no_public -out ec-secp384r1-nopublic-priv-key.pem
pub const EC_NIST384_NOPUBLIC_DER_PK_1: &str =
include_str!("../test_assets/private_keys/ec-nist384-nopublic-der-pk_1.key");

// openssl ec -in ec-secp521r1-priv-key.pem -no_public -out ec-secp521r1-nopublic-priv-key.pem
pub const EC_NIST521_NOPUBLIC_DER_PK_1: &str =
include_str!("../test_assets/private_keys/ec-nist521-nopublic-der-pk_1.key");

pub const EC_NIST256_DER_PK_1: &str = include_str!("../test_assets/private_keys/ec-nist256-der-pk_1.key");

pub const EC_NIST384_DER_PK_1: &str = include_str!("../test_assets/private_keys/ec-nist384-der-pk_1.key");

pub const EC_NIST521_DER_PK_1: &str = include_str!("../test_assets/private_keys/ec-nist521-der-pk_1.key");

// openssl ecparam -name secp256r1 -genkey -noout -out ec-secp256r1-priv-key.pem
// openssl ec -in ec-secp256r1-priv-key.pem -pubout > ec-secp256r1-pub-key.pem
pub const EC_NIST256_PK_1_PUB: &str = include_str!("../test_assets/public_keys/ec-nist256-pk_1.key");

// openssl ecparam -name secp384r1 -genkey -noout -out ec-secp384r1-priv-key.pem
// openssl ec -in ec-secp384r1-priv-key.pem -pubout > ec-secp384r1-pub-key.pem
pub const EC_NIST384_PK_1_PUB: &str = include_str!("../test_assets/public_keys/ec-nist384-pk_1.key");

// openssl ecparam -name secp521r1 -genkey -noout -out ec-secp521r1-priv-key.pem
// openssl ec -in ec-secp521r1-priv-key.pem -pubout > ec-secp521r1-pub-key.pem
pub const EC_NIST521_PK_1_PUB: &str = include_str!("../test_assets/public_keys/ec-nist521-pk_1.key");

// openssl ecparam -name secp256k1 -genkey -noout -out ec-secp256k1-priv-key.pem
// openssl ec -in ec-secp256k1-priv-key.pem -pubout > ec-secp256k1-pub-key.pem
pub const EC_PUBLIC_KEY_SECP256K1_PEM: &str = include_str!("../test_assets/public_keys/ec-secp256k1-pk_1.key");

// openssl genpkey -algorithm ed25519 -outform PEM -out ed25519.pem
// openssl pkey -in ed25519.pem -outform PEM > ed25519.pub
pub const ED25519_PEM_PK_1: &str = include_str!("../test_assets/private_keys/ed25519-pem-pk_1.key");
pub const ED25519_PEM_PK_1_PUB: &str = include_str!("../test_assets/public_keys/ed25519-pem-pk_1.key");

// openssl genpkey -algorithm x25519 -outform PEM -out x25519.pem
pub const X25519_PEM_PK_1: &str = include_str!("../test_assets/private_keys/x25519-pem-pk_1.key");
pub const X25519_PEM_PK_1_PUB: &str = include_str!("../test_assets/public_keys/x25519-pem-pk_1.key");

// openssl genpkey -algorithm ed448 -outform PEM -out ed448.pem
pub const ED448_PEM_PK_1: &str = include_str!("../test_assets/private_keys/ed448-pem-pk_1.key");
pub const ED448_PEM_PK_1_PUB: &str = include_str!("../test_assets/public_keys/ed448-pem-pk_1.key");

// openssl genpkey -algorithm x448 -outform PEM -out x448.pem
pub const X448_PEM_PK_1: &str = include_str!("../test_assets/private_keys/x448-pem-pk_1.key");
pub const X448_PEM_PK_1_PUB: &str = include_str!("../test_assets/public_keys/x448-pem-pk_1.key");

// cfg_if::cfg_if! { if #[cfg(feature = "pkcs7")] {
pub const PKCS7: &str = include_str!("../test_assets/pkcs7.p7b");
// }}

// cfg_if::cfg_if! { if #[cfg(feature = "ctl")] {
pub const CERTIFICATE_TRUST_LIST: &[u8] = include_bytes!("../test_assets/authroot.stl");
// }}

// cfg_if::cfg_if! { if #[cfg(feature = "x509")] {
pub const RSA_2048_PK_2: &str = include_str!("../test_assets/private_keys/rsa-2048-pk_2.key");
pub const RSA_2048_PK_3: &str = include_str!("../test_assets/private_keys/rsa-2048-pk_3.key");
pub const RSA_2048_PK_4: &str = include_str!("../test_assets/private_keys/rsa-2048-pk_4.key");

pub const EC_NIST256_PK_2: &str = include_str!("../test_assets/private_keys/ec-nist256-pk_2.key");

pub const ED25519_PEM_PK_2: &str = include_str!("../test_assets/private_keys/ed25519-pem-pk_2.key");
pub const ED25519_PEM_PK_3: &str = include_str!("../test_assets/private_keys/ed25519-pem-pk_3.key");

pub const INTERMEDIATE_CA: &str = include_str!("../test_assets/intermediate_ca.crt");
pub const ROOT_CA: &str = include_str!("../test_assets/root_ca.crt");

pub const PSDIAG_ROOT: &str = include_str!("../test_assets/authenticode-psdiagnostics/1_psdiag_root.pem");
pub const PSDIAG_INTER: &str = include_str!("../test_assets/authenticode-psdiagnostics/2_psdiag_inter.pem");
pub const PSDIAG_LEAF: &str = include_str!("../test_assets/authenticode-psdiagnostics/3_psdiag_leaf.pem");
// }}

// cfg_if::cfg_if! { if #[cfg(feature = "jose")] {
pub const EC_NIST521_PK_1: &str = include_str!("../test_assets/private_keys/ec-nist521-pk_1.key");

pub const JOSE_JWT_SIG_EXAMPLE: &str = include_str!("../test_assets/jose/jwt_sig_example.txt");
pub const JOSE_JWT_SIG_WITH_EXP: &str = include_str!("../test_assets/jose/jwt_sig_with_exp.txt");
pub const JOSE_JWK_SET: &str = include_str!("../test_assets/jose/jwk_set.json");

pub const JOSE_JWK_EC_P256_JSON: &str = include_str!("../test_assets/jose/jwk_ec_p256.json");
pub const JOSE_JWK_EC_P384_JSON: &str = include_str!("../test_assets/jose/jwk_ec_p384.json");
pub const JOSE_JWK_EC_P521_JSON: &str = include_str!("../test_assets/jose/jwk_ec_p521.json");
pub const JOSE_JWK_ED25519_JSON: &str = include_str!("../test_assets/jose/jwk_ed25519.json");
pub const JOSE_JWK_X25519_JSON: &str = include_str!("../test_assets/jose/jwk_x25519.json");

pub const JOSE_JWT_SIG_ES256: &str = include_str!("../test_assets/jose/jwt_sig_es256.txt");
pub const JOSE_JWT_SIG_ES384: &str = include_str!("../test_assets/jose/jwt_sig_es384.txt");
pub const JOSE_JWT_SIG_ES512: &str = include_str!("../test_assets/jose/jwt_sig_es512.txt");

/// Test data was gathered from https://github.com/golang-jwt/jwt
pub const JOSE_JWT_SIG_ED25519_GO: &str = include_str!("../test_assets/jose/jwt_sig_ed25519_go.txt");
pub const JOSE_JWT_SIG_ED25519_GO_PRIVATE_KEY: &str =
include_str!("../test_assets/jose/jwt_sig_ed25519_go_private.pem");

/// Test data was gathered from https://github.com/kataras/jwt
pub const JOSE_JWT_SIG_ED25519: &str = include_str!("../test_assets/jose/jwt_sig_ed25519.txt");
pub const JOSE_JWT_SIG_ED25519_PRIVATE_KEY: &str = include_str!("../test_assets/jose/jwt_sig_ed25519_private.pem");

/// Genereated via `jwcrypto` python library
pub const JOSE_JWE_GCM256_EC_P256_ECDH: &str = include_str!("../test_assets/jose/jwe_gcm256_ec_p256_ecdh.txt");
pub const JOSE_JWE_GCM128_EC_P384_ECDH_KW192: &str =
include_str!("../test_assets/jose/jwe_gcm128_ec_p384_ecdh_kw192.txt");
// }}

// cfg_if::cfg_if! { if #[cfg(feature = "ssh")] {
// ssh-keygen -t ecdsa -b 256 -C "test_ecdsa@picky.com"
pub const SSH_PRIVATE_KEY_EC_P256: &str = include_str!("../test_assets/ssh/ssh_key_p256");

// ssh-keygen -t ecdsa -b 384 -C "test_ecdsa@picky.com"
pub const SSH_PRIVATE_KEY_EC_P384: &str = include_str!("../test_assets/ssh/ssh_key_p384");

// ssh-keygen -t ecdsa -b 521 -C "test_ecdsa@picky.com"
pub const SSH_PRIVATE_KEY_EC_P521: &str = include_str!("../test_assets/ssh/ssh_key_p521");

// ssh-keygen -t ecdsa -b 256 -C "test_ecdsa@picky.com"
pub const SSH_PRIVATE_KEY_EC_P256_ENCRYPTED: &str = include_str!("../test_assets/ssh/ssh_encrypted_key_p256");

// ssh-keygen -t ed25519 -C "test_ecdsa@picky.com"
pub const SSH_PRIVATE_KEY_ED25519: &str = include_str!("../test_assets/ssh/ssh_key_ed25519");

// ssh-keygen -t ecdsa -b 256 -C "test_ecdsa@picky.com"
pub const SSH_PRIVATE_KEY_ED25519_ENCRYPTED: &str = include_str!("../test_assets/ssh/ssh_encrypted_key_ed25519");

// ssh-keygen -t sk-ed25519 -C "test_ed25519@picky.com"
pub const SSH_PRIVATE_KEY_SK_ED25519: &str = include_str!("../test_assets/ssh/ssh_key_sk_ed25519");

// ssh-keygen -t sk-ed25519 -C "test_ed25519@picky.com"
pub const SSH_PRIVATE_KEY_SK_ED25519_ENCRYPTED: &str = include_str!("../test_assets/ssh/ssh_key_sk_ed25519_enc");

// ssh-keygen -t sk-ecdsa -C "test_ecdsa@picky.com"
pub const SSH_PRIVATE_KEY_SK_ECDSA: &str = include_str!("../test_assets/ssh/ssh_key_sk_ecdsa");

// ssh-keygen -t sk-ecdsa -C "test_ecdsa@picky.com"
pub const SSH_PRIVATE_KEY_SK_ECDSA_ENCRYPTED: &str = include_str!("../test_assets/ssh/ssh_key_sk_ecdsa_enc");

// ssh-keygen -t rsa -C "test_rsa"
pub const SSH_PRIVATE_KEY_RSA: &str = include_str!("../test_assets/ssh/ssh_key_rsa");

pub const SSH_PUBLIC_KEY_EC_P256: &str = include_str!("../test_assets/ssh/ssh_key_p256.pub");
pub const SSH_PUBLIC_KEY_EC_P384: &str = include_str!("../test_assets/ssh/ssh_key_p384.pub");
pub const SSH_PUBLIC_KEY_EC_P521: &str = include_str!("../test_assets/ssh/ssh_key_p521.pub");

pub const SSH_PUBLIC_KEY_ED25519: &str = include_str!("../test_assets/ssh/ssh_key_ed25519.pub");

pub const SSH_PUBLIC_KEY_SK_ECDSA: &str = include_str!("../test_assets/ssh/ssh_key_sk_ecdsa.pub");
pub const SSH_PUBLIC_KEY_SK_ED25519: &str = include_str!("../test_assets/ssh/ssh_key_sk_ed25519.pub");

pub const SSH_PUBLIC_KEY_RSA: &str = include_str!("../test_assets/ssh/ssh_key_rsa.pub");

// ssh-keygen -h -s ./ssh_ca_key -V '+1000w' -I abcd -z 00001 -n server.example.com ./ssh_key_p256.pub
pub const SSH_CERT_EC_P256: &str = include_str!("../test_assets/ssh/ssh_cert_p256.crt");
// ssh-keygen -h -s ./ssh_ca_key -V '+1000w' -I abcd -z 00001 -n server.example.com ./ssh_key_p384.pub
pub const SSH_CERT_EC_P384: &str = include_str!("../test_assets/ssh/ssh_cert_p384.crt");
// ssh-keygen -h -s ./ssh_ca_key -V '+1000w' -I abcd -z 00001 -n server.example.com ./ssh_key_ed25519.pub
pub const SSH_CERT_ED25519: &str = include_str!("../test_assets/ssh/ssh_cert_ed25519.crt");

// ssh-keygen -h -s ./sk_ed25519 -V '+1000w' -I abcd -z 00001 -n server.example.com ./ssh_key_p256.pub
pub const SSH_CERT_SK_ED25519: &str = include_str!("../test_assets/ssh/ssh_sk_ed25519_key_p256-cert.pub");
// ssh-keygen -h -s ./sk_ecdsa -V '+1000w' -I abcd -z 00001 -n server.example.com ./ssh_key_p256.pub
pub const SSH_CERT_SK_ECDSA: &str = include_str!("../test_assets/ssh/ssh_sk_ecdsa_key_p256-cert.pub");

// ssh-keygen -h -s ./ssh_key_p256 -V '+1000w' -I abcd -z 00001 -n server.example.com ./sk_ecdsa.pub
pub const SSH_CERT_SK_ECDSA_SIG_EC: &str = include_str!("../test_assets/ssh/ssh_p256_key_sk_ecdsa-cert.pub");
// ssh-keygen -h -s ./ssh_key_p256 -V '+1000w' -I abcd -z 00001 -n server.example.com ./sk_ecdsa.pub
pub const SSH_CERT_SK_ED25519_SIG_EC: &str = include_str!("../test_assets/ssh/ssh_p256_key_sk_ed25519-cert.pub");
// }}

// cfg_if::cfg_if! { if #[cfg(any(feature = "jose", feature = "x509"))] {
pub const EC_NIST384_PK_1: &str = include_str!("../test_assets/private_keys/ec-nist384-pk_1.key");
// }}

// cfg_if::cfg_if! { if #[cfg(feature = "putty")] {
pub const PUTTY_KEY_ED25519: &str = include_str!("../test_assets/putty/ed25519.ppk");
pub const PUTTY_KEY_ED25519_ENCRYPTED: &str = include_str!("../test_assets/putty/ed25519_encrypted.ppk");
pub const PUTTY_KEY_ED25519_PUBLIC: &str = include_str!("../test_assets/putty/ed25519");

pub const PUTTY_KEY_ED25519_V2: &str = include_str!("../test_assets/putty/ed25519_v2.ppk");
pub const PUTTY_KEY_ED25519_V2_ENCRYPTED: &str = include_str!("../test_assets/putty/ed25519_v2_encrypted.ppk");

pub const PUTTY_KEY_RSA_PUBLIC_EMPTY_COMMENT: &str = include_str!("../test_assets/putty/rsa_pub_empty_comment");
pub const PUTTY_KEY_RSA_PUBLIC_ESCAPED_COMMENT: &str = include_str!("../test_assets/putty/rsa_pub_escaped_conmment");
// }}

pub const PEM_BYTES: &[u8] = include_bytes!("../test_assets/intermediate_ca.crt");
pub const PEM_STR: &str = include_str!("../test_assets/intermediate_ca.crt");

pub const MISSING_AUTH_KEY_ID: &[u8] = include_bytes!("../test_assets/missing_authority_key_identifier_field.crt");
pub const CERTMGR_AES256: &[u8] = include_bytes!("../test_assets/pkcs12/certmgr_aes256.pfx");
pub const CERTMGR_3DES: &[u8] = include_bytes!("../test_assets/pkcs12/certmgr_3des.pfx");
pub const LEAF_PASSWORD_IS_ABC: &[u8] = include_bytes!("../test_assets/pkcs12/leaf_password_is_abc.pfx");
pub const LEAF_EMPTY_PASSWORD: &[u8] = include_bytes!("../test_assets/pkcs12/leaf_empty_password.pfx");
pub const OPENSSL_NOCRYPT: &[u8] = include_bytes!("../test_assets/pkcs12/openssl_nocrypt.pfx");
pub const ASSERT_LEAF: &[u8] = include_bytes!("../test_assets/pkcs12/asset_leaf.crt");
pub const ASSERT_INTERMEDIATE: &[u8] = include_bytes!("../test_assets/pkcs12/asset_intermediate.crt");
pub const ASSERT_ROOT: &[u8] = include_bytes!("../test_assets/pkcs12/asset_root.crt");

pub const ALL_STARS: &str = include_str!("../test_assets/mkcert_all_root_ca_2019_10.txt");
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions picky/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ rstest = "0.23"
expect-test = "1"
tempfile = "3.13"
rand_chacha = "0.3"
picky-test-data = { path = "../picky-test-data", version = "0.1" }

[features]
default = ["x509", "jose", "http_signature", "http_trait_impl", "pkcs12"]
Expand Down
1 change: 1 addition & 0 deletions picky/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cargo-fuzz = true

[dependencies]
picky = { path = "../" }
picky-test-data = { path = "../../picky-test-data", version = "0.1" }
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }

# Prevent this from interfering with workspaces
Expand Down
Loading

0 comments on commit 026bcb7

Please sign in to comment.