]> git.ipfire.org Git - people/jschlag/network.git/commitdiff
vpn: Poly1305 is AEAD
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Sep 2018 15:06:05 +0000 (16:06 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Sep 2018 15:06:05 +0000 (16:06 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.vpn-security-policies

index db6e859a25b069b03cb58b1c3228f53a93bf18ca..8486617d26efe5e588d2e8ebb449b3b7808c9951 100644 (file)
@@ -1022,7 +1022,16 @@ vpn_security_policies_cipher_is_aead() {
        local cipher=${1}
 
        # All CCM and GCM ciphers are AEAD
-       string_match "[CG]CM" "${cipher}"
+       if string_match "[CG]CM" "${cipher}"; then
+               return ${EXIT_TRUE}
+       fi
+
+       # Poly1305 is AEAD
+       if string_match "POLY1305" "${cipher}"; then
+               return ${EXIT_TRUE}
+       fi
+
+       return ${EXIT_FALSE}
 }
 
 vpn_security_policies_make_ike_proposal() {