]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Remove test-x509
authorJouni Malinen <j@w1.fi>
Sun, 5 Apr 2020 16:38:41 +0000 (19:38 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 5 Apr 2020 16:38:41 +0000 (19:38 +0300)
This has been obsoleted by tests/fuzzing/x509.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/Makefile
tests/test-x509.c [deleted file]

index ee07921a4bf3ee66e30f3fb50d38722846fb3887..0817c9a27995f037861c8755d1be7d22d910211f 100644 (file)
@@ -1,7 +1,7 @@
 TESTS=test-base64 test-md4 test-milenage \
        test-rsa-sig-ver \
        test-sha1 \
-       test-sha256 test-aes test-asn1 test-x509 test-x509v3 test-list test-rc4
+       test-sha256 test-aes test-asn1 test-x509v3 test-list test-rc4
 
 all: $(TESTS)
 
@@ -148,9 +148,6 @@ test-sha256: test-sha256.o $(LIBS)
 test-tls: test-tls.o $(LIBS)
        $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
 
-test-x509: test-x509.o $(LIBS)
-       $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
-
 test-x509v3: test-x509v3.o $(LIBS)
        $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
 
diff --git a/tests/test-x509.c b/tests/test-x509.c
deleted file mode 100644 (file)
index 055446e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Testing tool for X.509v3 routines
- * Copyright (c) 2006-2019, Jouni Malinen <j@w1.fi>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
-
-#include "includes.h"
-
-#include "common.h"
-#include "tls/x509v3.h"
-
-
-#ifdef TEST_LIBFUZZER
-int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
-{
-       struct x509_certificate *cert;
-
-       cert = x509_certificate_parse(data, size);
-       x509_certificate_free(cert);
-       return 0;
-}
-#else /* TEST_LIBFUZZER */
-int main(int argc, char *argv[])
-{
-       FILE *f;
-       u8 buf[3000];
-       size_t len;
-       struct x509_certificate *cert;
-
-       wpa_debug_level = 0;
-
-       f = fopen(argv[1], "rb");
-       if (f == NULL)
-               return -1;
-       len = fread(buf, 1, sizeof(buf), f);
-       fclose(f);
-
-       cert = x509_certificate_parse(buf, len);
-       if (cert == NULL)
-               printf("Failed to parse X.509 certificate\n");
-       x509_certificate_free(cert);
-
-       return 0;
-}
-#endif /* TEST_LIBFUZZER */