Skip to content

Commit e5b7f17

Browse files
authored
Merge pull request #121 from hug-dev/upgrade-prost
Upgrade prost to 0.8.0
2 parents 79b6f18 + ea2752e commit e5b7f17

31 files changed

+155
-146
lines changed

.cargo/audit.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[advisories]
2-
ignore = ["RUSTSEC-2021-0073", # We do not use `prost_types::Timestamp` anywhere in our code.
3-
"RUSTSEC-2020-0036"] # We don't have control over the exact dependencies of `protoc-grpcio`; See https://github.com/mtp401/protoc-grpcio/issues/36
2+
ignore = []
43
informational_warnings = ["unmaintained"] # warn for categories of informational advisories
54
severity_threshold = "low" # CVSS severity ("none", "low", "medium", "high", "critical")
65

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ categories = ["encoding"]
1111
edition = "2018"
1212

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

1616
[dependencies]
1717
serde = { version = "1.0.115", features = ["derive"] }
1818
bincode = "1.3.1"
1919
num-traits = "0.2.12"
2020
num-derive = "0.3.2"
2121
num = "0.3.0"
22-
prost = "0.6.1"
22+
prost = "0.8.0"
2323
arbitrary = { version = "0.4.6", features = ["derive"], optional = true }
2424
uuid = "0.8.1"
2525
log = "0.4.11"

