Hotfix: PIA: encryption preset reading
This commit is contained in:
@@ -147,6 +147,11 @@ func (settings *OpenVPN) read(r reader, serviceProvider string) (err error) {
|
|||||||
return fmt.Errorf("environment variable OPENVPN_IPV6: %w", err)
|
return fmt.Errorf("environment variable OPENVPN_IPV6: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.EncPreset, err = getPIAEncryptionPreset(r)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
switch serviceProvider {
|
switch serviceProvider {
|
||||||
case constants.Cyberghost:
|
case constants.Cyberghost:
|
||||||
err = settings.readCyberghost(r)
|
err = settings.readCyberghost(r)
|
||||||
|
|||||||
@@ -18,16 +18,16 @@ func (p *PIA) BuildConf(connection models.OpenVPNConnection,
|
|||||||
defaultAuth = constants.SHA1
|
defaultAuth = constants.SHA1
|
||||||
X509CRL = constants.PiaX509CRLNormal
|
X509CRL = constants.PiaX509CRLNormal
|
||||||
certificate = constants.PIACertificateNormal
|
certificate = constants.PIACertificateNormal
|
||||||
case constants.PIAEncryptionPresetStrong:
|
case constants.PIAEncryptionPresetNone:
|
||||||
defaultCipher = constants.AES256cbc
|
|
||||||
defaultAuth = constants.SHA256
|
|
||||||
X509CRL = constants.PiaX509CRLStrong
|
|
||||||
certificate = constants.PIACertificateStrong
|
|
||||||
default: // no encryption preset
|
|
||||||
defaultCipher = "none"
|
defaultCipher = "none"
|
||||||
defaultAuth = "none"
|
defaultAuth = "none"
|
||||||
X509CRL = constants.PiaX509CRLNormal
|
X509CRL = constants.PiaX509CRLNormal
|
||||||
certificate = constants.PIACertificateNormal
|
certificate = constants.PIACertificateNormal
|
||||||
|
default: // strong
|
||||||
|
defaultCipher = constants.AES256cbc
|
||||||
|
defaultAuth = constants.SHA256
|
||||||
|
X509CRL = constants.PiaX509CRLStrong
|
||||||
|
certificate = constants.PIACertificateStrong
|
||||||
}
|
}
|
||||||
|
|
||||||
if settings.Cipher == "" {
|
if settings.Cipher == "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user