Skip to content

Commit 7d6bd16

Browse files
author
Ryan van Polen
committed
Eagerly implemented Debug trait
1 parent cc1f8e2 commit 7d6bd16

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

rcgen/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ pub fn generate_simple_self_signed(
132132
Ok(CertifiedKey { cert, key_pair })
133133
}
134134

135+
#[derive(Debug)]
135136
struct Issuer<'a, S> {
136137
distinguished_name: &'a DistinguishedName,
137138
key_identifier_method: &'a KeyIdMethod,
@@ -430,7 +431,7 @@ impl DistinguishedName {
430431
/**
431432
Iterator over [`DistinguishedName`] entries
432433
*/
433-
#[derive(Clone)]
434+
#[derive(Clone, Debug)]
434435
pub struct DistinguishedNameIterator<'a> {
435436
distinguished_name: &'a DistinguishedName,
436437
iter: std::slice::Iter<'a, DnType>,

rcgen/src/sign_algo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ use crate::ring_like::signature::{self, EcdsaSigningAlgorithm, EdDSAParameters,
1010
use crate::Error;
1111

1212
#[cfg(feature = "crypto")]
13-
#[derive(Clone, Copy)]
13+
#[derive(Clone, Copy, Debug)]
1414
pub(crate) enum SignAlgo {
1515
EcDsa(&'static EcdsaSigningAlgorithm),
1616
EdDsa(&'static EdDSAParameters),
1717
Rsa(&'static dyn RsaEncoding),
1818
}
1919

20-
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
20+
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2121
pub(crate) enum SignatureAlgorithmParams {
2222
/// Omit the parameters
2323
None,

rustls-cert-gen/src/cert.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl PemCertifiedKey {
3737

3838
/// Builder to configure TLS [CertificateParams] to be finalized
3939
/// into either a [Ca] or an [EndEntity].
40-
#[derive(Clone, Default)]
40+
#[derive(Clone, Debug, Default)]
4141
pub struct CertificateBuilder {
4242
params: CertificateParams,
4343
alg: KeyPairAlgorithm,
@@ -80,7 +80,7 @@ impl CertificateBuilder {
8080
}
8181

8282
/// [CertificateParams] from which an [Ca] [Certificate] can be built
83-
#[derive(Clone)]
83+
#[derive(Clone, Debug)]
8484
pub struct CaBuilder {
8585
params: CertificateParams,
8686
alg: KeyPairAlgorithm,
@@ -124,6 +124,7 @@ impl CaBuilder {
124124
}
125125

126126
/// End-entity [Certificate]
127+
#[derive(Debug)]
127128
pub struct Ca {
128129
cert: Certificate,
129130
params: CertificateParams,
@@ -146,6 +147,7 @@ impl Ca {
146147
}
147148

148149
/// End-entity [Certificate]
150+
#[derive(Debug)]
149151
pub struct EndEntity {
150152
cert: Certificate,
151153
key_pair: KeyPair,
@@ -162,7 +164,7 @@ impl EndEntity {
162164
}
163165

164166
/// [CertificateParams] from which an [EndEntity] [Certificate] can be built
165-
#[derive(Clone)]
167+
#[derive(Clone, Debug)]
166168
pub struct EndEntityBuilder {
167169
params: CertificateParams,
168170
alg: KeyPairAlgorithm,

0 commit comments

Comments
 (0)