File tree 2 files changed +14
-14
lines changed
2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -227,13 +227,13 @@ impl Profile {
227
227
/// validity,
228
228
/// subject,
229
229
/// pub_key,
230
- /// &mut signer,
230
+ /// &signer,
231
231
/// )
232
232
/// .expect("Create certificate");
233
233
/// ```
234
234
pub struct CertificateBuilder < ' s , S > {
235
235
tbs : TbsCertificate ,
236
- signer : & ' s mut S ,
236
+ signer : & ' s S ,
237
237
}
238
238
239
239
impl < ' s , S > CertificateBuilder < ' s , S >
@@ -249,7 +249,7 @@ where
249
249
mut validity : Validity ,
250
250
subject : Name ,
251
251
subject_public_key_info : SubjectPublicKeyInfoOwned ,
252
- signer : & ' s mut S ,
252
+ signer : & ' s S ,
253
253
) -> Result < Self >
254
254
where
255
255
S : Signer < Signature > ,
@@ -315,7 +315,7 @@ where
315
315
}
316
316
317
317
/// Run the certificate through the signer and build the end certificate.
318
- pub fn build < Signature > ( & mut self ) -> Result < Certificate >
318
+ pub fn build < Signature > ( self ) -> Result < Certificate >
319
319
where
320
320
S : Signer < Signature > ,
321
321
Signature : SignatureEncoding ,
@@ -325,7 +325,7 @@ where
325
325
326
326
let cert = Certificate {
327
327
tbs_certificate : self . tbs . clone ( ) ,
328
- signature_algorithm : self . tbs . signature . clone ( ) ,
328
+ signature_algorithm : self . tbs . signature ,
329
329
signature,
330
330
} ;
331
331
Original file line number Diff line number Diff line change @@ -31,15 +31,15 @@ fn root_ca_certificate() {
31
31
let pub_key =
32
32
SubjectPublicKeyInfoOwned :: try_from ( RSA_2048_DER_EXAMPLE ) . expect ( "get rsa pub key" ) ;
33
33
34
- let mut signer = rsa_signer ( ) ;
35
- let mut builder = CertificateBuilder :: new (
34
+ let signer = rsa_signer ( ) ;
35
+ let builder = CertificateBuilder :: new (
36
36
profile,
37
37
Version :: V3 ,
38
38
serial_number,
39
39
validity,
40
40
subject,
41
41
pub_key,
42
- & mut signer,
42
+ & signer,
43
43
)
44
44
. expect ( "Create certificate" ) ;
45
45
@@ -75,15 +75,15 @@ fn sub_ca_certificate() {
75
75
let pub_key =
76
76
SubjectPublicKeyInfoOwned :: try_from ( RSA_2048_DER_EXAMPLE ) . expect ( "get rsa pub key" ) ;
77
77
78
- let mut signer = ecdsa_signer ( ) ;
79
- let mut builder = CertificateBuilder :: new :: < ecdsa:: Signature < NistP256 > > (
78
+ let signer = ecdsa_signer ( ) ;
79
+ let builder = CertificateBuilder :: new :: < ecdsa:: Signature < NistP256 > > (
80
80
profile,
81
81
Version :: V3 ,
82
82
serial_number,
83
83
validity,
84
84
subject,
85
85
pub_key,
86
- & mut signer,
86
+ & signer,
87
87
)
88
88
. expect ( "Create certificate" ) ;
89
89
@@ -126,15 +126,15 @@ fn leaf_certificate() {
126
126
let pub_key =
127
127
SubjectPublicKeyInfoOwned :: try_from ( RSA_2048_DER_EXAMPLE ) . expect ( "get rsa pub key" ) ;
128
128
129
- let mut signer = ecdsa_signer ( ) ;
130
- let mut builder = CertificateBuilder :: new :: < ecdsa:: Signature < NistP256 > > (
129
+ let signer = ecdsa_signer ( ) ;
130
+ let builder = CertificateBuilder :: new :: < ecdsa:: Signature < NistP256 > > (
131
131
profile,
132
132
Version :: V3 ,
133
133
serial_number,
134
134
validity,
135
135
subject,
136
136
pub_key,
137
- & mut signer,
137
+ & signer,
138
138
)
139
139
. expect ( "Create certificate" ) ;
140
140
You can’t perform that action at this time.
0 commit comments