mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Add a `pv` crate that bundles useful functions and structs for creating requests like `Attestation`, `Add Secret`, or even `Boot` a.k.a. Secure Execution Image. Note pv includes a subcrate `openssl_extensions` that (temporarily) bundles some needed `openssl-rust` functionalities that are not upstream yet. The plan is to remove these, when they become upstream. The pv crate has multiple features: * request - code to generate requests * uvsecret - code to access the UV-secret api with request enabled also generating requests is possible Signed-off-by: Steffen Eiden <seiden@linux.ibm.com> Acked-by: Jan Höppner <hoeppner@linux.ibm.com> Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
46 lines
1.2 KiB
Rust
46 lines
1.2 KiB
Rust
// SPDX-License-Identifier: MIT
|
|
//
|
|
// Copyright IBM Corp. 2023
|
|
|
|
#![allow(
|
|
clippy::inconsistent_digit_grouping,
|
|
clippy::uninlined_format_args,
|
|
clippy::unusual_byte_groupings
|
|
)]
|
|
|
|
use std::env;
|
|
|
|
fn main() {
|
|
if let Ok(vars) = env::var("DEP_OPENSSL_CONF") {
|
|
for var in vars.split(',') {
|
|
println!("cargo:rustc-cfg=osslconf=\"{}\"", var);
|
|
}
|
|
}
|
|
|
|
if let Ok(version) = env::var("DEP_OPENSSL_VERSION_NUMBER") {
|
|
let version = u64::from_str_radix(&version, 16).unwrap();
|
|
|
|
if version >= 0x1_00_01_00_0 {
|
|
println!("cargo:rustc-cfg=ossl101");
|
|
}
|
|
if version >= 0x1_00_02_00_0 {
|
|
println!("cargo:rustc-cfg=ossl102");
|
|
}
|
|
if version >= 0x1_01_00_00_0 {
|
|
println!("cargo:rustc-cfg=ossl110");
|
|
}
|
|
if version >= 0x1_01_00_07_0 {
|
|
println!("cargo:rustc-cfg=ossl110g");
|
|
}
|
|
if version >= 0x1_01_00_08_0 {
|
|
println!("cargo:rustc-cfg=ossl110h");
|
|
}
|
|
if version >= 0x1_01_01_00_0 {
|
|
println!("cargo:rustc-cfg=ossl111");
|
|
}
|
|
if version >= 0x3_00_00_00_0 {
|
|
println!("cargo:rustc-cfg=ossl300");
|
|
}
|
|
}
|
|
}
|