diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-07-24 09:59:04 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-07-24 09:59:04 +0000 |
commit | cf8a63ce921e613109b04585a6ac7ddb1a4ccf5c (patch) | |
tree | ccaebf84327b7eeb4b214481d45e1ae688739cc6 | |
parent | d3b27e35971d741dd22c9efcd80d37f89aa45d99 (diff) |
conform to RFC2367 on SADB_xx naming (local name must be prefixed with
SADB_X_xx)
-rw-r--r-- | sbin/ipsecadm/ipsecadm.c | 10 | ||||
-rw-r--r-- | sbin/ipsecadm/pfkdump.c | 14 | ||||
-rw-r--r-- | sbin/isakmpd/pf_key_v2.c | 10 | ||||
-rw-r--r-- | sys/net/pfkeyv2.c | 18 | ||||
-rw-r--r-- | sys/net/pfkeyv2.h | 14 | ||||
-rw-r--r-- | sys/net/pfkeyv2_convert.c | 10 | ||||
-rw-r--r-- | sys/netinet/ip_ah.c | 10 | ||||
-rw-r--r-- | sys/netinet/ip_esp.c | 10 |
8 files changed, 52 insertions, 44 deletions
diff --git a/sbin/ipsecadm/ipsecadm.c b/sbin/ipsecadm/ipsecadm.c index 015c5b4d583..00496336e41 100644 --- a/sbin/ipsecadm/ipsecadm.c +++ b/sbin/ipsecadm/ipsecadm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsecadm.c,v 1.68 2003/07/24 08:03:19 itojun Exp $ */ +/* $OpenBSD: ipsecadm.c,v 1.69 2003/07/24 09:59:02 itojun Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -103,12 +103,12 @@ transform xf[] = { { "skipjack", SADB_X_EALG_SKIPJACK, XF_ENC | ESP_NEW }, { "md5", SADB_AALG_MD5HMAC, XF_AUTH | AH_NEW | ESP_NEW }, { "sha1", SADB_AALG_SHA1HMAC, XF_AUTH | AH_NEW | ESP_NEW }, - { "sha2-256", SADB_AALG_SHA2_256, XF_AUTH | AH_NEW | ESP_NEW }, - { "sha2-384", SADB_AALG_SHA2_384, XF_AUTH | AH_NEW | ESP_NEW }, - { "sha2-512", SADB_AALG_SHA2_512, XF_AUTH | AH_NEW | ESP_NEW }, + { "sha2-256", SADB_X_AALG_SHA2_256, XF_AUTH | AH_NEW | ESP_NEW }, + { "sha2-384", SADB_X_AALG_SHA2_384, XF_AUTH | AH_NEW | ESP_NEW }, + { "sha2-512", SADB_X_AALG_SHA2_512, XF_AUTH | AH_NEW | ESP_NEW }, { "md5", SADB_X_AALG_MD5, XF_AUTH | AH_OLD }, { "sha1", SADB_X_AALG_SHA1, XF_AUTH | AH_OLD }, - { "rmd160", SADB_AALG_RIPEMD160HMAC, XF_AUTH | AH_NEW | ESP_NEW }, + { "rmd160", SADB_X_AALG_RIPEMD160HMAC, XF_AUTH | AH_NEW | ESP_NEW }, { "deflate", SADB_X_CALG_DEFLATE, XF_COMP | IPCOMP }, { "lzs", SADB_X_CALG_LZS, XF_COMP | IPCOMP }, }; diff --git a/sbin/ipsecadm/pfkdump.c b/sbin/ipsecadm/pfkdump.c index 2c1f5846842..bc5d0b56902 100644 --- a/sbin/ipsecadm/pfkdump.c +++ b/sbin/ipsecadm/pfkdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkdump.c,v 1.6 2003/07/24 08:03:19 itojun Exp $ */ +/* $OpenBSD: pfkdump.c,v 1.7 2003/07/24 09:59:03 itojun Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. @@ -142,13 +142,13 @@ struct idname sa_types[] = { struct idname auth_types[] = { { SADB_AALG_NONE, "none", NULL }, - { SADB_AALG_DES, "des", NULL }, + { SADB_X_AALG_DES, "des", NULL }, { SADB_AALG_MD5HMAC, "hmac-md5", NULL }, - { SADB_AALG_RIPEMD160HMAC, "hmac-ripemd160", NULL }, + { SADB_X_AALG_RIPEMD160HMAC, "hmac-ripemd160", NULL }, { SADB_AALG_SHA1HMAC, "hmac-sha1", NULL }, - { SADB_AALG_SHA2_256, "hmac-sha2-256", NULL }, - { SADB_AALG_SHA2_384, "hmac-sha2-384", NULL }, - { SADB_AALG_SHA2_512, "hmac-sha2-512", NULL }, + { SADB_X_AALG_SHA2_256, "hmac-sha2-256", NULL }, + { SADB_X_AALG_SHA2_384, "hmac-sha2-384", NULL }, + { SADB_X_AALG_SHA2_512, "hmac-sha2-512", NULL }, { SADB_X_AALG_MD5, "md5", NULL }, { SADB_X_AALG_SHA1, "sha1", NULL }, { 0, NULL, NULL } @@ -165,7 +165,7 @@ struct idname enc_types[] = { { SADB_X_EALG_DES_IV32, "des-iv32", NULL }, { SADB_X_EALG_DES_IV64, "des-iv64", NULL }, { SADB_X_EALG_IDEA, "idea", NULL }, - { SADB_X_EALG_NULL, "null", NULL }, + { SADB_EALG_NULL, "null", NULL }, { SADB_X_EALG_RC4, "rc4", NULL }, { SADB_X_EALG_RC5, "rc5", NULL }, { SADB_X_EALG_SKIPJACK, "skipjack", NULL }, diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c index aec9b6e00d8..6870d5db9c6 100644 --- a/sbin/isakmpd/pf_key_v2.c +++ b/sbin/isakmpd/pf_key_v2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_key_v2.c,v 1.133 2003/06/10 16:41:29 deraadt Exp $ */ +/* $OpenBSD: pf_key_v2.c,v 1.134 2003/07/24 09:59:03 itojun Exp $ */ /* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */ /* @@ -961,6 +961,10 @@ pf_key_v2_set_spi (struct sa *sa, struct proto *proto, int incoming, case IPSEC_AUTH_HMAC_RIPEMD: #ifdef SADB_X_AALG_RIPEMD160HMAC96 ssa.sadb_sa_auth = SADB_X_AALG_RIPEMD160HMAC96; +#elif defined(SADB_X_AALG_RIPEMD160HMAC) + ssa.sadb_sa_auth = SADB_X_AALG_RIPEMD160HMAC; +#elif defined(SADB_X_AALG_RIPEMD160) + ssa.sadb_sa_auth = SADB_X_AALG_RIPEMD160; #else ssa.sadb_sa_auth = SADB_AALG_RIPEMD160HMAC; #endif @@ -1008,6 +1012,10 @@ pf_key_v2_set_spi (struct sa *sa, struct proto *proto, int incoming, case IPSEC_AH_RIPEMD: #ifdef SADB_X_AALG_RIPEMD160HMAC96 ssa.sadb_sa_auth = SADB_X_AALG_RIPEMD160HMAC96; +#elif defined(SADB_X_AALG_RIPEMD160HMAC) + ssa.sadb_sa_auth = SADB_X_AALG_RIPEMD160HMAC; +#elif defined(SADB_X_AALG_RIPEMD160) + ssa.sadb_sa_auth = SADB_X_AALG_RIPEMD160; #else ssa.sadb_sa_auth = SADB_AALG_RIPEMD160HMAC; #endif diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c index 8011b81de7c..adb21e2f068 100644 --- a/sys/net/pfkeyv2.c +++ b/sys/net/pfkeyv2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.c,v 1.88 2003/07/24 08:03:19 itojun Exp $ */ +/* $OpenBSD: pfkeyv2.c,v 1.89 2003/07/24 09:59:02 itojun Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -105,10 +105,10 @@ static const struct sadb_alg ealgs[] = { static const struct sadb_alg aalgs[] = { { SADB_AALG_SHA1HMAC, 0, 160, 160 }, { SADB_AALG_MD5HMAC, 0, 128, 128 }, - { SADB_AALG_RIPEMD160HMAC, 0, 160, 160 }, - { SADB_AALG_SHA2_256, 0, 256, 256 }, - { SADB_AALG_SHA2_384, 0, 384, 384 }, - { SADB_AALG_SHA2_512, 0, 512, 512 } + { SADB_X_AALG_RIPEMD160HMAC, 0, 160, 160 }, + { SADB_X_AALG_SHA2_256, 0, 256, 256 }, + { SADB_X_AALG_SHA2_384, 0, 384, 384 }, + { SADB_X_AALG_SHA2_512, 0, 512, 512 } }; static const struct sadb_alg calgs[] = { @@ -1945,7 +1945,7 @@ pfkeyv2_acquire(struct ipsec_policy *ipo, union sockaddr_union *gw, sadb_comb->sadb_comb_auth_maxbits = 160; } else if (!strncasecmp(ipsec_def_auth, "hmac-ripemd160", sizeof("hmac_ripemd160"))) { - sadb_comb->sadb_comb_auth = SADB_AALG_RIPEMD160HMAC; + sadb_comb->sadb_comb_auth = SADB_X_AALG_RIPEMD160HMAC; sadb_comb->sadb_comb_auth_minbits = 160; sadb_comb->sadb_comb_auth_maxbits = 160; } else if (!strncasecmp(ipsec_def_auth, "hmac-md5", @@ -1955,17 +1955,17 @@ pfkeyv2_acquire(struct ipsec_policy *ipo, union sockaddr_union *gw, sadb_comb->sadb_comb_auth_maxbits = 128; } else if (!strncasecmp(ipsec_def_auth, "hmac-sha2-256", sizeof("hmac-sha2-256"))) { - sadb_comb->sadb_comb_auth = SADB_AALG_SHA2_256; + sadb_comb->sadb_comb_auth = SADB_X_AALG_SHA2_256; sadb_comb->sadb_comb_auth_minbits = 256; sadb_comb->sadb_comb_auth_maxbits = 256; } else if (!strncasecmp(ipsec_def_auth, "hmac-sha2-384", sizeof("hmac-sha2-384"))) { - sadb_comb->sadb_comb_auth = SADB_AALG_SHA2_384; + sadb_comb->sadb_comb_auth = SADB_X_AALG_SHA2_384; sadb_comb->sadb_comb_auth_minbits = 384; sadb_comb->sadb_comb_auth_maxbits = 384; } else if (!strncasecmp(ipsec_def_auth, "hmac-sha2-512", sizeof("hmac-sha2-512"))) { - sadb_comb->sadb_comb_auth = SADB_AALG_SHA2_512; + sadb_comb->sadb_comb_auth = SADB_X_AALG_SHA2_512; sadb_comb->sadb_comb_auth_minbits = 512; sadb_comb->sadb_comb_auth_maxbits = 512; } diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h index 7892d847b65..152061fcc2b 100644 --- a/sys/net/pfkeyv2.h +++ b/sys/net/pfkeyv2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.h,v 1.47 2003/02/24 21:34:39 jason Exp $ */ +/* $OpenBSD: pfkeyv2.h,v 1.48 2003/07/24 09:59:02 itojun Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) January 1998 * @@ -267,11 +267,11 @@ struct sadb_x_cred { #define SADB_AALG_NONE 0 #define SADB_AALG_MD5HMAC 2 #define SADB_AALG_SHA1HMAC 3 -#define SADB_AALG_DES 4 -#define SADB_AALG_SHA2_256 5 -#define SADB_AALG_SHA2_384 6 -#define SADB_AALG_SHA2_512 7 -#define SADB_AALG_RIPEMD160HMAC 8 +#define SADB_X_AALG_DES 4 +#define SADB_X_AALG_SHA2_256 5 +#define SADB_X_AALG_SHA2_384 6 +#define SADB_X_AALG_SHA2_512 7 +#define SADB_X_AALG_RIPEMD160HMAC 8 #define SADB_X_AALG_MD5 249 #define SADB_X_AALG_SHA1 250 #define SADB_AALG_MAX 250 @@ -287,7 +287,7 @@ struct sadb_x_cred { #define SADB_X_EALG_3IDEA 8 #define SADB_X_EALG_DES_IV32 9 #define SADB_X_EALG_RC4 10 -#define SADB_X_EALG_NULL 11 +#define SADB_EALG_NULL 11 #define SADB_X_EALG_AES 12 #define SADB_X_EALG_SKIPJACK 249 #define SADB_EALG_MAX 249 diff --git a/sys/net/pfkeyv2_convert.c b/sys/net/pfkeyv2_convert.c index 43e14557ff0..b0026c9fd9a 100644 --- a/sys/net/pfkeyv2_convert.c +++ b/sys/net/pfkeyv2_convert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2_convert.c,v 1.16 2003/07/24 08:03:19 itojun Exp $ */ +/* $OpenBSD: pfkeyv2_convert.c,v 1.17 2003/07/24 09:59:02 itojun Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@keromytis.org) * @@ -180,19 +180,19 @@ export_sa(void **p, struct tdb *tdb) break; case CRYPTO_RIPEMD160_HMAC: - sadb_sa->sadb_sa_auth = SADB_AALG_RIPEMD160HMAC; + sadb_sa->sadb_sa_auth = SADB_X_AALG_RIPEMD160HMAC; break; case CRYPTO_SHA2_256_HMAC: - sadb_sa->sadb_sa_auth = SADB_AALG_SHA2_256; + sadb_sa->sadb_sa_auth = SADB_X_AALG_SHA2_256; break; case CRYPTO_SHA2_384_HMAC: - sadb_sa->sadb_sa_auth = SADB_AALG_SHA2_384; + sadb_sa->sadb_sa_auth = SADB_X_AALG_SHA2_384; break; case CRYPTO_SHA2_512_HMAC: - sadb_sa->sadb_sa_auth = SADB_AALG_SHA2_512; + sadb_sa->sadb_sa_auth = SADB_X_AALG_SHA2_512; break; case CRYPTO_MD5_KPDK: diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index c2689573892..41bf387c718 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.77 2003/07/24 08:03:19 itojun Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.78 2003/07/24 09:59:02 itojun Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -103,19 +103,19 @@ ah_init(struct tdb *tdbp, struct xformsw *xsp, struct ipsecinit *ii) thash = &auth_hash_hmac_sha1_96; break; - case SADB_AALG_RIPEMD160HMAC: + case SADB_X_AALG_RIPEMD160HMAC: thash = &auth_hash_hmac_ripemd_160_96; break; - case SADB_AALG_SHA2_256: + case SADB_X_AALG_SHA2_256: thash = &auth_hash_hmac_sha2_256_96; break; - case SADB_AALG_SHA2_384: + case SADB_X_AALG_SHA2_384: thash = &auth_hash_hmac_sha2_384_96; break; - case SADB_AALG_SHA2_512: + case SADB_X_AALG_SHA2_512: thash = &auth_hash_hmac_sha2_512_96; break; diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 13452b39c70..8ea427e157b 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.85 2003/07/24 08:03:20 itojun Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.86 2003/07/24 09:59:02 itojun Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -156,19 +156,19 @@ esp_init(struct tdb *tdbp, struct xformsw *xsp, struct ipsecinit *ii) thash = &auth_hash_hmac_sha1_96; break; - case SADB_AALG_RIPEMD160HMAC: + case SADB_X_AALG_RIPEMD160HMAC: thash = &auth_hash_hmac_ripemd_160_96; break; - case SADB_AALG_SHA2_256: + case SADB_X_AALG_SHA2_256: thash = &auth_hash_hmac_sha2_256_96; break; - case SADB_AALG_SHA2_384: + case SADB_X_AALG_SHA2_384: thash = &auth_hash_hmac_sha2_384_96; break; - case SADB_AALG_SHA2_512: + case SADB_X_AALG_SHA2_512: thash = &auth_hash_hmac_sha2_512_96; break; |