chore(validation): move functions from constants

- Move validation functions from `internal/constants` to `internal/configuration/settings/validation`
- Concatenate all OpenVPN constants in `internal/constants/openvpn.go`
This commit is contained in:
Quentin McGaw
2022-02-13 01:21:25 +00:00
parent 95967136d3
commit c40d4e075e
72 changed files with 789 additions and 865 deletions

View File

@@ -17,17 +17,17 @@ func (p *PIA) BuildConf(connection models.Connection,
defaultCipher = constants.AES128cbc
defaultAuth = constants.SHA1
X509CRL = constants.PiaX509CRLNormal
certificate = constants.PIACertificateNormal
certificate = constants.PiaCANormal
case constants.PIAEncryptionPresetNone:
defaultCipher = "none"
defaultAuth = "none"
X509CRL = constants.PiaX509CRLNormal
certificate = constants.PIACertificateNormal
certificate = constants.PiaCANormal
default: // strong
defaultCipher = constants.AES256cbc
defaultAuth = constants.SHA256
X509CRL = constants.PiaX509CRLStrong
certificate = constants.PIACertificateStrong
certificate = constants.PiaCAStrong
}
if len(settings.Ciphers) == 0 {