Skip to content

Upgrade prost to 0.8.0 #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[advisories]
ignore = ["RUSTSEC-2021-0073", # We do not use `prost_types::Timestamp` anywhere in our code.
"RUSTSEC-2020-0036"] # We don't have control over the exact dependencies of `protoc-grpcio`; See https://github.com/mtp401/protoc-grpcio/issues/36
ignore = []
informational_warnings = ["unmaintained"] # warn for categories of informational advisories
severity_threshold = "low" # CVSS severity ("none", "low", "medium", "high", "critical")

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ categories = ["encoding"]
edition = "2018"

[build-dependencies]
prost-build = { version = "0.6.1", optional = true }
prost-build = { version = "0.8.0", optional = true }

[dependencies]
serde = { version = "1.0.115", features = ["derive"] }
bincode = "1.3.1"
num-traits = "0.2.12"
num-derive = "0.3.2"
num = "0.3.0"
prost = "0.6.1"
prost = "0.8.0"
arbitrary = { version = "0.4.6", features = ["derive"], optional = true }
uuid = "0.8.1"
log = "0.4.11"
Expand Down
2 changes: 1 addition & 1 deletion src/operations_protobuf/generated_ops/delete_client.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
#[prost(string, tag="1")]
pub client: std::string::String,
pub client: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
Expand Down
4 changes: 2 additions & 2 deletions src/operations_protobuf/generated_ops/list_authenticators.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthenticatorInfo {
#[prost(string, tag="1")]
pub description: std::string::String,
pub description: ::prost::alloc::string::String,
#[prost(uint32, tag="2")]
pub version_maj: u32,
#[prost(uint32, tag="3")]
Expand All @@ -17,5 +17,5 @@ pub struct Operation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(message, repeated, tag="1")]
pub authenticators: ::std::vec::Vec<AuthenticatorInfo>,
pub authenticators: ::prost::alloc::vec::Vec<AuthenticatorInfo>,
}
2 changes: 1 addition & 1 deletion src/operations_protobuf/generated_ops/list_clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ pub struct Operation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(string, repeated, tag="1")]
pub clients: ::std::vec::Vec<std::string::String>,
pub clients: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
6 changes: 3 additions & 3 deletions src/operations_protobuf/generated_ops/list_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ pub struct KeyInfo {
#[prost(uint32, tag="1")]
pub provider_id: u32,
#[prost(string, tag="2")]
pub name: std::string::String,
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag="3")]
pub attributes: ::std::option::Option<super::psa_key_attributes::KeyAttributes>,
pub attributes: ::core::option::Option<super::psa_key_attributes::KeyAttributes>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(message, repeated, tag="1")]
pub keys: ::std::vec::Vec<KeyInfo>,
pub keys: ::prost::alloc::vec::Vec<KeyInfo>,
}
2 changes: 1 addition & 1 deletion src/operations_protobuf/generated_ops/list_opcodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ pub struct Operation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(uint32, repeated, tag="1")]
pub opcodes: ::std::vec::Vec<u32>,
pub opcodes: ::prost::alloc::vec::Vec<u32>,
}
8 changes: 4 additions & 4 deletions src/operations_protobuf/generated_ops/list_providers.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProviderInfo {
#[prost(string, tag="1")]
pub uuid: std::string::String,
pub uuid: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub description: std::string::String,
pub description: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub vendor: std::string::String,
pub vendor: ::prost::alloc::string::String,
#[prost(uint32, tag="4")]
pub version_maj: u32,
#[prost(uint32, tag="5")]
Expand All @@ -21,5 +21,5 @@ pub struct Operation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(message, repeated, tag="1")]
pub providers: ::std::vec::Vec<ProviderInfo>,
pub providers: ::prost::alloc::vec::Vec<ProviderInfo>,
}
20 changes: 10 additions & 10 deletions src/operations_protobuf/generated_ops/psa_aead_decrypt.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
#[prost(string, tag="1")]
pub key_name: std::string::String,
pub key_name: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub alg: ::std::option::Option<super::psa_algorithm::algorithm::Aead>,
#[prost(bytes, tag="3")]
pub nonce: std::vec::Vec<u8>,
#[prost(bytes, tag="4")]
pub additional_data: std::vec::Vec<u8>,
#[prost(bytes, tag="5")]
pub ciphertext: std::vec::Vec<u8>,
pub alg: ::core::option::Option<super::psa_algorithm::algorithm::Aead>,
#[prost(bytes="vec", tag="3")]
pub nonce: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="4")]
pub additional_data: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="5")]
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(bytes, tag="1")]
pub plaintext: std::vec::Vec<u8>,
#[prost(bytes="vec", tag="1")]
pub plaintext: ::prost::alloc::vec::Vec<u8>,
}
20 changes: 10 additions & 10 deletions src/operations_protobuf/generated_ops/psa_aead_encrypt.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
#[prost(string, tag="1")]
pub key_name: std::string::String,
pub key_name: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub alg: ::std::option::Option<super::psa_algorithm::algorithm::Aead>,
#[prost(bytes, tag="3")]
pub nonce: std::vec::Vec<u8>,
#[prost(bytes, tag="4")]
pub additional_data: std::vec::Vec<u8>,
#[prost(bytes, tag="5")]
pub plaintext: std::vec::Vec<u8>,
pub alg: ::core::option::Option<super::psa_algorithm::algorithm::Aead>,
#[prost(bytes="vec", tag="3")]
pub nonce: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="4")]
pub additional_data: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="5")]
pub plaintext: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(bytes, tag="1")]
pub ciphertext: std::vec::Vec<u8>,
#[prost(bytes="vec", tag="1")]
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
}
39 changes: 24 additions & 15 deletions src/operations_protobuf/generated_ops/psa_algorithm.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Algorithm {
#[prost(oneof="algorithm::Variant", tags="1, 2, 3, 4, 5, 6, 7, 8, 9")]
pub variant: ::std::option::Option<algorithm::Variant>,
pub variant: ::core::option::Option<algorithm::Variant>,
}
/// Nested message and enum types in `Algorithm`.
pub mod algorithm {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct None {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mac {
#[prost(oneof="mac::Variant", tags="1, 2")]
pub variant: ::std::option::Option<mac::Variant>,
pub variant: ::core::option::Option<mac::Variant>,
}
/// Nested message and enum types in `Mac`.
pub mod mac {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FullLength {
#[prost(oneof="full_length::Variant", tags="1, 2, 3")]
pub variant: ::std::option::Option<full_length::Variant>,
pub variant: ::core::option::Option<full_length::Variant>,
}
/// Nested message and enum types in `FullLength`.
pub mod full_length {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hmac {
Expand All @@ -43,7 +46,7 @@ pub mod algorithm {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Truncated {
#[prost(message, optional, tag="1")]
pub mac_alg: ::std::option::Option<FullLength>,
pub mac_alg: ::core::option::Option<FullLength>,
#[prost(uint32, tag="2")]
pub mac_length: u32,
}
Expand All @@ -58,8 +61,9 @@ pub mod algorithm {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Aead {
#[prost(oneof="aead::Variant", tags="1, 2")]
pub variant: ::std::option::Option<aead::Variant>,
pub variant: ::core::option::Option<aead::Variant>,
}
/// Nested message and enum types in `Aead`.
pub mod aead {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AeadWithShortenedTag {
Expand Down Expand Up @@ -88,14 +92,16 @@ pub mod algorithm {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AsymmetricSignature {
#[prost(oneof="asymmetric_signature::Variant", tags="1, 2, 3, 4, 5, 6")]
pub variant: ::std::option::Option<asymmetric_signature::Variant>,
pub variant: ::core::option::Option<asymmetric_signature::Variant>,
}
/// Nested message and enum types in `AsymmetricSignature`.
pub mod asymmetric_signature {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignHash {
#[prost(oneof="sign_hash::Variant", tags="1, 2")]
pub variant: ::std::option::Option<sign_hash::Variant>,
pub variant: ::core::option::Option<sign_hash::Variant>,
}
/// Nested message and enum types in `SignHash`.
pub mod sign_hash {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Any {
Expand All @@ -111,28 +117,28 @@ pub mod algorithm {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RsaPkcs1v15Sign {
#[prost(message, optional, tag="1")]
pub hash_alg: ::std::option::Option<SignHash>,
pub hash_alg: ::core::option::Option<SignHash>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RsaPkcs1v15SignRaw {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RsaPss {
#[prost(message, optional, tag="1")]
pub hash_alg: ::std::option::Option<SignHash>,
pub hash_alg: ::core::option::Option<SignHash>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ecdsa {
#[prost(message, optional, tag="1")]
pub hash_alg: ::std::option::Option<SignHash>,
pub hash_alg: ::core::option::Option<SignHash>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EcdsaAny {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeterministicEcdsa {
#[prost(message, optional, tag="1")]
pub hash_alg: ::std::option::Option<SignHash>,
pub hash_alg: ::core::option::Option<SignHash>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Variant {
Expand All @@ -153,8 +159,9 @@ pub mod algorithm {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AsymmetricEncryption {
#[prost(oneof="asymmetric_encryption::Variant", tags="1, 2")]
pub variant: ::std::option::Option<asymmetric_encryption::Variant>,
pub variant: ::core::option::Option<asymmetric_encryption::Variant>,
}
/// Nested message and enum types in `AsymmetricEncryption`.
pub mod asymmetric_encryption {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RsaPkcs1v15Crypt {
Expand All @@ -175,15 +182,16 @@ pub mod algorithm {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyAgreement {
#[prost(oneof="key_agreement::Variant", tags="1, 2")]
pub variant: ::std::option::Option<key_agreement::Variant>,
pub variant: ::core::option::Option<key_agreement::Variant>,
}
/// Nested message and enum types in `KeyAgreement`.
pub mod key_agreement {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WithKeyDerivation {
#[prost(enumeration="Raw", tag="1")]
pub ka_alg: i32,
#[prost(message, optional, tag="2")]
pub kdf_alg: ::std::option::Option<super::KeyDerivation>,
pub kdf_alg: ::core::option::Option<super::KeyDerivation>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
Expand All @@ -204,8 +212,9 @@ pub mod algorithm {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyDerivation {
#[prost(oneof="key_derivation::Variant", tags="1, 2, 3")]
pub variant: ::std::option::Option<key_derivation::Variant>,
pub variant: ::core::option::Option<key_derivation::Variant>,
}
/// Nested message and enum types in `KeyDerivation`.
pub mod key_derivation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hkdf {
Expand Down
16 changes: 8 additions & 8 deletions src/operations_protobuf/generated_ops/psa_asymmetric_decrypt.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
#[prost(string, tag="1")]
pub key_name: std::string::String,
pub key_name: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub alg: ::std::option::Option<super::psa_algorithm::algorithm::AsymmetricEncryption>,
#[prost(bytes, tag="3")]
pub ciphertext: std::vec::Vec<u8>,
#[prost(bytes, tag="4")]
pub salt: std::vec::Vec<u8>,
pub alg: ::core::option::Option<super::psa_algorithm::algorithm::AsymmetricEncryption>,
#[prost(bytes="vec", tag="3")]
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="4")]
pub salt: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(bytes, tag="1")]
pub plaintext: std::vec::Vec<u8>,
#[prost(bytes="vec", tag="1")]
pub plaintext: ::prost::alloc::vec::Vec<u8>,
}
16 changes: 8 additions & 8 deletions src/operations_protobuf/generated_ops/psa_asymmetric_encrypt.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
#[prost(string, tag="1")]
pub key_name: std::string::String,
pub key_name: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub alg: ::std::option::Option<super::psa_algorithm::algorithm::AsymmetricEncryption>,
#[prost(bytes, tag="3")]
pub plaintext: std::vec::Vec<u8>,
#[prost(bytes, tag="4")]
pub salt: std::vec::Vec<u8>,
pub alg: ::core::option::Option<super::psa_algorithm::algorithm::AsymmetricEncryption>,
#[prost(bytes="vec", tag="3")]
pub plaintext: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="4")]
pub salt: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(bytes, tag="1")]
pub ciphertext: std::vec::Vec<u8>,
#[prost(bytes="vec", tag="1")]
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
}
10 changes: 5 additions & 5 deletions src/operations_protobuf/generated_ops/psa_cipher_decrypt.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
#[prost(string, tag="1")]
pub key_name: std::string::String,
pub key_name: ::prost::alloc::string::String,
#[prost(enumeration="super::psa_algorithm::algorithm::Cipher", tag="2")]
pub alg: i32,
#[prost(bytes, tag="3")]
pub ciphertext: std::vec::Vec<u8>,
#[prost(bytes="vec", tag="3")]
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(bytes, tag="1")]
pub plaintext: std::vec::Vec<u8>,
#[prost(bytes="vec", tag="1")]
pub plaintext: ::prost::alloc::vec::Vec<u8>,
}
10 changes: 5 additions & 5 deletions src/operations_protobuf/generated_ops/psa_cipher_encrypt.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
#[prost(string, tag="1")]
pub key_name: std::string::String,
pub key_name: ::prost::alloc::string::String,
#[prost(enumeration="super::psa_algorithm::algorithm::Cipher", tag="2")]
pub alg: i32,
#[prost(bytes, tag="3")]
pub plaintext: std::vec::Vec<u8>,
#[prost(bytes="vec", tag="3")]
pub plaintext: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(bytes, tag="1")]
pub ciphertext: std::vec::Vec<u8>,
#[prost(bytes="vec", tag="1")]
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
}
Loading