Skip to content

Commit

Permalink
fix: rustls extraction of TlsInfo::peer_certificate() being truncat…
Browse files Browse the repository at this point in the history
…ed (#2195)
  • Loading branch information
mbme committed Mar 21, 2024
1 parent 7a5df21 commit d5adcba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,7 @@ impl TlsInfoFactory for tokio_rustls::client::TlsStream<TokioIo<TokioIo<tokio::n
.1
.peer_certificates()
.and_then(|certs| certs.first())
.map(|c| c.first())
.and_then(|c| c.map(|cc| vec![*cc]));
.map(|c| c.to_vec());
Some(crate::tls::TlsInfo { peer_certificate })
}
}
Expand All @@ -591,8 +590,7 @@ impl TlsInfoFactory
.1
.peer_certificates()
.and_then(|certs| certs.first())
.map(|c| c.first())
.and_then(|c| c.map(|cc| vec![*cc]));
.map(|c| c.to_vec());
Some(crate::tls::TlsInfo { peer_certificate })
}
}
Expand Down

0 comments on commit d5adcba

Please sign in to comment.