On Fri, Apr 09, 1999 at 11:45:47AM +0200, Richard Levitte - VMS Whacker wrote:
>> What's the cleanest way to solve this? Exile the command
>> list
> Run something like the following during compilation of the test
> directory:
>
> $(CC) $(CFLAGS) -E testenc_methods.c | sed -e 'd/^$/' |\
> sed -e 's/_/-/g' > testenc_methods
[...]
> You may wonder why I use _ instead of - in testenc_methods.c. The
> reason is that some preprocessors put spaces between tokens if there
> are none already, so for example des-ede-cbc would suddenly become
> "des - ede - cbc". Using underscores instead makes sure they are
> treated as symbols and, so to say, stay together. The last sed does
> the conversion back...
Thanks. I have to added a new file test/testenc_commands.c[1]:
[1] Does the filename really have to end in ".c"? I'd prefer ".in"
if it cannot cause any problems with other compilers. Is there
a portable option that allows to use a different suffix?
Sun's cc version 4.2 accepts anything, but gcc complains
when I do "gcc -DNO_IDEA -E testenc_methods.strange_suffix".
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
/* C preprocessor input for producing the list of openssl encryption commands
that should be available. Note that we use "_" instead of "-" in the names
so that each command looks like one symbol to the C preprocessor --
-- otherwise spaces might be inserted. */
#ifndef NO_RC4
rc4
#endif
#ifndef NO_DES
des_cfb des_ede_cfb des_ede3_cfb
des_ofb des_ede_ofb des_ede3_ofb
des_ecb des_ede des_ede3 desx
des_cbc des_ede_cbc des_ede3_cbc
#endif
#ifndef NO_IDEA
idea_ecb idea_cfb idea_ofb idea_cbc
#endif
#ifndef NO_RC2
rc2_ecb rc2_cfb rc2_ofb rc2_cbc
#endif
#ifndef NO_BLOWFISH
bf_ecb bf_cfb bf_ofb bf_cbc
#endif
#ifndef NO_RC4
rc4
#endif
#ifndef NO_CAST
cast5_ecb cast5_cfb cast5_ofb cast5_cbc
#endif
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
and plan to apply the following patches, unless someone complains:
===================================================================
RCS file: /e/openssl/cvs/openssl/test/Makefile.ssl,v
retrieving revision 1.12
diff -u -r1.12 Makefile.ssl
--- Makefile.ssl 1999/04/08 15:09:24 1.12
+++ Makefile.ssl 1999/04/09 10:45:02
@@ -144,8 +144,12 @@
test_rand:
./$(RANDTEST)
-test_enc:
+test_enc: testenc_commands
@sh ./testenc
+
+testenc_commands: testenc_commands.c
+ $(CC) $(CFLAGS) -E testenc_commands.c | \
+ sed -e 's/_/-/g' -e 's/^#.*//' >testenc_commands
test_x509:
echo test normal x509v1 certificate
Index: testenc
===================================================================
RCS file: /e/openssl/cvs/openssl/test/testenc,v
retrieving revision 1.2
diff -u -r1.2 testenc
--- testenc 1999/01/02 19:01:40 1.2
+++ testenc 1999/04/09 10:45:02
@@ -27,15 +27,7 @@
/bin/rm $test.cipher $test.clear
fi
-for i in rc4 \
- des-cfb des-ede-cfb des-ede3-cfb \
- des-ofb des-ede-ofb des-ede3-ofb \
- des-ecb des-ede des-ede3 desx \
- des-cbc des-ede-cbc des-ede3-cbc \
- idea-ecb idea-cfb idea-ofb idea-cbc \
- rc2-ecb rc2-cfb rc2-ofb rc2-cbc \
- bf-ecb bf-cfb bf-ofb bf-cbc rc4 \
- cast5-ecb cast5-cfb cast5-ofb cast5-cbc
+for i in `cat testenc_commands`
do
echo $i
$cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]