Allow setting local credentials via AgentConfig

Add local credential support to the AgentConfig and
validate credentials per RFC standard. If no credentials
are passed we still generate random ones ourselves.
This commit is contained in:
Nevio Vesic
2019-11-07 03:37:51 +01:00
committed by Sean DuBois
parent a4b52cdf38
commit a077bc201a
5 changed files with 79 additions and 13 deletions

View File

@@ -21,6 +21,14 @@ var (
// ErrPort indicates malformed port is provided.
ErrPort = errors.New("invalid port")
// ErrLocalUfragInsufficientBits indicates local username fragment insufficient bits are provided.
// Have to be at least 24 bits long
ErrLocalUfragInsufficientBits = errors.New("local username fragment is less than 24 bits long")
// ErrLocalPwdInsufficientBits indicates local passoword insufficient bits are provided.
// Have to be at least 128 bits long
ErrLocalPwdInsufficientBits = errors.New("local password is less than 128 bits long")
// ErrProtoType indicates an unsupported transport type was provided.
ErrProtoType = errors.New("invalid transport protocol type")