Subject: Re: [HEADS-UP] switched from KAME racoon to ipsec-tools racoon
To: None <current-users@NetBSD.org>
From: Stephan Thesing <thesing@cs.uni-sb.de>
List: current-users
Date: 02/22/2005 13:09:53
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-461146762-1109074193=:9405
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Hello,

a build of -current fails in usr.sbin/racoon when `MKCRYPTO_IDEA=yes' and/or
`MKCRYPTO_RC5=yes' are present in /etc/mk.conf due to missing functions
in crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:

algorithm.o(.data+0x170): undefined reference to `eay_idea_encrypt'
algorithm.o(.data+0x174): undefined reference to `eay_idea_decrypt'
algorithm.o(.data+0x178): undefined reference to `eay_idea_weakkey'
algorithm.o(.data+0x17c): undefined reference to `eay_idea_keylen'
algorithm.o(.data+0x1b0): undefined reference to `eay_rc5_encrypt'
algorithm.o(.data+0x1b4): undefined reference to `eay_rc5_decrypt'
algorithm.o(.data+0x1b8): undefined reference to `eay_rc5_weakkey'
algorithm.o(.data+0x1bc): undefined reference to `eay_rc5_keylen'
algorithm.o(.data+0x29c): undefined reference to `eay_rc5_keylen'

the attached patch adds versions of these, which makes it at least 
compile.

As I have not tested the code, someone who knows how this is supposed to work 
should have a look:-)

One problem is, that the patch allows RC5 only with 128Bit key and 12 rounds...

Best regards....
 	Stephan

=  Tel.: +49-681-302-5571      = Universitaet des Saarlandes =
=  Fax.: +49-681-302-3065      = Postfach 15 11 50           =
=  Compiler Research Group     = 66041 Saarbruecken          =
=  FR 6.2 - Informatik         = GERMANY                     =

--0-461146762-1109074193=:9405
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=patch
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.62.0502221309530.9405@gargoyle.cs.uni-sb.de>
Content-Description: ipsec-tools patch for IDEA, RC5
Content-Disposition: attachment; filename=patch

SW5kZXg6IGNyeXB0by9kaXN0L2lwc2V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