Source-Changes-HG archive

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

[src/trunk]: src/crypto/dist/kame Import racoon/libipsec as of April 4, 2001.



details:   https://anonhg.NetBSD.org/src/rev/058b2e6fc78d
branches:  trunk
changeset: 508026:058b2e6fc78d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Apr 04 19:33:00 2001 +0000

description:
Import racoon/libipsec as of April 4, 2001.

diffstat:

 crypto/dist/kame/libipsec/pfkey_dump.c   |   11 +-
 crypto/dist/kame/racoon/admin.c          |   11 +-
 crypto/dist/kame/racoon/algorithm.c      |   12 +-
 crypto/dist/kame/racoon/algorithm.h      |    5 +-
 crypto/dist/kame/racoon/cfparse.h        |   13 +-
 crypto/dist/kame/racoon/configure        |  662 +++++++-----------------------
 crypto/dist/kame/racoon/configure.in     |   86 +---
 crypto/dist/kame/racoon/crypto_openssl.c |   27 +-
 crypto/dist/kame/racoon/eaytest.c        |    6 +-
 crypto/dist/kame/racoon/gcmalloc.h       |   76 +++-
 crypto/dist/kame/racoon/grabmyaddr.c     |   13 +-
 crypto/dist/kame/racoon/gssapi.c         |   11 +-
 crypto/dist/kame/racoon/handler.c        |   33 +-
 crypto/dist/kame/racoon/isakmp.h         |   14 +-
 crypto/dist/kame/racoon/isakmp_agg.c     |   42 +-
 crypto/dist/kame/racoon/isakmp_base.c    |   30 +-
 crypto/dist/kame/racoon/isakmp_ident.c   |   39 +-
 crypto/dist/kame/racoon/isakmp_inf.c     |   18 +-
 crypto/dist/kame/racoon/isakmp_quick.c   |   80 +++-
 crypto/dist/kame/racoon/kmpstat.c        |   20 +-
 crypto/dist/kame/racoon/localconf.c      |   20 +-
 crypto/dist/kame/racoon/localconf.h      |    4 +-
 crypto/dist/kame/racoon/logger.c         |   27 +-
 crypto/dist/kame/racoon/misc.c           |   33 +-
 crypto/dist/kame/racoon/oakley.h         |   26 +-
 crypto/dist/kame/racoon/pfkey.c          |   50 +-
 crypto/dist/kame/racoon/plog.c           |   14 +-
 crypto/dist/kame/racoon/policy.c         |   62 ++-
 crypto/dist/kame/racoon/policy.h         |    5 +-
 crypto/dist/kame/racoon/proposal.c       |   17 +-
 crypto/dist/kame/racoon/remoteconf.c     |   22 +-
 crypto/dist/kame/racoon/remoteconf.h     |    3 +-
 crypto/dist/kame/racoon/sainfo.c         |   11 +-
 crypto/dist/kame/racoon/schedule.c       |   15 +-
 crypto/dist/kame/racoon/sockmisc.c       |   82 +++-
 crypto/dist/kame/racoon/sockmisc.h       |    5 +-
 crypto/dist/kame/racoon/str2val.c        |    7 +-
 crypto/dist/kame/racoon/var.h            |    7 +-
 crypto/dist/kame/racoon/vendorid.c       |   89 ++-
 crypto/dist/kame/racoon/vendorid.h       |   33 +-
 crypto/dist/kame/racoon/vmbuf.c          |   15 +-
 41 files changed, 854 insertions(+), 902 deletions(-)

diffs (truncated from 4424 to 300 lines):

diff -r a0bf6fb40d9a -r 058b2e6fc78d crypto/dist/kame/libipsec/pfkey_dump.c
--- a/crypto/dist/kame/libipsec/pfkey_dump.c    Wed Apr 04 17:13:28 2001 +0000
+++ b/crypto/dist/kame/libipsec/pfkey_dump.c    Wed Apr 04 19:33:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $KAME: pfkey_dump.c,v 1.25 2000/12/27 11:38:10 sakane Exp $     */
+/*     $KAME: pfkey_dump.c,v 1.27 2001/03/12 09:03:38 itojun Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -160,6 +160,15 @@
        { SADB_X_AALG_MD5, "md5", },
        { SADB_X_AALG_SHA, "sha", },
        { SADB_X_AALG_NULL, "null", },
+#ifdef SADB_X_AALG_SHA2_256
+       { SADB_X_AALG_SHA2_256, "hmac-sha2-256", },
+#endif
+#ifdef SADB_X_AALG_SHA2_384
+       { SADB_X_AALG_SHA2_384, "hmac-sha2-384", },
+#endif
+#ifdef SADB_X_AALG_SHA2_512
+       { SADB_X_AALG_SHA2_512, "hmac-sha2-512", },
+#endif
        { -1, NULL, },
 };
 
diff -r a0bf6fb40d9a -r 058b2e6fc78d crypto/dist/kame/racoon/admin.c
--- a/crypto/dist/kame/racoon/admin.c   Wed Apr 04 17:13:28 2001 +0000
+++ b/crypto/dist/kame/racoon/admin.c   Wed Apr 04 19:33:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $KAME: admin.c,v 1.21 2000/12/15 13:43:54 sakane Exp $  */
+/*     $KAME: admin.c,v 1.22 2001/04/03 15:51:54 thorpej Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -67,6 +67,7 @@
 #include "admin.h"
 #include "admin_var.h"
 #include "session.h"
+#include "gcmalloc.h"
 
 static int admin_process __P((int, char *));
 static int admin_reply __P((int, struct admin_com *, vchar_t *));
@@ -108,7 +109,7 @@
        }
 
        /* get buffer to receive */
