Skip to content

Commit 362e78a

Browse files
committed
derive Debug for non-sensitive types
Adds a `#[derive(Debug)]` to: * `Certificate` * `CertificateRevocationList` * `CertificateRevocationListParams` * `CrlIssuingDistributionPoint` * `RevokedCertParams` * `CertificateSigningRequest` * `CertificateSigningRequestParams`
1 parent 3f482d9 commit 362e78a

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

rcgen/src/certificate.rs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use crate::{
2222
};
2323

2424
/// An issued certificate together with the parameters used to generate it.
25+
#[derive(Debug)]
2526
pub struct Certificate {
2627
pub(crate) params: CertificateParams,
2728
pub(crate) subject_public_key_info: Vec<u8>,

rcgen/src/crl.rs

+4
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ use crate::{
6262
/// key_identifier_method: KeyIdMethod::PreSpecified(vec![]),
6363
/// }.signed_by(&issuer, &key_pair).unwrap();
6464
///# }
65+
#[derive(Debug)]
6566
pub struct CertificateRevocationList {
6667
params: CertificateRevocationListParams,
6768
der: CertificateRevocationListDer<'static>,
@@ -162,6 +163,7 @@ pub enum RevocationReason {
162163
}
163164

164165
/// Parameters used for certificate revocation list (CRL) generation
166+
#[derive(Debug)]
165167
pub struct CertificateRevocationListParams {
166168
/// Issue date of the CRL.
167169
pub this_update: OffsetDateTime,
@@ -302,6 +304,7 @@ impl CertificateRevocationListParams {
302304

303305
/// A certificate revocation list (CRL) issuing distribution point, to be included in a CRL's
304306
/// [issuing distribution point extension](https://datatracker.ietf.org/doc/html/rfc5280#section-5.2.5).
307+
#[derive(Debug)]
305308
pub struct CrlIssuingDistributionPoint {
306309
/// The CRL's distribution point, containing a sequence of URIs the CRL can be retrieved from.
307310
pub distribution_point: CrlDistributionPoint,
@@ -344,6 +347,7 @@ pub enum CrlScope {
344347
}
345348

346349
/// Parameters used for describing a revoked certificate included in a [`CertificateRevocationList`].
350+
#[derive(Debug)]
347351
pub struct RevokedCertParams {
348352
/// Serial number identifying the revoked certificate.
349353
pub serial_number: SerialNumber,

rcgen/src/csr.rs

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ impl PublicKeyData for PublicKey {
3838
}
3939

4040
/// A certificate signing request (CSR) that can be encoded to PEM or DER.
41+
#[derive(Debug)]
4142
pub struct CertificateSigningRequest {
4243
pub(crate) der: CertificateSigningRequestDer<'static>,
4344
}
@@ -66,6 +67,7 @@ impl From<CertificateSigningRequest> for CertificateSigningRequestDer<'static> {
6667
}
6768

6869
/// Parameters for a certificate signing request
70+
#[derive(Debug)]
6971
pub struct CertificateSigningRequestParams {
7072
/// Parameters for the certificate to be signed.
7173
pub params: CertificateParams,

0 commit comments

Comments
 (0)