1
0
mirror of https://github.com/pcvolkmer/cert-tools.git synced 2025-07-01 14:02:54 +00:00

chore: some code cleanup

This commit is contained in:
2025-01-06 17:15:19 +01:00
parent f26b486553
commit 8e898cf4bb
2 changed files with 6 additions and 6 deletions

View File

@ -415,7 +415,7 @@ impl Ui {
Ok(private_key) => {
if let Some(chain) = &self.chain {
if let Some(first) = chain.certs().first() {
if first.public_key_matches(private_key) {
if first.public_key_matches(&private_key) {
column![Container::new(text(
"Private Key matches first Cert Public Key"
))
@ -558,7 +558,7 @@ Authority-Key-Id: {}
match PrivateKey::read(Path::new(&key)) {
Ok(private_key) => {
if let Some(cert) = chain.certs().first() {
if cert.public_key_matches(private_key) {
if cert.public_key_matches(&private_key) {
output.push(
"✓ Private Key matches first Cert Public Key".to_string(),
);
@ -679,7 +679,7 @@ Authority-Key-Id: {}
match PrivateKey::read(Path::new(&key)) {
Ok(private_key) => {
if let Some(cert) = chain.certs().first() {
return if cert.public_key_matches(private_key) && chain.is_valid() {
return if cert.public_key_matches(&private_key) && chain.is_valid() {
result
} else {
IndicatorState::Error