-       if ((combuf = malloc(com.ac_len)) == 0) {
+       if ((combuf = racoon_malloc(com.ac_len)) == 0) {
                plog(LLV_ERROR, LOCATION, NULL,
                        "failed to alloc buffer for admin command\n");
                goto end;
@@ -156,7 +157,7 @@
     end:
        (void)close(so2);
        if (combuf)
-               free(combuf);
+               racoon_free(combuf);
 
        /* exit if child's process. */
        if (pid == 0 && !f_foreground)
@@ -392,7 +393,7 @@
        else
                tlen = sizeof(*combuf);
 
-       retbuf = CALLOC(tlen, char *);
+       retbuf = racoon_calloc(1, tlen);
        if (retbuf == NULL) {
                plog(LLV_ERROR, LOCATION, NULL,
                        "failed to allocate admin buffer\n");
@@ -406,7 +407,7 @@
                memcpy(retbuf + sizeof(*combuf), buf->v, buf->l);
 
        tlen = send(so, retbuf, tlen, 0);
-       free(retbuf);
+       racoon_free(retbuf);
        if (tlen < 0) {
                plog(LLV_ERROR, LOCATION, NULL,
                        "failed to send admin command: %s\n",
diff -r a0bf6fb40d9a -r 058b2e6fc78d crypto/dist/kame/racoon/algorithm.c
--- a/crypto/dist/kame/racoon/algorithm.c       Wed Apr 04 17:13:28 2001 +0000
+++ b/crypto/dist/kame/racoon/algorithm.c       Wed Apr 04 19:33:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $KAME: algorithm.c,v 1.13 2001/01/26 03:26:22 thorpej Exp $     */
+/*     $KAME: algorithm.c,v 1.14 2001/04/03 15:51:54 thorpej Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -31,6 +31,7 @@
 
 #include <sys/param.h>
 #include <sys/types.h>
+#include <stdlib.h>
 
 #include "var.h"
 #include "misc.h"
@@ -43,6 +44,7 @@
 #include "isakmp_var.h"
 #include "isakmp.h"
 #include "ipsec_doi.h"
+#include "gcmalloc.h"
 
 static const int ipsecenc2doi[] = {
        ALGTYPE_NOTHING,
@@ -295,7 +297,7 @@
        struct algorithm_strength **new;
        int i;
 
-       new = CALLOC(MAXALGCLASS * sizeof(*new), struct algorithm_strength **);
+       new = racoon_calloc(1, MAXALGCLASS * sizeof(*new));
        if (new == NULL) {
                plog(LLV_ERROR, LOCATION, NULL,
                        "failed to get buffer.\n");
@@ -303,7 +305,7 @@
        }
 
        for (i = 0; i < MAXALGCLASS; i++) {
-               new[i] = CALLOC(sizeof(*new[i]), struct algorithm_strength *);
+               new[i] = racoon_calloc(1, sizeof(*new[i]));
                if (new[i] == NULL) {
                        plog(LLV_ERROR, LOCATION, NULL,
                                "failed to get buffer.\n");
@@ -322,7 +324,7 @@
 
        for (i = 0; i < MAXALGCLASS; i++)
                if (head[i])
-                       free(head[i]);
+                       racoon_free(head[i]);
 
-       free(head);
+       racoon_free(head);
 }
diff -r a0bf6fb40d9a -r 058b2e6fc78d crypto/dist/kame/racoon/algorithm.h
--- a/crypto/dist/kame/racoon/algorithm.h       Wed Apr 04 17:13:28 2001 +0000
+++ b/crypto/dist/kame/racoon/algorithm.h       Wed Apr 04 19:33:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $KAME: algorithm.h,v 1.11 2000/12/12 16:59:33 thorpej Exp $     */
+/*     $KAME: algorithm.h,v 1.12 2001/03/21 22:38:29 sakane Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -93,8 +93,9 @@
 enum {
        /* dh_group */
        /* 0 is defined as algtype_nothing above. */
-       algtype_modp768 = 1, algtype_modp1024, algtype_modp1536,
+       algtype_modp768 = 1, algtype_modp1024,
        algtype_ec2n155, algtype_ec2n185,
+       algtype_modp1536,
 };
 
 enum {
diff -r a0bf6fb40d9a -r 058b2e6fc78d crypto/dist/kame/racoon/cfparse.h
--- a/crypto/dist/kame/racoon/cfparse.h Wed Apr 04 17:13:28 2001 +0000
+++ b/crypto/dist/kame/racoon/cfparse.h Wed Apr 04 19:33:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $KAME: cfparse.h,v 1.10 2001/01/31 05:45:23 sakane Exp $        */
+/*     $KAME: cfparse.h,v 1.11 2001/03/15 11:44:08 sakane Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -29,17 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#define CF_LIFETYPE_TIME       0
-#define CF_LIFETYPE_BYTE       1
-
-#define CF_UNITTYPE_B  1
-#define CF_UNITTYPE_KB 1024
-#define CF_UNITTYPE_MB (1024*1024)
-#define CF_UNITTYPE_TB (1024*1024*1024)
-#define CF_UNITTYPE_S  1
-#define CF_UNITTYPE_M  60
-#define CF_UNITTYPE_H  (60*60)
-
 /* cfparse.y */
 extern int yyparse __P((void));
 extern int cfparse __P((void));
diff -r a0bf6fb40d9a -r 058b2e6fc78d crypto/dist/kame/racoon/configure
--- a/crypto/dist/kame/racoon/configure Wed Apr 04 17:13:28 2001 +0000
+++ b/crypto/dist/kame/racoon/configure Wed Apr 04 19:33:00 2001 +0000
@@ -1377,8 +1377,8 @@
 
        if test "x$gc_dir" = "x"; then
                
-echo $ac_n "checking for gc containing GC_malloc""... $ac_c" 1>&6
-echo "configure:1382: checking for gc containing GC_malloc" >&5
+echo $ac_n "checking for leak containing GC_malloc""... $ac_c" 1>&6
+echo "configure:1382: checking for leak containing GC_malloc" >&5
 if eval "test \"`echo '$''{'ac_cv_search_GC_malloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1403,7 +1403,7 @@
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  LIBS="-lgc $LIBS"
+  LIBS="-lleak $LIBS"
        cat > conftest.$ac_ext <<EOF
 #line 1409 "configure"
 #include "confdefs.h"
@@ -1418,7 +1418,7 @@
 EOF
 if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_search_GC_malloc="-lgc"
+  ac_cv_search_GC_malloc="-lleak"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -1428,7 +1428,7 @@
 rm -f conftest*
 LIBS="$ac_func_search_save_LIBS"
 test "$ac_cv_search_GC_malloc" = "no" && for i in ; do
-LIBS="-L$i -lgc $ac_func_search_save_LIBS"
+LIBS="-L$i -lleak $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 1434 "configure"
 #include "confdefs.h"
@@ -1443,7 +1443,7 @@
 EOF
 if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_search_GC_malloc="-L$i -lgc"
+  ac_cv_search_GC_malloc="-L$i -lleak"
 break
 else
   echo "configure: failed program was:" >&5
@@ -1463,8 +1463,8 @@
 fi
        else
                
-echo $ac_n "checking for gc containing GC_malloc""... $ac_c" 1>&6
-echo "configure:1468: checking for gc containing GC_malloc" >&5
+echo $ac_n "checking for leak containing GC_malloc""... $ac_c" 1>&6
+echo "configure:1468: checking for leak containing GC_malloc" >&5
 if eval "test \"`echo '$''{'ac_cv_search_GC_malloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1489,7 +1489,7 @@
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  LIBS="-lgc $LIBS"
+  LIBS="-lleak $LIBS"
        cat > conftest.$ac_ext <<EOF
 #line 1495 "configure"
 #include "confdefs.h"
@@ -1504,7 +1504,7 @@
 EOF
 if { (eval echo configure:1506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_search_GC_malloc="-lgc"
+  ac_cv_search_GC_malloc="-lleak"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -1514,7 +1514,7 @@
 rm -f conftest*
 LIBS="$ac_func_search_save_LIBS"
 test "$ac_cv_search_GC_malloc" = "no" && for i in $gc_dir; do
-LIBS="-L$i -lgc $ac_func_search_save_LIBS"
+LIBS="-L$i -lleak $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 1520 "configure"
 #include "confdefs.h"
@@ -1529,7 +1529,7 @@
 EOF
 if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_search_GC_malloc="-L$i -lgc"
+  ac_cv_search_GC_malloc="-L$i -lleak"
 break
 else
   echo "configure: failed program was:" >&5
@@ -1711,228 +1711,8 @@
 else :
   
 fi
-
-echo $ac_n "checking for openssl include path""... $ac_c" 1>&6
-echo "configure:1717: checking for openssl include path" >&5
 cat > conftest.$ac_ext <<EOF
-#line 1719 "configure"
-#include "confdefs.h"
-#include <openssl/opensslv.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 1729 "configure"
-#include "confdefs.h"
-#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER >= 0x00904100L
-yes
-#endif
-EOF



Home | Main Index | Thread Index | Old Index