src/operations_protobuf/generated_ops/delete_client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct Operation {
33
#[prost(string, tag="1")]
4-
pub client: std::string::String,
4+
pub client: ::prost::alloc::string::String,
55
}
66
#[derive(Clone, PartialEq, ::prost::Message)]
77
pub struct Result {

src/operations_protobuf/generated_ops/list_authenticators.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct AuthenticatorInfo {
33
#[prost(string, tag="1")]
4-
pub description: std::string::String,
4+
pub description: ::prost::alloc::string::String,
55
#[prost(uint32, tag="2")]
66
pub version_maj: u32,
77
#[prost(uint32, tag="3")]
@@ -17,5 +17,5 @@ pub struct Operation {
1717
#[derive(Clone, PartialEq, ::prost::Message)]
1818
pub struct Result {
1919
#[prost(message, repeated, tag="1")]
20-
pub authenticators: ::std::vec::Vec<AuthenticatorInfo>,
20+
pub authenticators: ::prost::alloc::vec::Vec<AuthenticatorInfo>,
2121
}

src/operations_protobuf/generated_ops/list_clients.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ pub struct Operation {
44
#[derive(Clone, PartialEq, ::prost::Message)]
55
pub struct Result {
66
#[prost(string, repeated, tag="1")]
7-
pub clients: ::std::vec::Vec<std::string::String>,
7+
pub clients: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
88
}

src/operations_protobuf/generated_ops/list_keys.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ pub struct KeyInfo {
33
#[prost(uint32, tag="1")]
44
pub provider_id: u32,
55
#[prost(string, tag="2")]
6-
pub name: std::string::String,
6+
pub name: ::prost::alloc::string::String,
77
#[prost(message, optional, tag="3")]
8-
pub attributes: ::std::option::Option<super::psa_key_attributes::KeyAttributes>,
8+
pub attributes: ::core::option::Option<super::psa_key_attributes::KeyAttributes>,
99
}
1010
#[derive(Clone, PartialEq, ::prost::Message)]
1111
pub struct Operation {
1212
}
1313
#[derive(Clone, PartialEq, ::prost::Message)]
1414
pub struct Result {
1515
#[prost(message, repeated, tag="1")]
16-
pub keys: ::std::vec::Vec<KeyInfo>,
16+
pub keys: ::prost::alloc::vec::Vec<KeyInfo>,
1717
}

src/operations_protobuf/generated_ops/list_opcodes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ pub struct Operation {
66
#[derive(Clone, PartialEq, ::prost::Message)]
77
pub struct Result {
88
#[prost(uint32, repeated, tag="1")]
9-
pub opcodes: ::std::vec::Vec<u32>,
9+
pub opcodes: ::prost::alloc::vec::Vec<u32>,
1010
}

src/operations_protobuf/generated_ops/list_providers.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct ProviderInfo {
33
#[prost(string, tag="1")]
4-
pub uuid: std::string::String,
4+
pub uuid: ::prost::alloc::string::String,
55
#[prost(string, tag="2")]
6-
pub description: std::string::String,
6+
pub description: ::prost::alloc::string::String,
77
#[prost(string, tag="3")]
8-
pub vendor: std::string::String,
8+
pub vendor: ::prost::alloc::string::String,
99
#[prost(uint32, tag="4")]
1010
pub version_maj: u32,
1111
#[prost(uint32, tag="5")]
@@ -21,5 +21,5 @@ pub struct Operation {
2121
#[derive(Clone, PartialEq, ::prost::Message)]
2222
pub struct Result {
2323
#[prost(message, repeated, tag="1")]
24-
pub providers: ::std::vec::Vec<ProviderInfo>,
24+
pub providers: ::prost::alloc::vec::Vec<ProviderInfo>,
2525
}
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct Operation {
33
#[prost(string, tag="1")]
4-
pub key_name: std::string::String,
4+
pub key_name: ::prost::alloc::string::String,
55
#[prost(message, optional, tag="2")]
6-
pub alg: ::std::option::Option<super::psa_algorithm::algorithm::Aead>,
7-
#[prost(bytes, tag="3")]
8-
pub nonce: std::vec::Vec<u8>,
9-
#[prost(bytes, tag="4")]
10-
pub additional_data: std::vec::Vec<u8>,
11-
#[prost(bytes, tag="5")]
12-
pub ciphertext: std::vec::Vec<u8>,
6+
pub alg: ::core::option::Option<super::psa_algorithm::algorithm::Aead>,
7+
#[prost(bytes="vec", tag="3")]
8+
pub nonce: ::prost::alloc::vec::Vec<u8>,
9+
#[prost(bytes="vec", tag="4")]
10+
pub additional_data: ::prost::alloc::vec::Vec<u8>,
11+
#[prost(bytes="vec", tag="5")]
12+
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
1313
}
1414
#[derive(Clone, PartialEq, ::prost::Message)]
1515
pub struct Result {
16-
#[prost(bytes, tag="1")]
17-
pub plaintext: std::vec::Vec<u8>,
16+
#[prost(bytes="vec", tag="1")]
17+
pub plaintext: ::prost::alloc::vec::Vec<u8>,
1818
}
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct Operation {
33
#[prost(string, tag="1")]
4-
pub key_name: std::string::String,
4+
pub key_name: ::prost::alloc::string::String,
55
#[prost(message, optional, tag="2")]
6-
pub alg: ::std::option::Option<super::psa_algorithm::algorithm::Aead>,
7-
#[prost(bytes, tag="3")]
8-
pub nonce: std::vec::Vec<u8>,
9-
#[prost(bytes, tag="4")]
10-
pub additional_data: std::vec::Vec<u8>,
11-
#[prost(bytes, tag="5")]
12-
pub plaintext: std::vec::Vec<u8>,
6+
pub alg: ::core::option::Option<super::psa_algorithm::algorithm::Aead>,
7+
#[prost(bytes="vec", tag="3")]
8+
pub nonce: ::prost::alloc::vec::Vec<u8>,
9+
#[prost(bytes="vec", tag="4")]
10+
pub additional_data: ::prost::alloc::vec::Vec<u8>,
11+
#[prost(bytes="vec", tag="5")]
12+
pub plaintext: ::prost::alloc::vec::Vec<u8>,
1313
}
1414
#[derive(Clone, PartialEq, ::prost::Message)]
1515
pub struct Result {
16-
#[prost(bytes, tag="1")]
17-
pub ciphertext: std::vec::Vec<u8>,
16+
#[prost(bytes="vec", tag="1")]
17+
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
1818
}

src/operations_protobuf/generated_ops/psa_algorithm.rs

+24-15
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct Algorithm {
33
#[prost(oneof="algorithm::Variant", tags="1, 2, 3, 4, 5, 6, 7, 8, 9")]
4-
pub variant: ::std::option::Option<algorithm::Variant>,
4+
pub variant: ::core::option::Option<algorithm::Variant>,
55
}
6+
/// Nested message and enum types in `Algorithm`.
67
pub mod algorithm {
78
#[derive(Clone, PartialEq, ::prost::Message)]
89
pub struct None {
910
}
1011
#[derive(Clone, PartialEq, ::prost::Message)]
1112
pub struct Mac {
1213
#[prost(oneof="mac::Variant", tags="1, 2")]
13-
pub variant: ::std::option::Option<mac::Variant>,
14+
pub variant: ::core::option::Option<mac::Variant>,
1415
}
16+
/// Nested message and enum types in `Mac`.
1517
pub mod mac {
1618
#[derive(Clone, PartialEq, ::prost::Message)]
1719
pub struct FullLength {
1820
#[prost(oneof="full_length::Variant", tags="1, 2, 3")]
19-
pub variant: ::std::option::Option<full_length::Variant>,
21+
pub variant: ::core::option::Option<full_length::Variant>,
2022
}
23+
/// Nested message and enum types in `FullLength`.
2124
pub mod full_length {
2225
#[derive(Clone, PartialEq, ::prost::Message)]
2326
pub struct Hmac {
@@ -43,7 +46,7 @@ pub mod algorithm {
4346
#[derive(Clone, PartialEq, ::prost::Message)]
4447
pub struct Truncated {
4548
#[prost(message, optional, tag="1")]
46-
pub mac_alg: ::std::option::Option<FullLength>,
49+
pub mac_alg: ::core::option::Option<FullLength>,
4750
#[prost(uint32, tag="2")]
4851
pub mac_length: u32,
4952
}
@@ -58,8 +61,9 @@ pub mod algorithm {
5861
#[derive(Clone, PartialEq, ::prost::Message)]
5962
pub struct Aead {
6063
#[prost(oneof="aead::Variant", tags="1, 2")]
61-
pub variant: ::std::option::Option<aead::Variant>,
64+
pub variant: ::core::option::Option<aead::Variant>,
6265
}
66+
/// Nested message and enum types in `Aead`.
6367
pub mod aead {
6468
#[derive(Clone, PartialEq, ::prost::Message)]
6569
pub struct AeadWithShortenedTag {
@@ -88,14 +92,16 @@ pub mod algorithm {
8892
#[derive(Clone, PartialEq, ::prost::Message)]
8993
pub struct AsymmetricSignature {
9094
#[prost(oneof="asymmetric_signature::Variant", tags="1, 2, 3, 4, 5, 6")]
91-
pub variant: ::std::option::Option<asymmetric_signature::Variant>,
95+
pub variant: ::core::option::Option<asymmetric_signature::Variant>,
9296
}
97+
/// Nested message and enum types in `AsymmetricSignature`.
9398
pub mod asymmetric_signature {
9499
#[derive(Clone, PartialEq, ::prost::Message)]
95100
pub struct SignHash {
96101
#[prost(oneof="sign_hash::Variant", tags="1, 2")]
97-
pub variant: ::std::option::Option<sign_hash::Variant>,
102+
pub variant: ::core::option::Option<sign_hash::Variant>,
98103
}
104+
/// Nested message and enum types in `SignHash`.
99105
pub mod sign_hash {
100106
#[derive(Clone, PartialEq, ::prost::Message)]
101107
pub struct Any {
@@ -111,28 +117,28 @@ pub mod algorithm {
111117
#[derive(Clone, PartialEq, ::prost::Message)]
112118
pub struct RsaPkcs1v15Sign {
113119
#[prost(message, optional, tag="1")]
114-
pub hash_alg: ::std::option::Option<SignHash>,
120+
pub hash_alg: ::core::option::Option<SignHash>,
115121
}
116122
#[derive(Clone, PartialEq, ::prost::Message)]
117123
pub struct RsaPkcs1v15SignRaw {
118124
}
119125
#[derive(Clone, PartialEq, ::prost::Message)]
120126
pub struct RsaPss {
121127
#[prost(message, optional, tag="1")]
122-
pub hash_alg: ::std::option::Option<SignHash>,
128+
pub hash_alg: ::core::option::Option<SignHash>,
123129
}
124130
#[derive(Clone, PartialEq, ::prost::Message)]
125131
pub struct Ecdsa {
126132
#[prost(message, optional, tag="1")]
127-
pub hash_alg: ::std::option::Option<SignHash>,
133+
pub hash_alg: ::core::option::Option<SignHash>,
128134
}
129135
#[derive(Clone, PartialEq, ::prost::Message)]
130136
pub struct EcdsaAny {
131137
}
132138
#[derive(Clone, PartialEq, ::prost::Message)]
133139
pub struct DeterministicEcdsa {
134140
#[prost(message, optional, tag="1")]
135-
pub hash_alg: ::std::option::Option<SignHash>,
141+
pub hash_alg: ::core::option::Option<SignHash>,
136142
}
137143
#[derive(Clone, PartialEq, ::prost::Oneof)]
138144
pub enum Variant {
@@ -153,8 +159,9 @@ pub mod algorithm {
153159
#[derive(Clone, PartialEq, ::prost::Message)]
154160
pub struct AsymmetricEncryption {
155161
#[prost(oneof="asymmetric_encryption::Variant", tags="1, 2")]
156-
pub variant: ::std::option::Option<asymmetric_encryption::Variant>,
162+
pub variant: ::core::option::Option<asymmetric_encryption::Variant>,
157163
}
164+
/// Nested message and enum types in `AsymmetricEncryption`.
158165
pub mod asymmetric_encryption {
159166
#[derive(Clone, PartialEq, ::prost::Message)]
160167
pub struct RsaPkcs1v15Crypt {
@@ -175,15 +182,16 @@ pub mod algorithm {
175182
#[derive(Clone, PartialEq, ::prost::Message)]
176183
pub struct KeyAgreement {
177184
#[prost(oneof="key_agreement::Variant", tags="1, 2")]
178-
pub variant: ::std::option::Option<key_agreement::Variant>,
185+
pub variant: ::core::option::Option<key_agreement::Variant>,
179186
}
187+
/// Nested message and enum types in `KeyAgreement`.
180188
pub mod key_agreement {
181189
#[derive(Clone, PartialEq, ::prost::Message)]
182190
pub struct WithKeyDerivation {
183191
#[prost(enumeration="Raw", tag="1")]
184192
pub ka_alg: i32,
185193
#[prost(message, optional, tag="2")]
186-
pub kdf_alg: ::std::option::Option<super::KeyDerivation>,
194+
pub kdf_alg: ::core::option::Option<super::KeyDerivation>,
187195
}
188196
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
189197
#[repr(i32)]
@@ -204,8 +212,9 @@ pub mod algorithm {
204212
#[derive(Clone, PartialEq, ::prost::Message)]
205213
pub struct KeyDerivation {
206214
#[prost(oneof="key_derivation::Variant", tags="1, 2, 3")]
207-
pub variant: ::std::option::Option<key_derivation::Variant>,
215+
pub variant: ::core::option::Option<key_derivation::Variant>,
208216
}
217+
/// Nested message and enum types in `KeyDerivation`.
209218
pub mod key_derivation {
210219
#[derive(Clone, PartialEq, ::prost::Message)]
211220
pub struct Hkdf {
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct Operation {
33
#[prost(string, tag="1")]
4-
pub key_name: std::string::String,
4+
pub key_name: ::prost::alloc::string::String,
55
#[prost(message, optional, tag="2")]
6-
pub alg: ::std::option::Option<super::psa_algorithm::algorithm::AsymmetricEncryption>,
7-
#[prost(bytes, tag="3")]
8-
pub ciphertext: std::vec::Vec<u8>,
9-
#[prost(bytes, tag="4")]
10-
pub salt: std::vec::Vec<u8>,
6+
pub alg: ::core::option::Option<super::psa_algorithm::algorithm::AsymmetricEncryption>,
7+
#[prost(bytes="vec", tag="3")]
8+
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
9+
#[prost(bytes="vec", tag="4")]
10+
pub salt: ::prost::alloc::vec::Vec<u8>,
1111
}
1212
#[derive(Clone, PartialEq, ::prost::Message)]
1313
pub struct Result {
14-
#[prost(bytes, tag="1")]
15-
pub plaintext: std::vec::Vec<u8>,
14+
#[prost(bytes="vec", tag="1")]
15+
pub plaintext: ::prost::alloc::vec::Vec<u8>,
1616
}
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct Operation {
33
#[prost(string, tag="1")]
4-
pub key_name: std::string::String,
4+
pub key_name: ::prost::alloc::string::String,
55
#[prost(message, optional, tag="2")]
6-
pub alg: ::std::option::Option<super::psa_algorithm::algorithm::AsymmetricEncryption>,
7-
#[prost(bytes, tag="3")]
8-
pub plaintext: std::vec::Vec<u8>,
9-
#[prost(bytes, tag="4")]
10-
pub salt: std::vec::Vec<u8>,
6+
pub alg: ::core::option::Option<super::psa_algorithm::algorithm::AsymmetricEncryption>,
7+
#[prost(bytes="vec", tag="3")]
8+
pub plaintext: ::prost::alloc::vec::Vec<u8>,
9+
#[prost(bytes="vec", tag="4")]
10+
pub salt: ::prost::alloc::vec::Vec<u8>,
1111
}
1212
#[derive(Clone, PartialEq, ::prost::Message)]
1313
pub struct Result {
14-
#[prost(bytes, tag="1")]
15-
pub ciphertext: std::vec::Vec<u8>,
14+
#[prost(bytes="vec", tag="1")]
15+
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
1616
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct Operation {
33
#[prost(string, tag="1")]
4-
pub key_name: std::string::String,
4+
pub key_name: ::prost::alloc::string::String,
55
#[prost(enumeration="super::psa_algorithm::algorithm::Cipher", tag="2")]
66
pub alg: i32,
7-
#[prost(bytes, tag="3")]
8-
pub ciphertext: std::vec::Vec<u8>,
7+
#[prost(bytes="vec", tag="3")]
8+
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
99
}
1010
#[derive(Clone, PartialEq, ::prost::Message)]
1111
pub struct Result {
12-
#[prost(bytes, tag="1")]
13-
pub plaintext: std::vec::Vec<u8>,
12+
#[prost(bytes="vec", tag="1")]
13+
pub plaintext: ::prost::alloc::vec::Vec<u8>,
1414
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#[derive(Clone, PartialEq, ::prost::Message)]
22
pub struct Operation {
33
#[prost(string, tag="1")]
4-
pub key_name: std::string::String,
4+
pub key_name: ::prost::alloc::string::String,
55
#[prost(enumeration="super::psa_algorithm::algorithm::Cipher", tag="2")]
66
pub alg: i32,
7-
#[prost(bytes, tag="3")]
8-
pub plaintext: std::vec::Vec<u8>,
7+
#[prost(bytes="vec", tag="3")]
8+
pub plaintext: ::prost::alloc::vec::Vec<u8>,
99
}
1010
#[derive(Clone, PartialEq, ::prost::Message)]
1111
pub struct Result {
12-
#[prost(bytes, tag="1")]
13-
pub ciphertext: std::vec::Vec<u8>,
12+
#[prost(bytes="vec", tag="1")]
13+
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
1414
}

0 commit comments

Comments
 (0)