Add SASL SCRAM-SHA-256 and SCRAM-SHA-512
This commit is contained in:
parent
172e50c748
commit
496c0f99a6
8 changed files with 569 additions and 58 deletions
|
|
@ -20,12 +20,21 @@ pub struct Server {
|
|||
pub description: String,
|
||||
#[serde(default = "default_protocol")]
|
||||
pub protocol: u32,
|
||||
// PBKDF2 cost baked into new SCRAM verifiers at registration. High by
|
||||
// default for offline-attack resistance; lower it if registration latency
|
||||
// on the single-threaded link matters more than verifier strength.
|
||||
#[serde(default = "default_scram_iterations")]
|
||||
pub scram_iterations: u32,
|
||||
}
|
||||
|
||||
fn default_protocol() -> u32 {
|
||||
1206 // InspIRCd 4 spanning-tree protocol (1205 = insp3)
|
||||
}
|
||||
|
||||
fn default_scram_iterations() -> u32 {
|
||||
crate::engine::scram::DEFAULT_ITERATIONS
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn load(path: &str) -> anyhow::Result<Self> {
|
||||
let raw = std::fs::read_to_string(path)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue