diff options
author | Richard Levitte <levitte@openssl.org> | 2002-07-23 13:31:04 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-07-23 13:31:04 +0000 |
commit | 1cc67fa80c38606edaedaf60a97d10584f94c416 (patch) | |
tree | 21c8b408bd5ac903df88382a171a9e10d589a611 /test | |
parent | eefa6e4e2b3c9945da6aae15a537e36a349b8899 (diff) | |
download | openssl-1cc67fa80c38606edaedaf60a97d10584f94c416.tar.gz |
Make dummy tests to make it easier to physically remove unwanted algorithms.
This should complete PR 75
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.ssl | 9 | ||||
-rw-r--r-- | test/dummytest.c | 47 |
2 files changed, 55 insertions, 1 deletions
diff --git a/test/Makefile.ssl b/test/Makefile.ssl index 048063576e..6adc6b8c6d 100644 --- a/test/Makefile.ssl +++ b/test/Makefile.ssl @@ -98,7 +98,7 @@ top: all: exe -exe: $(EXE) +exe: $(EXE) dummytest files: $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO @@ -106,6 +106,10 @@ files: links: @@$(TOP)/util/point.sh Makefile.ssl Makefile +generate: $(SRC) +$(SRC): + @$(TOP)/util/point.sh dummytest.c $@ + errors: install: @@ -374,6 +378,9 @@ $(ECDSATEST): $(ECDSATEST).o $(DLIBCRYPTO) #$(RDTEST): $(RDTEST).o $(DLIBCRYPTO) # $(CC) -o $(RDTEST) $(CFLAGS) $(RDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) +dummytest: dummytest.o $(DLIBCRYPTO) + $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + # DO NOT DELETE THIS LINE -- make depend depends on it. bftest.o: ../include/openssl/blowfish.h ../include/openssl/e_os2.h diff --git a/test/dummytest.c b/test/dummytest.c new file mode 100644 index 0000000000..f98f003ef9 --- /dev/null +++ b/test/dummytest.c @@ -0,0 +1,47 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <openssl/e_os2.h> +#include <openssl/buffer.h> +#include <openssl/crypto.h> + +int main(int argc, char *argv[]) + { + char *p, *q, *program; + + p = strrchr(argv[0], '/'); + if (!p) p = strrchr(argv[0], '\\'); +#ifdef OPENSSL_SYS_VMS + if (!p) p = strrchr(argv[0], ']'); + if (p) q = strrchr(p, '>'); + if (q) p = q; + if (!p) p = strrchr(argv[0], ':'); + q = 0; +#endif + if (p) p++; + if (!p) p = argv[0]; + if (p) q = strchr(p, '.'); + if (p && !q) q = p + strlen(p); + + if (!p) + program = BUF_strdup("(unknown)"); + else + { + program = OPENSSL_malloc((q - p) + 1); + strncpy(program, p, q - p); + program[q - p] = '\0'; + } + + for(p = program; *p; p++) + if (islower(*p)) *p = toupper(*p); + + q = strstr(program, "TEST"); + if (q > p && q[-1] == '_') q--; + *q = '\0'; + + printf("No %s support\n", program); + + OPENSSL_free(program); + return(0); + } |