mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 11:44:38 +03:00
implement the plus variants of scram, to bind the authentication exchange to the tls connection
to get the security benefits (detecting mitm attempts), explicitly configure clients to use a scram plus variant, e.g. scram-sha-256-plus. unfortunately, not many clients support it yet. imapserver scram plus support seems to work with the latest imtest (imap test client) from cyrus-sasl. no success yet with mutt (with gsasl) though.
This commit is contained in:
@ -223,9 +223,27 @@ func (p *parser) xsaslname() string {
|
||||
return r
|
||||
}
|
||||
|
||||
func (p *parser) xchannelBinding() string {
|
||||
// ../rfc/5802:889
|
||||
func (p *parser) xcbname() string {
|
||||
o := p.o
|
||||
for ; o < len(p.s); o++ {
|
||||
c := p.s[o]
|
||||
if c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == '.' || c == '-' {
|
||||
continue
|
||||
}
|
||||
break
|
||||
}
|
||||
if o == p.o {
|
||||
p.xerrorf("empty channel binding name")
|
||||
}
|
||||
r := p.s[p.o:o]
|
||||
p.o = o
|
||||
return string(r)
|
||||
}
|
||||
|
||||
func (p *parser) xchannelBinding() []byte {
|
||||
p.xtake("c=")
|
||||
return string(p.xbase64())
|
||||
return p.xbase64()
|
||||
}
|
||||
|
||||
func (p *parser) xproof() []byte {
|
||||
|
Reference in New Issue
Block a user