Debian Codegraph @

gen/pb-rust/sigstore-protobuf-specs/src/generated/dev.sigstore.common.v1.rs

raw
1 // This file is @generated by prost-build.
2 /// HashOutput captures a digest of a 'message' (generic octet sequence)
3 /// and the corresponding hash algorithm used.
4 #[derive(
5 sigstore_protobuf_specs_derive::Deserialize_proto,
6 sigstore_protobuf_specs_derive::Serialize_proto
7 )]
8 #[derive(::prost_reflect::ReflectMessage)]
9 #[prost_reflect(message_name = "dev.sigstore.common.v1.HashOutput")]
10 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
11 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12 pub struct HashOutput {
13 #[prost(enumeration = "HashAlgorithm", tag = "1")]
14 pub algorithm: i32,
15 /// This is the raw octets of the message digest as computed by
16 /// the hash algorithm.
17 #[prost(bytes = "vec", tag = "2")]
18 pub digest: ::prost::alloc::vec::Vec<u8>,
19 }
20 /// MessageSignature stores the computed signature over a message.
21 #[derive(
22 sigstore_protobuf_specs_derive::Deserialize_proto,
23 sigstore_protobuf_specs_derive::Serialize_proto
24 )]
25 #[derive(::prost_reflect::ReflectMessage)]
26 #[prost_reflect(message_name = "dev.sigstore.common.v1.MessageSignature")]
27 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
28 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
29 pub struct MessageSignature {
30 /// Message digest can be used to identify the artifact.
31 /// Clients MUST NOT attempt to use this digest to verify the associated
32 /// signature; it is intended solely for identification.
33 #[prost(message, optional, tag = "1")]
34 pub message_digest: ::core::option::Option<HashOutput>,
35 /// The raw bytes as returned from the signature algorithm.
36 /// The signature algorithm (and so the format of the signature bytes)
37 /// are determined by the contents of the 'verification_material',
38 /// either a key-pair or a certificate. If using a certificate, the
39 /// certificate contains the required information on the signature
40 /// algorithm.
41 /// When using a key pair, the algorithm MUST be part of the public
42 /// key, which MUST be communicated out-of-band.
43 #[prost(bytes = "vec", tag = "2")]
44 pub signature: ::prost::alloc::vec::Vec<u8>,
45 }
46 /// LogId captures the identity of a transparency log.
47 #[derive(
48 sigstore_protobuf_specs_derive::Deserialize_proto,
49 sigstore_protobuf_specs_derive::Serialize_proto
50 )]
51 #[derive(::prost_reflect::ReflectMessage)]
52 #[prost_reflect(message_name = "dev.sigstore.common.v1.LogId")]
53 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
54 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
55 pub struct LogId {
56 /// The unique identity of the log, represented by its public key.
57 #[prost(bytes = "vec", tag = "1")]
58 pub key_id: ::prost::alloc::vec::Vec<u8>,
59 }
60 /// This message holds a RFC 3161 timestamp.
61 #[derive(
62 sigstore_protobuf_specs_derive::Deserialize_proto,
63 sigstore_protobuf_specs_derive::Serialize_proto
64 )]
65 #[derive(::prost_reflect::ReflectMessage)]
66 #[prost_reflect(message_name = "dev.sigstore.common.v1.RFC3161SignedTimestamp")]
67 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
68 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
69 pub struct Rfc3161SignedTimestamp {
70 /// Signed timestamp is the DER encoded TimeStampResponse.
71 /// See <https://www.rfc-editor.org/rfc/rfc3161.html#section-2.4.2>
72 #[prost(bytes = "vec", tag = "1")]
73 pub signed_timestamp: ::prost::alloc::vec::Vec<u8>,
74 }
75 #[derive(
76 sigstore_protobuf_specs_derive::Deserialize_proto,
77 sigstore_protobuf_specs_derive::Serialize_proto
78 )]
79 #[derive(::prost_reflect::ReflectMessage)]
80 #[prost_reflect(message_name = "dev.sigstore.common.v1.PublicKey")]
81 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
82 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
83 pub struct PublicKey {
84 /// DER-encoded public key, encoding method is specified by the
85 /// key_details attribute.
86 #[prost(bytes = "vec", optional, tag = "1")]
87 pub raw_bytes: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
88 /// Key encoding and signature algorithm to use for this key.
89 #[prost(enumeration = "PublicKeyDetails", tag = "2")]
90 pub key_details: i32,
91 /// Optional validity period for this key, *inclusive* of the endpoints.
92 #[prost(message, optional, tag = "3")]
93 pub valid_for: ::core::option::Option<TimeRange>,
94 }
95 /// PublicKeyIdentifier can be used to identify an (out of band) delivered
96 /// key, to verify a signature.
97 #[derive(
98 sigstore_protobuf_specs_derive::Deserialize_proto,
99 sigstore_protobuf_specs_derive::Serialize_proto
100 )]
101 #[derive(::prost_reflect::ReflectMessage)]
102 #[prost_reflect(message_name = "dev.sigstore.common.v1.PublicKeyIdentifier")]
103 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
104 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
105 pub struct PublicKeyIdentifier {
106 /// Optional unauthenticated hint on which key to use.
107 /// The format of the hint must be agreed upon out of band by the
108 /// signer and the verifiers, and so is not subject to this
109 /// specification.
110 /// Example use-case is to specify the public key to use, from a
111 /// trusted key-ring.
112 /// Implementors are RECOMMENDED to derive the value from the public
113 /// key as described in RFC 6962.
114 /// See: <<https://www.rfc-editor.org/rfc/rfc6962#section-3.2>>
115 #[prost(string, tag = "1")]
116 pub hint: ::prost::alloc::string::String,
117 }
118 /// An ASN.1 OBJECT IDENTIFIER
119 #[derive(
120 sigstore_protobuf_specs_derive::Deserialize_proto,
121 sigstore_protobuf_specs_derive::Serialize_proto
122 )]
123 #[derive(::prost_reflect::ReflectMessage)]
124 #[prost_reflect(message_name = "dev.sigstore.common.v1.ObjectIdentifier")]
125 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
126 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
127 pub struct ObjectIdentifier {
128 #[prost(int32, repeated, packed = "false", tag = "1")]
129 pub id: ::prost::alloc::vec::Vec<i32>,
130 }
131 /// An OID and the corresponding (byte) value.
132 #[derive(
133 sigstore_protobuf_specs_derive::Deserialize_proto,
134 sigstore_protobuf_specs_derive::Serialize_proto
135 )]
136 #[derive(::prost_reflect::ReflectMessage)]
137 #[prost_reflect(message_name = "dev.sigstore.common.v1.ObjectIdentifierValuePair")]
138 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
139 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
140 pub struct ObjectIdentifierValuePair {
141 #[prost(message, optional, tag = "1")]
142 pub oid: ::core::option::Option<ObjectIdentifier>,
143 #[prost(bytes = "vec", tag = "2")]
144 pub value: ::prost::alloc::vec::Vec<u8>,
145 }
146 #[derive(
147 sigstore_protobuf_specs_derive::Deserialize_proto,
148 sigstore_protobuf_specs_derive::Serialize_proto
149 )]
150 #[derive(::prost_reflect::ReflectMessage)]
151 #[prost_reflect(message_name = "dev.sigstore.common.v1.DistinguishedName")]
152 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
153 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
154 pub struct DistinguishedName {
155 #[prost(string, tag = "1")]
156 pub organization: ::prost::alloc::string::String,
157 #[prost(string, tag = "2")]
158 pub common_name: ::prost::alloc::string::String,
159 }
160 #[derive(
161 sigstore_protobuf_specs_derive::Deserialize_proto,
162 sigstore_protobuf_specs_derive::Serialize_proto
163 )]
164 #[derive(::prost_reflect::ReflectMessage)]
165 #[prost_reflect(message_name = "dev.sigstore.common.v1.X509Certificate")]
166 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
167 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
168 pub struct X509Certificate {
169 /// DER-encoded X.509 certificate.
170 #[prost(bytes = "vec", tag = "1")]
171 pub raw_bytes: ::prost::alloc::vec::Vec<u8>,
172 }
173 #[derive(
174 sigstore_protobuf_specs_derive::Deserialize_proto,
175 sigstore_protobuf_specs_derive::Serialize_proto
176 )]
177 #[derive(::prost_reflect::ReflectMessage)]
178 #[prost_reflect(message_name = "dev.sigstore.common.v1.SubjectAlternativeName")]
179 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
180 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
181 pub struct SubjectAlternativeName {
182 #[prost(enumeration = "SubjectAlternativeNameType", tag = "1")]
183 pub r#type: i32,
184 #[prost(oneof = "subject_alternative_name::Identity", tags = "2, 3")]
185 pub identity: ::core::option::Option<subject_alternative_name::Identity>,
186 }
187 /// Nested message and enum types in `SubjectAlternativeName`.
188 pub mod subject_alternative_name {
189 #[derive(
190 sigstore_protobuf_specs_derive::Deserialize_proto,
191 sigstore_protobuf_specs_derive::Serialize_proto
192 )]
193 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
194 pub enum Identity {
195 /// A regular expression describing the expected value for
196 /// the SAN.
197 #[prost(string, tag = "2")]
198 Regexp(::prost::alloc::string::String),
199 /// The exact value to match against.
200 #[prost(string, tag = "3")]
201 Value(::prost::alloc::string::String),
202 }
203 }
204 /// A collection of X.509 certificates.
205 ///
206 /// This "chain" can be used in multiple contexts, such as providing a root CA
207 /// certificate within a TUF root of trust or multiple untrusted certificates for
208 /// the purpose of chain building.
209 #[derive(
210 sigstore_protobuf_specs_derive::Deserialize_proto,
211 sigstore_protobuf_specs_derive::Serialize_proto
212 )]
213 #[derive(::prost_reflect::ReflectMessage)]
214 #[prost_reflect(message_name = "dev.sigstore.common.v1.X509CertificateChain")]
215 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
216 #[derive(Clone, PartialEq, ::prost::Message)]
217 pub struct X509CertificateChain {
218 /// One or more DER-encoded certificates.
219 ///
220 /// In some contexts (such as `VerificationMaterial.x509_certificate_chain`), this sequence
221 /// has an imposed order. Unless explicitly specified, there is otherwise no
222 /// guaranteed order.
223 #[prost(message, repeated, tag = "1")]
224 pub certificates: ::prost::alloc::vec::Vec<X509Certificate>,
225 }
226 /// The time range is closed and includes both the start and end times,
227 /// (i.e., \[start, end\]).
228 /// End is optional to be able to capture a period that has started but
229 /// has no known end.
230 #[derive(
231 sigstore_protobuf_specs_derive::Deserialize_proto,
232 sigstore_protobuf_specs_derive::Serialize_proto
233 )]
234 #[derive(::prost_reflect::ReflectMessage)]
235 #[prost_reflect(message_name = "dev.sigstore.common.v1.TimeRange")]
236 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
237 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
238 pub struct TimeRange {
239 #[prost(message, optional, tag = "1")]
240 pub start: ::core::option::Option<::prost_types::Timestamp>,
241 #[prost(message, optional, tag = "2")]
242 pub end: ::core::option::Option<::prost_types::Timestamp>,
243 }
244 /// Only a subset of the secure hash standard algorithms are supported.
245 /// See <<https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf>> for more
246 /// details.
247 /// UNSPECIFIED SHOULD not be used, primary reason for inclusion is to force
248 /// any proto JSON serialization to emit the used hash algorithm, as default
249 /// option is to *omit* the default value of an enum (which is the first
250 /// value, represented by '0'.
251 #[derive(
252 sigstore_protobuf_specs_derive::Deserialize_proto,
253 sigstore_protobuf_specs_derive::Serialize_proto
254 )]
255 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
256 #[repr(i32)]
257 pub enum HashAlgorithm {
258 Unspecified = 0,
259 Sha2256 = 1,
260 Sha2384 = 2,
261 Sha2512 = 3,
262 /// Used for LMS
263 #[deprecated]
264 Sha3256 = 4,
265 /// Used for LMS
266 #[deprecated]
267 Sha3384 = 5,
268 }
269 impl HashAlgorithm {
270 /// String value of the enum field names used in the ProtoBuf definition.
271 ///
272 /// The values are not transformed in any way and thus are considered stable
273 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
274 pub fn as_str_name(&self) -> &'static str {
275 match self {
276 Self::Unspecified => "HASH_ALGORITHM_UNSPECIFIED",
277 Self::Sha2256 => "SHA2_256",
278 Self::Sha2384 => "SHA2_384",
279 Self::Sha2512 => "SHA2_512",
280 #[allow(deprecated)]
281 Self::Sha3256 => "SHA3_256",
282 #[allow(deprecated)]
283 Self::Sha3384 => "SHA3_384",
284 }
285 }
286 /// Creates an enum from field names used in the ProtoBuf definition.
287 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
288 match value {
289 "HASH_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
290 "SHA2_256" => Some(Self::Sha2256),
291 "SHA2_384" => Some(Self::Sha2384),
292 "SHA2_512" => Some(Self::Sha2512),
293 "SHA3_256" => Some(#[allow(deprecated)] Self::Sha3256),
294 "SHA3_384" => Some(#[allow(deprecated)] Self::Sha3384),
295 _ => None,
296 }
297 }
298 }
299 /// Details of a specific public key, capturing the the key encoding method,
300 /// and signature algorithm.
301 ///
302 /// PublicKeyDetails captures the public key/hash algorithm combinations
303 /// recommended in the Sigstore ecosystem.
304 ///
305 /// This is modelled as a linear set as we want to provide a small number of
306 /// opinionated options instead of allowing every possible permutation.
307 ///
308 /// Any changes to this enum MUST be reflected in the algorithm registry.
309 ///
310 /// See: <<https://github.com/sigstore/architecture-docs/blob/main/algorithm-registry.md>>
311 ///
312 /// To avoid the possibility of contradicting formats such as PKCS1 with
313 /// ED25519 the valid permutations are listed as a linear set instead of a
314 /// cartesian set (i.e one combined variable instead of two, one for encoding
315 /// and one for the signature algorithm).
316 #[derive(
317 sigstore_protobuf_specs_derive::Deserialize_proto,
318 sigstore_protobuf_specs_derive::Serialize_proto
319 )]
320 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
321 #[repr(i32)]
322 pub enum PublicKeyDetails {
323 Unspecified = 0,
324 /// RSA
325 ///
326 /// See RFC8017
327 #[deprecated]
328 Pkcs1RsaPkcs1v5 = 1,
329 /// See RFC8017
330 #[deprecated]
331 Pkcs1RsaPss = 2,
332 #[deprecated]
333 PkixRsaPkcs1v5 = 3,
334 #[deprecated]
335 PkixRsaPss = 4,
336 /// RSA public key in PKIX format, PKCS#1v1.5 signature
337 PkixRsaPkcs1v152048Sha256 = 9,
338 PkixRsaPkcs1v153072Sha256 = 10,
339 PkixRsaPkcs1v154096Sha256 = 11,
340 /// RSA public key in PKIX format, RSASSA-PSS signature
341 ///
342 /// See RFC4055
343 PkixRsaPss2048Sha256 = 16,
344 PkixRsaPss3072Sha256 = 17,
345 PkixRsaPss4096Sha256 = 18,
346 /// ECDSA
347 ///
348 /// See RFC6979
349 #[deprecated]
350 PkixEcdsaP256HmacSha256 = 6,
351 /// See NIST FIPS 186-4
352 PkixEcdsaP256Sha256 = 5,
353 PkixEcdsaP384Sha384 = 12,
354 PkixEcdsaP521Sha512 = 13,
355 /// Ed 25519
356 ///
357 /// See RFC8032
358 PkixEd25519 = 7,
359 PkixEd25519Ph = 8,
360 /// These algorithms are deprecated and should not be used, but they
361 /// were/are being used by most Sigstore clients implementations.
362 #[deprecated]
363 PkixEcdsaP384Sha256 = 19,
364 #[deprecated]
365 PkixEcdsaP521Sha256 = 20,
366 /// LMS and LM-OTS
367 ///
368 /// These algorithms are deprecated and should not be used.
369 /// There are no plans to support SLH-DSA at this time.
370 ///
371 /// USER WARNING: LMS and LM-OTS are both stateful signature schemes.
372 /// Using them correctly requires discretion and careful consideration
373 /// to ensure that individual secret keys are not used more than once.
374 /// In addition, LM-OTS is a single-use scheme, meaning that it
375 /// MUST NOT be used for more than one signature per LM-OTS key.
376 /// If you cannot maintain these invariants, you MUST NOT use these
377 /// schemes.
378 #[deprecated]
379 LmsSha256 = 14,
380 #[deprecated]
381 LmotsSha256 = 15,
382 /// ML-DSA
383 ///
384 /// These ML_DSA_44, ML_DSA_65 and ML-DSA_87 algorithms are the pure variants
385 /// that take data to sign rather than the prehash variants (HashML-DSA), which
386 /// take digests. While considered quantum-resistant, their usage
387 /// involves tradeoffs in that signatures and keys are much larger, and
388 /// this makes deployments more costly.
389 ///
390 /// USER WARNING: ML_DSA_44, ML_DSA_65 and ML_DSA_87 are experimental algorithms.
391 /// In the future they MAY be used by private Sigstore deployments, but
392 /// they are not yet fully functional. This warning will be removed when
393 /// these algorithms are widely supported by Sigstore clients and servers,
394 /// but care should still be taken for production environments.
395 ///
396 /// See NIST FIPS 204, RFC 9881 for algorithm identifiers
397 MlDsa44 = 23,
398 MlDsa65 = 21,
399 MlDsa87 = 22,
400 }
401 impl PublicKeyDetails {
402 /// String value of the enum field names used in the ProtoBuf definition.
403 ///
404 /// The values are not transformed in any way and thus are considered stable
405 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
406 pub fn as_str_name(&self) -> &'static str {
407 match self {
408 Self::Unspecified => "PUBLIC_KEY_DETAILS_UNSPECIFIED",
409 #[allow(deprecated)]
410 Self::Pkcs1RsaPkcs1v5 => "PKCS1_RSA_PKCS1V5",
411 #[allow(deprecated)]
412 Self::Pkcs1RsaPss => "PKCS1_RSA_PSS",
413 #[allow(deprecated)]
414 Self::PkixRsaPkcs1v5 => "PKIX_RSA_PKCS1V5",
415 #[allow(deprecated)]
416 Self::PkixRsaPss => "PKIX_RSA_PSS",
417 Self::PkixRsaPkcs1v152048Sha256 => "PKIX_RSA_PKCS1V15_2048_SHA256",
418 Self::PkixRsaPkcs1v153072Sha256 => "PKIX_RSA_PKCS1V15_3072_SHA256",
419 Self::PkixRsaPkcs1v154096Sha256 => "PKIX_RSA_PKCS1V15_4096_SHA256",
420 Self::PkixRsaPss2048Sha256 => "PKIX_RSA_PSS_2048_SHA256",
421 Self::PkixRsaPss3072Sha256 => "PKIX_RSA_PSS_3072_SHA256",
422 Self::PkixRsaPss4096Sha256 => "PKIX_RSA_PSS_4096_SHA256",
423 #[allow(deprecated)]
424 Self::PkixEcdsaP256HmacSha256 => "PKIX_ECDSA_P256_HMAC_SHA_256",
425 Self::PkixEcdsaP256Sha256 => "PKIX_ECDSA_P256_SHA_256",
426 Self::PkixEcdsaP384Sha384 => "PKIX_ECDSA_P384_SHA_384",
427 Self::PkixEcdsaP521Sha512 => "PKIX_ECDSA_P521_SHA_512",
428 Self::PkixEd25519 => "PKIX_ED25519",
429 Self::PkixEd25519Ph => "PKIX_ED25519_PH",
430 #[allow(deprecated)]
431 Self::PkixEcdsaP384Sha256 => "PKIX_ECDSA_P384_SHA_256",
432 #[allow(deprecated)]
433 Self::PkixEcdsaP521Sha256 => "PKIX_ECDSA_P521_SHA_256",
434 #[allow(deprecated)]
435 Self::LmsSha256 => "LMS_SHA256",
436 #[allow(deprecated)]
437 Self::LmotsSha256 => "LMOTS_SHA256",
438 Self::MlDsa44 => "ML_DSA_44",
439 Self::MlDsa65 => "ML_DSA_65",
440 Self::MlDsa87 => "ML_DSA_87",
441 }
442 }
443 /// Creates an enum from field names used in the ProtoBuf definition.
444 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
445 match value {
446 "PUBLIC_KEY_DETAILS_UNSPECIFIED" => Some(Self::Unspecified),
447 "PKCS1_RSA_PKCS1V5" => Some(#[allow(deprecated)] Self::Pkcs1RsaPkcs1v5),
448 "PKCS1_RSA_PSS" => Some(#[allow(deprecated)] Self::Pkcs1RsaPss),
449 "PKIX_RSA_PKCS1V5" => Some(#[allow(deprecated)] Self::PkixRsaPkcs1v5),
450 "PKIX_RSA_PSS" => Some(#[allow(deprecated)] Self::PkixRsaPss),
451 "PKIX_RSA_PKCS1V15_2048_SHA256" => Some(Self::PkixRsaPkcs1v152048Sha256),
452 "PKIX_RSA_PKCS1V15_3072_SHA256" => Some(Self::PkixRsaPkcs1v153072Sha256),
453 "PKIX_RSA_PKCS1V15_4096_SHA256" => Some(Self::PkixRsaPkcs1v154096Sha256),
454 "PKIX_RSA_PSS_2048_SHA256" => Some(Self::PkixRsaPss2048Sha256),
455 "PKIX_RSA_PSS_3072_SHA256" => Some(Self::PkixRsaPss3072Sha256),
456 "PKIX_RSA_PSS_4096_SHA256" => Some(Self::PkixRsaPss4096Sha256),
457 "PKIX_ECDSA_P256_HMAC_SHA_256" => {
458 Some(#[allow(deprecated)] Self::PkixEcdsaP256HmacSha256)
459 }
460 "PKIX_ECDSA_P256_SHA_256" => Some(Self::PkixEcdsaP256Sha256),
461 "PKIX_ECDSA_P384_SHA_384" => Some(Self::PkixEcdsaP384Sha384),
462 "PKIX_ECDSA_P521_SHA_512" => Some(Self::PkixEcdsaP521Sha512),
463 "PKIX_ED25519" => Some(Self::PkixEd25519),
464 "PKIX_ED25519_PH" => Some(Self::PkixEd25519Ph),
465 "PKIX_ECDSA_P384_SHA_256" => {
466 Some(#[allow(deprecated)] Self::PkixEcdsaP384Sha256)
467 }
468 "PKIX_ECDSA_P521_SHA_256" => {
469 Some(#[allow(deprecated)] Self::PkixEcdsaP521Sha256)
470 }
471 "LMS_SHA256" => Some(#[allow(deprecated)] Self::LmsSha256),
472 "LMOTS_SHA256" => Some(#[allow(deprecated)] Self::LmotsSha256),
473 "ML_DSA_44" => Some(Self::MlDsa44),
474 "ML_DSA_65" => Some(Self::MlDsa65),
475 "ML_DSA_87" => Some(Self::MlDsa87),
476 _ => None,
477 }
478 }
479 }
480 #[derive(
481 sigstore_protobuf_specs_derive::Deserialize_proto,
482 sigstore_protobuf_specs_derive::Serialize_proto
483 )]
484 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
485 #[repr(i32)]
486 pub enum SubjectAlternativeNameType {
487 Unspecified = 0,
488 Email = 1,
489 Uri = 2,
490 /// OID 1.3.6.1.4.1.57264.1.7
491 /// See <https://github.com/sigstore/fulcio/blob/main/docs/oid-info.md#1361415726417--othername-san>
492 /// for more details.
493 OtherName = 3,
494 }
495 impl SubjectAlternativeNameType {
496 /// String value of the enum field names used in the ProtoBuf definition.
497 ///
498 /// The values are not transformed in any way and thus are considered stable
499 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
500 pub fn as_str_name(&self) -> &'static str {
501 match self {
502 Self::Unspecified => "SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED",
503 Self::Email => "EMAIL",
504 Self::Uri => "URI",
505 Self::OtherName => "OTHER_NAME",
506 }
507 }
508 /// Creates an enum from field names used in the ProtoBuf definition.
509 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
510 match value {
511 "SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
512 "EMAIL" => Some(Self::Email),
513 "URI" => Some(Self::Uri),
514 "OTHER_NAME" => Some(Self::OtherName),
515 _ => None,
516 }
517 }
518 }