diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-11-26 23:26:50 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-11-26 23:26:50 +0000 |
commit | 4b521541074f616da1ac27bc4aa4145f159576c7 (patch) | |
tree | ddfdc2b8c2fe71f0fc39f0993771ed61d4948d0d /sbin/ipsecctl/parse.y | |
parent | 1e4337b42cc5692af628f6d84540e3ac421da618 (diff) |
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.
Diffstat (limited to 'sbin/ipsecctl/parse.y')
-rw-r--r-- | sbin/ipsecctl/parse.y | 12 |
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); |