@@ -191,6 +191,7 @@ impl Clone for CryptoPrivateKey {
191191 EcdsaKeyPair :: from_pkcs8 (
192192 & ring:: signature:: ECDSA_P256_SHA256_ASN1_SIGNING ,
193193 & self . serialized_der ,
194+ #[ cfg( feature = "ring" ) ]
194195 & SystemRandom :: new ( ) ,
195196 )
196197 . unwrap ( ) ,
@@ -232,6 +233,7 @@ impl CryptoPrivateKey {
232233 EcdsaKeyPair :: from_pkcs8 (
233234 & ring:: signature:: ECDSA_P256_SHA256_ASN1_SIGNING ,
234235 & serialized_der,
236+ #[ cfg( feature = "ring" ) ]
235237 & SystemRandom :: new ( ) ,
236238 )
237239 . map_err ( |e| Error :: Other ( e. to_string ( ) ) ) ?,
@@ -276,7 +278,10 @@ pub(crate) fn generate_key_signature(
276278 }
277279 CryptoPrivateKeyKind :: Rsa256 ( kp) => {
278280 let system_random = SystemRandom :: new ( ) ;
281+ #[ cfg( feature = "ring" ) ]
279282 let mut signature = vec ! [ 0 ; kp. public( ) . modulus_len( ) ] ;
283+ #[ cfg( feature = "aws-lc-rs" ) ]
284+ let mut signature = vec ! [ 0 ; kp. public_modulus_len( ) ] ;
280285 kp. sign (
281286 & ring:: signature:: RSA_PKCS1_SHA256 ,
282287 & system_random,
@@ -398,7 +403,10 @@ pub(crate) fn generate_certificate_verify(
398403 }
399404 CryptoPrivateKeyKind :: Rsa256 ( kp) => {
400405 let system_random = SystemRandom :: new ( ) ;
406+ #[ cfg( feature = "ring" ) ]
401407 let mut signature = vec ! [ 0 ; kp. public( ) . modulus_len( ) ] ;
408+ #[ cfg( feature = "aws-lc-rs" ) ]
409+ let mut signature = vec ! [ 0 ; kp. public_modulus_len( ) ] ;
402410 kp. sign (
403411 & ring:: signature:: RSA_PKCS1_SHA256 ,
404412 & system_random,
0 commit comments