pub static RFC3501_P56: &[u8] = include_bytes!("rfc3501_p56.eml");
pub static ENRON_SMALL_MULTIPARTS: &[&[u8]] = &[
include_bytes!("enron_dasovich-j_all_documents_11634.eml"),
include_bytes!("enron_dasovich-j_notes_inbox_3944.eml"),
include_bytes!("enron_farmer-d_all_documents_3128.eml"),
include_bytes!("enron_farmer-d_discussion_threads_4965.eml"),
include_bytes!("enron_farmer-d_entex_106.eml"),
include_bytes!("enron_farmer-d_entex_1.eml"),
include_bytes!("enron_keavey-p_deleted_items_127.eml"),
include_bytes!("enron_keavey-p_deleted_items_144.eml"),
include_bytes!("enron_keavey-p_deleted_items_163.eml"),
include_bytes!("enron_keavey-p_deleted_items_21.eml"),
include_bytes!("enron_keavey-p_deleted_items_258.eml"),
include_bytes!("enron_keavey-p_deleted_items_269.eml"),
include_bytes!("enron_keavey-p_deleted_items_314.eml"),
include_bytes!("enron_keavey-p_deleted_items_55.eml"),
include_bytes!("enron_keavey-p_deleted_items_63.eml"),
include_bytes!("enron_keavey-p_deleted_items_6.eml"),
include_bytes!("enron_keavey-p_deleted_items_82.eml"),
include_bytes!("enron_keavey-p_inbox_551.eml"),
include_bytes!("enron_scholtes-d_transmission_29.eml"),
include_bytes!("enron_scholtes-d_transmission_35.eml"),
];
pub static TORTURE_TEST: &[u8] = include_bytes!("torture-test.eml");
pub static CHRISTMAS_TREE: &[u8] = include_bytes!("christmas-tree.eml");
pub static WITH_OBSOLETE_ROUTING: &[u8] =
include_bytes!("with-obsolete-routing.eml");
pub static DOVECOT_PREFER_STANDALONE_DAEMONS: &[u8] =
include_bytes!("dovecot-prefer-standalone-daemons.eml");
pub static UNKNOWN_CTE: &[u8] = include_bytes!("unknown-cte.eml");
pub static SINGLE_PART_BASE64: &[u8] = include_bytes!("single-part-base64.eml");
pub static MULTI_PART_BASE64: &[u8] = include_bytes!("multi-part-base64.eml");
pub static DKIM_LINGL_RSA_SHA1: &[u8] =
include_bytes!("dkim-lingl-rsa-sha1.eml");
pub static DKIM_AMAZONCOJP_RSA_SHA256: &[u8] =
include_bytes!("dkim-amazoncojp-2x-rsa-sha256.eml");
pub static DKIM_YAHOO_RSA_SHA256: &[u8] =
include_bytes!("dkim-yahoo-rsa-sha256.eml");
pub static RFC_8463: &[u8] = include_bytes!("rfc-8463.eml");
lazy_static::lazy_static! {
pub static ref CERTIFICATE_PRIVATE_KEY: openssl::pkey::PKey<openssl::pkey::Private> =
openssl::pkey::PKey::from_rsa(openssl::rsa::Rsa::generate(2048).unwrap())
.unwrap();
pub static ref CERTIFICATE: openssl::x509::X509 = {
let mut builder = openssl::x509::X509Builder::new().unwrap();
builder.set_pubkey(&CERTIFICATE_PRIVATE_KEY).unwrap();
builder
.sign(
&CERTIFICATE_PRIVATE_KEY,
openssl::hash::MessageDigest::sha256(),
)
.unwrap();
builder.set_version(2).unwrap();
builder
.set_not_before(&openssl::asn1::Asn1Time::from_unix(0).unwrap())
.unwrap();
builder
.set_not_after(&openssl::asn1::Asn1Time::days_from_now(2).unwrap())
.unwrap();
builder.build()
};
}