summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhshoexer <hshoexer@openbsd.org>2005-11-26 23:26:49 +0000
committerhshoexer <hshoexer@openbsd.org>2005-11-26 23:26:49 +0000
commit476894f68c73def56466223665ef38214f8db9f9 (patch)
treea6164c6d2ecf7994918d99b2526bba32abf3424b
parentFrequency scaling for IBM 970FX. (diff)
downloadwireguard-openbsd-476894f68c73def56466223665ef38214f8db9f9.tar.xz
wireguard-openbsd-476894f68c73def56466223665ef38214f8db9f9.zip
allow specficiation of encryption and authentication algorithms to be swapped.
Ie. both "enc 3des-cbc auth hmac-sha1" and " auth hmac-sha1 enc 3des-cbc" are valid.
-rw-r--r--sbin/ipsecctl/parse.y12
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y
index d7df1646299..b0df0b38e52 100644
--- a/sbin/ipsecctl/parse.y
+++ b/sbin/ipsecctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.41 2005/11/24 11:52:07 hshoexer Exp $ */
+/* $OpenBSD: parse.y,v 1.42 2005/11/26 23:26:49 hshoexer Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -471,6 +471,16 @@ transforms : /* empty */ {
free($2);
free($4);
}
+ | ENCXF STRING AUTHXF STRING {
+ if (($$ = transforms($4, $2, NULL)) == NULL) {
+ free($2);
+ free($4);
+ yyerror("could not parse transforms");
+ YYERROR;
+ }
+ free($2);
+ free($4);
+ }
| AUTHXF STRING {
if (($$ = transforms($2, NULL, NULL)) == NULL) {
free($2);