mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust: Prepare Cargo.toml for crates.io
Renames pv crate to s390_pv and pv_core to s390_pv_core. pv was already taken on crates.io. Bump the versions of all crates to 0.10.0. From now on we follow Semver compatibility rules when it comes to updates. patch-level updates will not introduce any backwards incompatible changes. For now all crates in this directory will have the same version number. A version update may, therefore, not add any new things. Library users in this repository still use the non prefixed names and rename the crate in the Cargo.toml. Doc-tests have to use the new name however. Add some Cargo metadata to the Cargo.toml. Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
74
rust/Cargo.lock
generated
74
rust/Cargo.lock
generated
@@ -398,47 +398,16 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pv"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"curl",
|
||||
"foreign-types",
|
||||
"log",
|
||||
"openssl",
|
||||
"openssl-sys",
|
||||
"pv_core",
|
||||
"serde",
|
||||
"serde_test",
|
||||
"thiserror",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pv_core"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_test",
|
||||
"thiserror",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pvapconfig"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"lazy_static",
|
||||
"openssl",
|
||||
"pv_core",
|
||||
"rand",
|
||||
"regex",
|
||||
"s390_pv_core",
|
||||
"serde",
|
||||
"serde_yaml",
|
||||
"utils",
|
||||
@@ -446,12 +415,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pvsecret"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
"log",
|
||||
"pv",
|
||||
"s390_pv",
|
||||
"serde_yaml",
|
||||
"utils",
|
||||
]
|
||||
@@ -544,6 +513,37 @@ version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
|
||||
|
||||
[[package]]
|
||||
name = "s390_pv"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"curl",
|
||||
"foreign-types",
|
||||
"log",
|
||||
"openssl",
|
||||
"openssl-sys",
|
||||
"s390_pv_core",
|
||||
"serde",
|
||||
"serde_test",
|
||||
"thiserror",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "s390_pv_core"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_test",
|
||||
"thiserror",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "schannel"
|
||||
version = "0.1.21"
|
||||
@@ -672,12 +672,12 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
|
||||
|
||||
[[package]]
|
||||
name = "utils"
|
||||
version = "0.1.0"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"libc",
|
||||
"log",
|
||||
"pv",
|
||||
"s390_pv",
|
||||
"serde",
|
||||
]
|
||||
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
[package]
|
||||
name = "pv"
|
||||
version = "1.0.0"
|
||||
name = "s390_pv"
|
||||
version = "0.10.0"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
description = "s390-tools IBM Secure Execution utilities"
|
||||
keywords = ["s390", "s390x", "IBM_Secure_Execution"]
|
||||
repository = "https://github.com/ibm-s390-linux/s390-tools/tree/master/rust"
|
||||
categories = ["hardware-support"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
byteorder = "1.3"
|
||||
@@ -15,7 +20,7 @@ serde = { version = "1.0.139", features = ["derive"] }
|
||||
thiserror = "1.0.33"
|
||||
zerocopy = { version="0.7", features = ["derive"] }
|
||||
|
||||
pv_core = { path = "../pv_core" }
|
||||
pv_core = { path = "../pv_core", package = "s390_pv_core", version = "0.10.0" }
|
||||
|
||||
[dev-dependencies]
|
||||
serde_test = "1.0.139"
|
||||
|
||||
@@ -48,7 +48,7 @@ impl Zeroize for Vec<u8> {
|
||||
/// Will never leak its wrapped value during [`Debug`]
|
||||
///
|
||||
/// ```rust
|
||||
/// use pv::request::Confidential;
|
||||
/// use s390_pv::request::Confidential;
|
||||
/// fn foo(value: Confidential<[u8; 2]>) {
|
||||
/// println!("value: {value:?}");
|
||||
/// }
|
||||
|
||||
@@ -52,14 +52,14 @@ use crate::{
|
||||
/// Create an Attestation request with default flags (= use a nonce)
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// use pv::attest::{AttestationFlags, AttestationMeasAlg, AttestationRequest, AttestationVersion};
|
||||
/// use pv::request::{SymKeyType, Request, ReqEncrCtx};
|
||||
/// # fn main() -> pv::Result<()> {
|
||||
/// # use s390_pv::attest::{AttestationFlags, AttestationMeasAlg, AttestationRequest, AttestationVersion};
|
||||
/// # use s390_pv::request::{SymKeyType, Request, ReqEncrCtx};
|
||||
/// # fn main() -> s390_pv::Result<()> {
|
||||
/// let att_version = AttestationVersion::One;
|
||||
/// let meas_alg = AttestationMeasAlg::HmacSha512;
|
||||
/// let mut arcb = AttestationRequest::new(att_version, meas_alg, AttestationFlags::default())?;
|
||||
/// // read-in hostkey document(s). Not verified for brevity.
|
||||
/// let hkd = pv::misc::read_certs(&std::fs::read("host-key-document.crt")?)?;
|
||||
/// let hkd = s390_pv::misc::read_certs(&std::fs::read("host-key-document.crt")?)?;
|
||||
/// // IBM issued HKD certificates typically have one X509
|
||||
/// let hkd = hkd.first().unwrap().public_key()?;
|
||||
/// arcb.add_hostkey(hkd);
|
||||
|
||||
@@ -6,7 +6,7 @@ use openssl::{
|
||||
nid::Nid,
|
||||
pkey::Private,
|
||||
};
|
||||
use pv::{
|
||||
use s390_pv::{
|
||||
get_test_asset,
|
||||
request::{
|
||||
openssl::pkey::{PKey, Public},
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
//
|
||||
// Copyright IBM Corp. 2023
|
||||
|
||||
use pv::request::CertVerifier;
|
||||
use pv::test_utils::*;
|
||||
use pv::{Error, HkdVerifyErrorType::*};
|
||||
use s390_pv::request::CertVerifier;
|
||||
use s390_pv::test_utils::*;
|
||||
use s390_pv::{Error, HkdVerifyErrorType::*};
|
||||
use std::ffi::c_int;
|
||||
|
||||
#[track_caller]
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
[package]
|
||||
name = "pv_core"
|
||||
version = "1.0.0"
|
||||
name = "s390_pv_core"
|
||||
version = "0.10.0"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
description = "s390-tools IBM Secure Execution core utilities"
|
||||
keywords = ["s390", "s390x", "IBM_Secure_Execution"]
|
||||
repository = "https://github.com/ibm-s390-linux/s390-tools/tree/master/rust"
|
||||
categories = ["hardware-support"]
|
||||
readme = "README.md"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ macro_rules! static_assert {
|
||||
///
|
||||
/// # Example
|
||||
/// ```rust
|
||||
/// # use pv_core::assert_size;
|
||||
/// # use s390_pv_core::assert_size;
|
||||
/// # fn main() {}
|
||||
/// #[repr(C)]
|
||||
/// struct c_struct {
|
||||
|
||||
@@ -119,7 +119,7 @@ impl From<&u64> for Lsb0Flags64 {
|
||||
/// * `ctx` - Error context string in case of an error
|
||||
/// ```rust
|
||||
/// # use std::error::Error;
|
||||
/// # use pv_core::misc::try_parse_u128;
|
||||
/// # use s390_pv_core::misc::try_parse_u128;
|
||||
/// # fn main() -> Result<(), Box<dyn Error>> {
|
||||
/// let hex = "11223344556677889900aabbccddeeff";
|
||||
/// try_parse_u128(&hex, "The test")?;
|
||||
@@ -155,7 +155,7 @@ pub fn try_parse_u128(hex_str: &str, ctx: &str) -> Result<[u8; 16]> {
|
||||
/// * `ctx` - Error context string in case of an error
|
||||
/// ```rust
|
||||
/// # use std::error::Error;
|
||||
/// # use pv_core::misc::try_parse_u64;
|
||||
/// # use s390_pv_core::misc::try_parse_u64;
|
||||
/// # fn main() -> Result<(), Box<dyn Error>> {
|
||||
/// let hex = "1234567890abcdef";
|
||||
/// try_parse_u64(&hex, "The test")?;
|
||||
|
||||
@@ -10,8 +10,8 @@ use zerocopy::U32;
|
||||
///
|
||||
/// The magic value is ASCII:
|
||||
/// ```rust
|
||||
/// # use pv_core::attest::AttestationMagic;
|
||||
/// # use pv_core::request::MagicValue;
|
||||
/// # use s390_pv_core::attest::AttestationMagic;
|
||||
/// # use s390_pv_core::request::MagicValue;
|
||||
/// # fn main() {
|
||||
/// # let magic = &
|
||||
/// [0u8; 8]
|
||||
|
||||
@@ -173,10 +173,10 @@ pub enum UvcSuccess {
|
||||
/// forward to Firmware.
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// # use pv_core::uv::UvDevice;
|
||||
/// # use pv_core::uv::AddCmd;
|
||||
/// # use s390_pv_core::uv::UvDevice;
|
||||
/// # use s390_pv_core::uv::AddCmd;
|
||||
/// # use std::fs::File;
|
||||
/// # fn main() -> pv_core::Result<()> {
|
||||
/// # fn main() -> s390_pv_core::Result<()> {
|
||||
/// let mut file = File::open("request")?;
|
||||
/// let uv = UvDevice::open()?;
|
||||
/// let mut cmd = AddCmd::new(&mut file)?;
|
||||
|
||||
@@ -27,9 +27,9 @@ use zerocopy::{AsBytes, FromZeroes};
|
||||
/// # Example
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// # use pv_core::uv::UvDevice;
|
||||
/// # use pv_core::uv::AttestationCmd;
|
||||
/// # fn main() -> pv_core::Result<()> {
|
||||
/// # use s390_pv_core::uv::UvDevice;
|
||||
/// # use s390_pv_core::uv::AttestationCmd;
|
||||
/// # fn main() -> s390_pv_core::Result<()> {
|
||||
/// let arcb = std::fs::read("arcb")?.into();
|
||||
/// let user_data = vec![0, 1, 2, 3];
|
||||
/// // Hard-coded example
|
||||
|
||||
@@ -119,7 +119,7 @@ impl SecretEntry {
|
||||
///
|
||||
/// The slice is guaranteed to be 32 bytes long.
|
||||
/// ```rust
|
||||
/// # use pv_core::uv::SecretEntry;
|
||||
/// # use s390_pv_core::uv::SecretEntry;
|
||||
/// # use zerocopy::FromZeroes;
|
||||
/// # let secr = SecretEntry::new_zeroed();
|
||||
/// # assert_eq!(secr.id().len(), 32);
|
||||
|
||||
@@ -15,8 +15,8 @@ use zerocopy::{AsBytes, U16};
|
||||
///
|
||||
/// The magic value is ASCII:
|
||||
/// ```rust
|
||||
/// # use pv_core::secret::AddSecretMagic;
|
||||
/// # use pv_core::request::MagicValue;
|
||||
/// # use s390_pv_core::secret::AddSecretMagic;
|
||||
/// # use s390_pv_core::request::MagicValue;
|
||||
/// # fn main() {
|
||||
/// # let magic =
|
||||
/// b"asrcbM"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "pvapconfig"
|
||||
description = "A tool to configure the AP resources inside a SE guest based on UV secrets and an AP config file."
|
||||
authors = ["Harald Freudenberger <freude@linux.ibm.com>"]
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
@@ -10,7 +10,7 @@ license.workspace = true
|
||||
clap = { version ="4.1", features = ["derive", "wrap_help"]}
|
||||
lazy_static = "1.1"
|
||||
openssl = { version = "0.10" }
|
||||
pv_core = { path = "../pv_core"}
|
||||
pv_core = { path = "../pv_core", package = "s390_pv_core"}
|
||||
rand = "0.8"
|
||||
regex = "1.7"
|
||||
serde = { version = "1.0.139", features = ["derive"] }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "pvsecret"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
@@ -10,5 +10,5 @@ clap = { version ="4.1", features = ["derive", "wrap_help"]}
|
||||
log = { version = "0.4.6", features = ["std", "release_max_level_debug"] }
|
||||
serde_yaml = "0.9"
|
||||
|
||||
pv = { path = "../pv" }
|
||||
utils = { path = "../utils" }
|
||||
pv = { path = "../pv" , package = "s390_pv" }
|
||||
utils = { path = "../utils"}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "utils"
|
||||
version = "0.1.0"
|
||||
version = "0.10.0"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
@@ -8,5 +8,5 @@ license.workspace = true
|
||||
clap = { version ="4.1", features = ["derive", "wrap_help"] }
|
||||
libc = "0.2.49"
|
||||
log = { version = "0.4.6", features = ["std", "release_max_level_debug"] }
|
||||
pv = { path = "../pv" }
|
||||
pv = { path = "../pv", package = "s390_pv" }
|
||||
serde = { version = "1.0.139"}
|
||||
|
||||
Reference in New Issue
Block a user