11#![ deny(
22 clippy:: all,
3- clippy:: pedantic,
3+ // TODO: clippy::pedantic,
44 clippy:: alloc_instead_of_core,
55 clippy:: std_instead_of_alloc,
66 clippy:: std_instead_of_core
@@ -22,11 +22,11 @@ pub struct Provider;
2222
2323pub fn provider ( ) -> CryptoProvider {
2424 CryptoProvider {
25- cipher_suites : ALL_CIPHER_SUITES . to_vec ( ) ,
26- kx_groups : kx:: ALL_KX_GROUPS . to_vec ( ) ,
25+ cipher_suites : ALL_CIPHER_SUITES . to_vec ( ) ,
26+ kx_groups : kx:: ALL_KX_GROUPS . to_vec ( ) ,
2727 signature_verification_algorithms : verify:: ALGORITHMS ,
28- secure_random : & Provider ,
29- key_provider : & Provider ,
28+ secure_random : & Provider ,
29+ key_provider : & Provider ,
3030 }
3131}
3232
@@ -69,46 +69,46 @@ const TLS12_RSA_SCHEMES: [SignatureScheme; 6] = [
6969#[ cfg( feature = "tls12" ) ]
7070pub const TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 : SupportedCipherSuite =
7171 SupportedCipherSuite :: Tls12 ( & rustls:: Tls12CipherSuite {
72- common : CipherSuiteCommon {
73- suite : CipherSuite :: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ,
74- hash_provider : hash:: SHA256 ,
72+ common : CipherSuiteCommon {
73+ suite : CipherSuite :: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ,
74+ hash_provider : hash:: SHA256 ,
7575 confidentiality_limit : u64:: MAX ,
76- integrity_limit : 1 << 36 ,
76+ integrity_limit : 1 << 36 ,
7777 } ,
78- kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
79- sign : & TLS12_ECDSA_SCHEMES ,
80- aead_alg : & aead:: gcm:: Tls12Aes128Gcm ,
78+ kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
79+ sign : & TLS12_ECDSA_SCHEMES ,
80+ aead_alg : & aead:: gcm:: Tls12Aes128Gcm ,
8181 prf_provider : & rustls:: crypto:: tls12:: PrfUsingHmac ( hmac:: SHA256 ) ,
8282 } ) ;
8383
8484#[ cfg( feature = "tls12" ) ]
8585pub const TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 : SupportedCipherSuite =
8686 SupportedCipherSuite :: Tls12 ( & rustls:: Tls12CipherSuite {
87- common : CipherSuiteCommon {
88- suite : CipherSuite :: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 ,
89- hash_provider : hash:: SHA384 ,
87+ common : CipherSuiteCommon {
88+ suite : CipherSuite :: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 ,
89+ hash_provider : hash:: SHA384 ,
9090 confidentiality_limit : u64:: MAX ,
91- integrity_limit : 1 << 36 ,
91+ integrity_limit : 1 << 36 ,
9292 } ,
93- kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
94- sign : & TLS12_ECDSA_SCHEMES ,
93+ kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
94+ sign : & TLS12_ECDSA_SCHEMES ,
9595 prf_provider : & rustls:: crypto:: tls12:: PrfUsingHmac ( hmac:: SHA384 ) ,
96- aead_alg : & aead:: gcm:: Tls12Aes256Gcm ,
96+ aead_alg : & aead:: gcm:: Tls12Aes256Gcm ,
9797 } ) ;
9898
9999#[ cfg( feature = "tls12" ) ]
100100pub const TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 : SupportedCipherSuite =
101101 SupportedCipherSuite :: Tls12 ( & rustls:: Tls12CipherSuite {
102- common : CipherSuiteCommon {
103- suite : CipherSuite :: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 ,
104- hash_provider : hash:: SHA256 ,
102+ common : CipherSuiteCommon {
103+ suite : CipherSuite :: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 ,
104+ hash_provider : hash:: SHA256 ,
105105 confidentiality_limit : u64:: MAX ,
106- integrity_limit : 1 << 36 ,
106+ integrity_limit : 1 << 36 ,
107107 } ,
108108 prf_provider : & rustls:: crypto:: tls12:: PrfUsingHmac ( hmac:: SHA256 ) ,
109- kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
110- sign : & TLS12_ECDSA_SCHEMES ,
111- aead_alg : & aead:: chacha20:: Chacha20Poly1305 ,
109+ kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
110+ sign : & TLS12_ECDSA_SCHEMES ,
111+ aead_alg : & aead:: chacha20:: Chacha20Poly1305 ,
112112 } ) ;
113113
114114#[ cfg( feature = "tls12" ) ]
@@ -121,46 +121,46 @@ const TLS_ECDHE_ECDSA_SUITES: &[SupportedCipherSuite] = &[
121121#[ cfg( feature = "tls12" ) ]
122122pub const TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 : SupportedCipherSuite =
123123 SupportedCipherSuite :: Tls12 ( & rustls:: Tls12CipherSuite {
124- common : CipherSuiteCommon {
125- suite : CipherSuite :: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ,
126- hash_provider : hash:: SHA256 ,
124+ common : CipherSuiteCommon {
125+ suite : CipherSuite :: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ,
126+ hash_provider : hash:: SHA256 ,
127127 confidentiality_limit : u64:: MAX ,
128- integrity_limit : 1 << 36 ,
128+ integrity_limit : 1 << 36 ,
129129 } ,
130- kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
131- sign : & TLS12_RSA_SCHEMES ,
132- aead_alg : & aead:: gcm:: Tls12Aes128Gcm ,
130+ kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
131+ sign : & TLS12_RSA_SCHEMES ,
132+ aead_alg : & aead:: gcm:: Tls12Aes128Gcm ,
133133 prf_provider : & rustls:: crypto:: tls12:: PrfUsingHmac ( hmac:: SHA256 ) ,
134134 } ) ;
135135
136136#[ cfg( feature = "tls12" ) ]
137137pub const TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 : SupportedCipherSuite =
138138 SupportedCipherSuite :: Tls12 ( & rustls:: Tls12CipherSuite {
139- common : CipherSuiteCommon {
140- suite : CipherSuite :: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,
141- hash_provider : hash:: SHA384 ,
139+ common : CipherSuiteCommon {
140+ suite : CipherSuite :: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,
141+ hash_provider : hash:: SHA384 ,
142142 confidentiality_limit : u64:: MAX ,
143- integrity_limit : 1 << 36 ,
143+ integrity_limit : 1 << 36 ,
144144 } ,
145- kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
146- sign : & TLS12_RSA_SCHEMES ,
145+ kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
146+ sign : & TLS12_RSA_SCHEMES ,
147147 prf_provider : & rustls:: crypto:: tls12:: PrfUsingHmac ( hmac:: SHA384 ) ,
148- aead_alg : & aead:: gcm:: Tls12Aes256Gcm ,
148+ aead_alg : & aead:: gcm:: Tls12Aes256Gcm ,
149149 } ) ;
150150
151151#[ cfg( feature = "tls12" ) ]
152152pub const TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 : SupportedCipherSuite =
153153 SupportedCipherSuite :: Tls12 ( & rustls:: Tls12CipherSuite {
154- common : CipherSuiteCommon {
155- suite : CipherSuite :: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 ,
156- hash_provider : hash:: SHA256 ,
154+ common : CipherSuiteCommon {
155+ suite : CipherSuite :: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 ,
156+ hash_provider : hash:: SHA256 ,
157157 confidentiality_limit : u64:: MAX ,
158- integrity_limit : 1 << 36 ,
158+ integrity_limit : 1 << 36 ,
159159 } ,
160- kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
161- sign : & TLS12_RSA_SCHEMES ,
160+ kx : rustls:: crypto:: KeyExchangeAlgorithm :: ECDHE ,
161+ sign : & TLS12_RSA_SCHEMES ,
162162 prf_provider : & rustls:: crypto:: tls12:: PrfUsingHmac ( hmac:: SHA256 ) ,
163- aead_alg : & aead:: chacha20:: Chacha20Poly1305 ,
163+ aead_alg : & aead:: chacha20:: Chacha20Poly1305 ,
164164 } ) ;
165165
166166#[ cfg( feature = "tls12" ) ]
@@ -182,44 +182,44 @@ const TLS12_SUITES: &[SupportedCipherSuite] = &[];
182182
183183pub const TLS13_AES_128_GCM_SHA256 : SupportedCipherSuite =
184184 SupportedCipherSuite :: Tls13 ( & Tls13CipherSuite {
185- common : CipherSuiteCommon {
186- suite : CipherSuite :: TLS13_AES_128_GCM_SHA256 ,
187- hash_provider : hash:: SHA256 ,
185+ common : CipherSuiteCommon {
186+ suite : CipherSuite :: TLS13_AES_128_GCM_SHA256 ,
187+ hash_provider : hash:: SHA256 ,
188188 confidentiality_limit : u64:: MAX ,
189- integrity_limit : 1 << 36 ,
189+ integrity_limit : 1 << 36 ,
190190 } ,
191191 hkdf_provider : & rustls:: crypto:: tls13:: HkdfUsingHmac ( hmac:: SHA256 ) ,
192- aead_alg : & aead:: gcm:: Tls13Aes128Gcm ,
193- quic : None ,
192+ aead_alg : & aead:: gcm:: Tls13Aes128Gcm ,
193+ quic : None ,
194194 } ) ;
195195
196196pub const TLS13_AES_256_GCM_SHA384 : SupportedCipherSuite =
197197 SupportedCipherSuite :: Tls13 ( & Tls13CipherSuite {
198- common : CipherSuiteCommon {
199- suite : CipherSuite :: TLS13_AES_256_GCM_SHA384 ,
200- hash_provider : hash:: SHA384 ,
198+ common : CipherSuiteCommon {
199+ suite : CipherSuite :: TLS13_AES_256_GCM_SHA384 ,
200+ hash_provider : hash:: SHA384 ,
201201 confidentiality_limit : u64:: MAX ,
202- integrity_limit : 1 << 36 ,
202+ integrity_limit : 1 << 36 ,
203203 } ,
204204 hkdf_provider : & rustls:: crypto:: tls13:: HkdfUsingHmac ( hmac:: SHA384 ) ,
205- aead_alg : & aead:: gcm:: Tls13Aes256Gcm ,
206- quic : None ,
205+ aead_alg : & aead:: gcm:: Tls13Aes256Gcm ,
206+ quic : None ,
207207 } ) ;
208208
209209const TLS13_AES_SUITES : & [ SupportedCipherSuite ] =
210210 & [ TLS13_AES_128_GCM_SHA256 , TLS13_AES_256_GCM_SHA384 ] ;
211211
212212pub const TLS13_CHACHA20_POLY1305_SHA256 : SupportedCipherSuite =
213213 SupportedCipherSuite :: Tls13 ( & Tls13CipherSuite {
214- common : CipherSuiteCommon {
215- suite : CipherSuite :: TLS13_CHACHA20_POLY1305_SHA256 ,
216- hash_provider : hash:: SHA256 ,
214+ common : CipherSuiteCommon {
215+ suite : CipherSuite :: TLS13_CHACHA20_POLY1305_SHA256 ,
216+ hash_provider : hash:: SHA256 ,
217217 confidentiality_limit : u64:: MAX ,
218- integrity_limit : 1 << 36 ,
218+ integrity_limit : 1 << 36 ,
219219 } ,
220220 hkdf_provider : & rustls:: crypto:: tls13:: HkdfUsingHmac ( hmac:: SHA256 ) ,
221- aead_alg : & aead:: chacha20:: Chacha20Poly1305 ,
222- quic : None ,
221+ aead_alg : & aead:: chacha20:: Chacha20Poly1305 ,
222+ quic : None ,
223223 } ) ;
224224
225225const TLS13_SUITES : & [ SupportedCipherSuite ] = misc:: const_concat_slices!(
0 commit comments