From f884350581631eced2871a1741e160cd59f6236c Mon Sep 17 00:00:00 2001 From: Alex Pyattaev Date: Tue, 3 Dec 2024 22:11:00 +0000 Subject: [PATCH] better naming for buffer size variable in tls_certificate.rs --- tls-utils/Cargo.toml | 2 -- tls-utils/src/tls_certificates.rs | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tls-utils/Cargo.toml b/tls-utils/Cargo.toml index 03b9c9ea2ecb58..e244e361b46ca0 100644 --- a/tls-utils/Cargo.toml +++ b/tls-utils/Cargo.toml @@ -3,7 +3,6 @@ name = "solana-tls-utils" description = "Solana TLS utilities" documentation = "https://docs.rs/solana-tls-utils" publish = false - version = { workspace = true } authors = { workspace = true } repository = { workspace = true } @@ -12,7 +11,6 @@ license = { workspace = true } edition = { workspace = true } [dependencies] - rustls = { workspace = true, features = ["ring"] } solana-keypair = { workspace = true } solana-pubkey = { workspace = true } diff --git a/tls-utils/src/tls_certificates.rs b/tls-utils/src/tls_certificates.rs index b7cbea0d13e66f..96607601edee09 100644 --- a/tls-utils/src/tls_certificates.rs +++ b/tls-utils/src/tls_certificates.rs @@ -36,11 +36,11 @@ pub fn new_dummy_x509_certificate( if keypair_secret_len != 32 { panic!("Unexpected secret key length!"); } - let need_buffer = PKCS8_PREFIX + let buffer_size = PKCS8_PREFIX .len() .checked_add(keypair_secret_len) //clippy being overly guarded here but optimizer will elide checked_add .expect("Unexpected secret key length!"); - let mut key_pkcs8_der = Vec::::with_capacity(need_buffer); + let mut key_pkcs8_der = Vec::::with_capacity(buffer_size); key_pkcs8_der.extend_from_slice(&PKCS8_PREFIX); key_pkcs8_der.extend_from_slice(keypair_secret_bytes); key_pkcs8_der