Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/ipsec-tools/src/libipsec Remove dead files that ...



details:   https://anonhg.NetBSD.org/src/rev/88d8bdbc9efc
branches:  trunk
changeset: 836369:88d8bdbc9efc
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Oct 14 08:36:09 2018 +0000

description:
Remove dead files that have never been built, and likely can't build since
they are not correct C files.

diffstat:

 crypto/dist/ipsec-tools/src/libipsec/Makefile.am            |    9 +-
 crypto/dist/ipsec-tools/src/libipsec/test-policy-priority.c |  174 ------
 crypto/dist/ipsec-tools/src/libipsec/test-policy.c          |  332 ------------
 3 files changed, 1 insertions(+), 514 deletions(-)

diffs (truncated from 535 to 300 lines):

diff -r 45c89eb13073 -r 88d8bdbc9efc crypto/dist/ipsec-tools/src/libipsec/Makefile.am
--- a/crypto/dist/ipsec-tools/src/libipsec/Makefile.am  Sun Oct 14 08:27:39 2018 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/Makefile.am  Sun Oct 14 08:36:09 2018 +0000
@@ -1,5 +1,4 @@
 
-#bin_PROGRAMS = test-policy test-policy-priority
 lib_LTLIBRARIES = libipsec.la
 
 libipsecdir = $(includedir)/libipsec
@@ -30,10 +29,4 @@
 
 noinst_HEADERS = ipsec_strerror.h
 
-#test_policy_SOURCES = test-policy.c
-#test_policy_LDFLAGS = libipsec.la
-
-#test_policy_priority_SOURCES = test-policy-priority.c
-#test_policy_priority_LDFLAGS = libipsec.la
-
-EXTRA_DIST = ${man3_MANS} test-policy.c
+EXTRA_DIST = ${man3_MANS}
diff -r 45c89eb13073 -r 88d8bdbc9efc crypto/dist/ipsec-tools/src/libipsec/test-policy-priority.c
--- a/crypto/dist/ipsec-tools/src/libipsec/test-policy-priority.c       Sun Oct 14 08:27:39 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-/*     $NetBSD: test-policy-priority.c,v 1.4 2007/07/18 12:07:51 vanhu Exp $   */
-
-/*     $KAME: test-policy.c,v 1.16 2003/08/26 03:24:08 itojun Exp $    */
-
-/*
- * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <net/pfkeyv2.h>
-#include PATH_IPSEC_H
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <err.h>
-
-#include "libpfkey.h"
-
-struct req_t {
-       int result;     /* expected result; 0:ok 1:ng */
-       int dump_result; /* dumped result expected to match original: 1:yes 0:no */
-       char *str;
-       u_int32_t expected_priority;
-} reqs[] = {
-#ifdef HAVE_PFKEY_POLICY_PRIORITY
-{ 0, 0, "out ipsec esp/transport//require", PRIORITY_DEFAULT },
-{ 0, 0, "out prio -1 ipsec esp/transport//require", PRIORITY_DEFAULT + 1 },
-{ 0, 0, "out priority 2147483648 ipsec esp/transport//require", 0 },
-{ 0, 1, "in prio def ipsec esp/transport//require", PRIORITY_DEFAULT },
-{ 0, 1, "in prio low ipsec esp/transport//require", PRIORITY_LOW },
-{ 0, 1, "in prio high ipsec esp/transport//require", PRIORITY_HIGH },
-{ 0, 1, "in prio def + 1 ipsec esp/transport//require", PRIORITY_DEFAULT - 1 },
-{ 0, 1, "in prio def - 1 ipsec esp/transport//require", PRIORITY_DEFAULT + 1},
-{ 0, 1, "in prio low + 1 ipsec esp/transport//require", PRIORITY_LOW - 1 },
-{ 0, 1, "in prio low - 1 ipsec esp/transport//require", PRIORITY_LOW + 1 },
-{ 0, 1, "in prio high + 1 ipsec esp/transport//require", PRIORITY_HIGH - 1 },
-{ 0, 1, "in prio high - 1 ipsec esp/transport//require", PRIORITY_HIGH + 1 },
-{ 1, 0, "in prio low - -1 ipsec esp/transport//require", 0 },
-{ 1, 0, "in prio low + high ipsec esp/transport//require", 0 },
-#else
-{ 0, 1, "out ipsec esp/transport//require", 0 },
-{ 1, 0, "out prio -1 ipsec esp/transport//require", 0 },
-{ 1, 0, "in prio def ipsec esp/transport//require", 0 },
-{ 1, 0, "in prio def + 1 ipsec esp/transport//require", 0 },
-#endif
-};
-
-int test1 __P((void));
-int test1sub1 __P((struct req_t *));
-int test1sub2 __P((char *, int));
-int test2 __P((void));
-int test2sub __P((int));
-
-int
-main(ac, av)
-       int ac;
-       char **av;
-{
-       return test1();
-}
-
-int
-test1()
-{
-       int i;
-       int result;
-       int error = 0;
-
-       printf("TEST1\n");
-       for (i = 0; i < sizeof(reqs)/sizeof(reqs[0]); i++) {
-               printf("#%d [%s]\n", i + 1, reqs[i].str);
-
-               result = test1sub1(&reqs[i]);
-               if (result == 0 && reqs[i].result == 1) {
-                       error = 1;
-                       warnx("ERROR: expecting failure.");
-               } else if (result == 1 && reqs[i].result == 0) {
-                       error = 1;
-                       warnx("ERROR: expecting success.");
-               }
-       }
-
-       return error;
-}
-
-int
-test1sub1(req)
-       struct req_t *req;
-{
-       char *policy;
-       char *policy_str;
-       struct sadb_x_policy *xpl;
-
-       int len;
-
-       policy = ipsec_set_policy(req->str, strlen(req->str));
-       if (policy == NULL) {
-               if (req->result == 0) {
-                       printf("ipsec_set_policy: %s\n", ipsec_strerror());
-               }
-               return 1;
-       }
-
-#ifdef HAVE_PFKEY_POLICY_PRIORITY
-       /* check priority matches expected */
-       xpl = (struct sadb_x_policy *)policy;
-       if (xpl->sadb_x_policy_priority != req->expected_priority) {
-               printf("Actual priority %u does not match expected priority %u\n",
-                      xpl->sadb_x_policy_priority, req->expected_priority);
-               free(policy);
-               return 1;
-       }
-#endif
-
-       if (req->dump_result) {
-               /* invert policy */
-               len = ipsec_get_policylen(policy);
-               if ((policy_str = ipsec_dump_policy(policy, NULL)) == NULL) {
-                       printf("%s\n", ipsec_strerror());
-                       free(policy);
-                       return 1;
-               }
-
-               /* check that they match */
-               if (strcmp(req->str, policy_str) != 0) {
-                       printf("ipsec_dump_policy result (%s) does not match original "
-                              "(%s)\n", policy_str, req->str);
-                       free(policy_str);
-                       free(policy);
-                       return 1;
-               }
-
-               free(policy_str);
-       }
-
-       free(policy);
-       return 0;
-}
diff -r 45c89eb13073 -r 88d8bdbc9efc crypto/dist/ipsec-tools/src/libipsec/test-policy.c
--- a/crypto/dist/ipsec-tools/src/libipsec/test-policy.c        Sun Oct 14 08:27:39 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,332 +0,0 @@
-/*     $NetBSD: test-policy.c,v 1.4 2006/09/09 16:22:09 manu Exp $     */
-
-/*     $KAME: test-policy.c,v 1.16 2003/08/26 03:24:08 itojun Exp $    */
-
-/*
- * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <net/pfkeyv2.h>
-#include <netinet/ipsec.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <err.h>
-
-#include "libpfkey.h"
-
-struct req_t {
-       int result;     /* expected result; 0:ok 1:ng */
-       char *str;
-} reqs[] = {
-{ 0, "out ipsec" },
-{ 1, "must_error" },
-{ 1, "in ipsec must_error" },
-{ 1, "out ipsec esp/must_error" },
-{ 1, "out discard" },
-{ 1, "out none" },
-{ 0, "in entrust" },
-{ 0, "out entrust" },
-{ 1, "out ipsec esp" },
-{ 0, "in ipsec ah/transport" },
-{ 1, "in ipsec ah/tunnel" },
-{ 0, "out ipsec ah/transport/" },
-{ 1, "out ipsec ah/tunnel/" },
-{ 0, "in ipsec esp / transport / 10.0.0.1-10.0.0.2" },
-{ 0, "in ipsec esp/tunnel/::1-::2" },
-{ 1, "in ipsec esp/tunnel/10.0.0.1-::2" },
-{ 0, "in ipsec esp/tunnel/::1-::2/require" },
-{ 0, "out ipsec ah/transport//use" },
-{ 1, "out ipsec ah/transport esp/use" },
-{ 1, "in ipsec ah/transport esp/tunnel" },
-{ 0, "in ipsec ah/transport esp/tunnel/::1-::1" },
-{ 0, "in ipsec
-       ah / transport
-       esp / tunnel / ::1-::2" },
-{ 0, "out ipsec
-       ah/transport/::1-::2 esp/tunnel/::3-::4/use ah/transport/::5-::6/require
-       ah/transport/::1-::2 esp/tunnel/::3-::4/use ah/transport/::5-::6/require
-       ah/transport/::1-::2 esp/tunnel/::3-::4/use ah/transport/::5-::6/require
-       " },
-{ 0, "out ipsec esp/transport/fec0::10-fec0::11/use" },
-};
-
-int test1 __P((void));
-int test1sub1 __P((struct req_t *));
-int test1sub2 __P((char *, int));
-int test2 __P((void));
-int test2sub __P((int));
-
-int
-main(ac, av)
-       int ac;
-       char **av;
-{



Home | Main Index | Thread Index | Old Index