Drop Debug impl for ScramKey and ServerSecret

There's a notion that accidental misuse of those implementations
might reveal authentication secrets.
This commit is contained in:
Dmitry Ivanov
2022-04-12 01:04:02 +03:00
committed by Stas Kelvich
parent 68ba6a58a0
commit 4b1bd32e4a
3 changed files with 1 additions and 5 deletions

View File

@@ -8,7 +8,6 @@ use super::signature::SignatureBuilder;
use crate::sasl::{self, ChannelBinding, Error as SaslError};
/// The only channel binding mode we currently support.
#[derive(Debug)]
struct TlsServerEndPoint;
impl std::fmt::Display for TlsServerEndPoint {
@@ -28,7 +27,6 @@ impl std::str::FromStr for TlsServerEndPoint {
}
}
#[derive(Debug)]
enum ExchangeState {
/// Waiting for [`ClientFirstMessage`].
Initial,
@@ -41,7 +39,6 @@ enum ExchangeState {
}
/// Server's side of SCRAM auth algorithm.
#[derive(Debug)]
pub struct Exchange<'a> {
state: ExchangeState,
secret: &'a ServerSecret,

View File

@@ -6,7 +6,7 @@ pub const SCRAM_KEY_LEN: usize = 32;
/// One of the keys derived from the [password](super::password::SaltedPassword).
/// We use the same structure for all keys, i.e.
/// `ClientKey`, `StoredKey`, and `ServerKey`.
#[derive(Default, Debug, PartialEq, Eq)]
#[derive(Default, PartialEq, Eq)]
#[repr(transparent)]
pub struct ScramKey {
bytes: [u8; SCRAM_KEY_LEN],

View File

@@ -5,7 +5,6 @@ use super::key::ScramKey;
/// Server secret is produced from [password](super::password::SaltedPassword)
/// and is used throughout the authentication process.
#[derive(Debug)]
pub struct ServerSecret {
/// Number of iterations for `PBKDF2` function.
pub iterations: u32,