Skip to content

Commit c74b3ad

Browse files
authored
x509-cert: use BuilderProfile for consistency (#1517)
1 parent 622b648 commit c74b3ad

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

x509-cert/src/builder.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ use crate::{
2121

2222
pub mod profile;
2323

24-
use self::profile::BuildProfile;
24+
use self::profile::BuilderProfile;
2525

2626
#[deprecated(
2727
since = "0.3.0",
28-
note = "please use `x509_cert::builder::profile::BuildProfile` instead"
28+
note = "please use `x509_cert::builder::profile::BuilderProfile` instead"
2929
)]
30-
pub use self::profile::BuildProfile as Profile;
30+
pub use self::profile::BuilderProfile as Profile;
3131

3232
const NULL_OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("0.0.0");
3333

@@ -152,7 +152,7 @@ pub struct CertificateBuilder<P> {
152152

153153
impl<P> CertificateBuilder<P>
154154
where
155-
P: BuildProfile,
155+
P: BuilderProfile,
156156
{
157157
/// Creates a new certificate builder
158158
pub fn new(
@@ -352,7 +352,7 @@ pub trait Builder: Sized {
352352

353353
impl<P> Builder for CertificateBuilder<P>
354354
where
355-
P: BuildProfile,
355+
P: BuilderProfile,
356356
{
357357
type Output = Certificate;
358358

x509-cert/src/builder/profile.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Certificate profiles
22
//!
3-
//! Profiles need implement by the [`BuildProfile`] trait.
3+
//! Profiles need implement by the [`BuilderProfile`] trait.
44
//! They may then be consumed by a [`builder::CertificateBuilder`].
55
//!
66
//!
@@ -29,7 +29,7 @@ pub mod devid;
2929
/// generate a [`cabf::Root`], or a TLS [`cabf::tls::Subscriber`] certificate.
3030
///
3131
/// See [implementors](#implementors) for a full list of existing profiles.
32-
pub trait BuildProfile {
32+
pub trait BuilderProfile {
3333
/// Issuer to be used for issued certificates
3434
fn get_issuer(&self, subject: &Name) -> Name;
3535

x509-cert/src/builder/profile/cabf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use alloc::vec;
55
use std::collections::HashSet;
66

77
use crate::{
8-
builder::{BuildProfile, Error, Result},
8+
builder::{BuilderProfile, Error, Result},
99
certificate::TbsCertificate,
1010
ext::{
1111
pkix::{
@@ -123,7 +123,7 @@ impl Root {
123123
}
124124
}
125125

126-
impl BuildProfile for Root {
126+
impl BuilderProfile for Root {
127127
fn get_issuer(&self, subject: &Name) -> Name {
128128
subject.clone()
129129
}

x509-cert/src/builder/profile/cabf/tls.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use const_oid::db::rfc5912;
1313

1414
use crate::{
1515
attr::AttributeTypeAndValue,
16-
builder::{BuildProfile, Result},
16+
builder::{BuilderProfile, Result},
1717
certificate::TbsCertificate,
1818
ext::{
1919
pkix::{
@@ -50,7 +50,7 @@ pub struct Subordinate {
5050
pub client_auth: bool,
5151
}
5252

53-
impl BuildProfile for Subordinate {
53+
impl BuilderProfile for Subordinate {
5454
fn get_issuer(&self, _subject: &Name) -> Name {
5555
self.issuer.clone()
5656
}
@@ -231,7 +231,7 @@ pub struct Tls12Options {
231231
pub enable_key_agreement: bool,
232232
}
233233

234-
impl BuildProfile for Subscriber {
234+
impl BuilderProfile for Subscriber {
235235
fn get_issuer(&self, _subject: &Name) -> Name {
236236
self.issuer.clone()
237237
}

x509-cert/src/builder/profile/devid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use alloc::vec;
1717

1818
use crate::{
19-
builder::{BuildProfile, Result},
19+
builder::{BuilderProfile, Result},
2020
certificate::TbsCertificate,
2121
ext::{
2222
pkix::{
@@ -112,7 +112,7 @@ impl DevId {
112112
}
113113
}
114114

115-
impl BuildProfile for DevId {
115+
impl BuilderProfile for DevId {
116116
fn get_issuer(&self, _subject: &Name) -> Name {
117117
self.issuer.clone()
118118
}

0 commit comments

Comments
 (0)