summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-05 17:53:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-05 17:53:29 +0000
commitcb2957610e60d3d517e97569fa0974ad516203b1 (patch)
treea912fafbe1470213dc837cf6179e8b83cb602fc3 /sys
parent0e4cd77cb17e451785d6025333e7e8a7e955acfa (diff)
#ifdef IPCOMP stuff properly
Diffstat (limited to 'sys')
-rw-r--r--sys/crypto/cryptosoft.c10
-rw-r--r--sys/crypto/xform.c8
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/crypto/cryptosoft.c b/sys/crypto/cryptosoft.c
index 2029c9fdb57..5803f554d9e 100644
--- a/sys/crypto/cryptosoft.c
+++ b/sys/crypto/cryptosoft.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptosoft.c,v 1.26 2001/07/05 16:44:00 jjbg Exp $ */
+/* $OpenBSD: cryptosoft.c,v 1.27 2001/07/05 17:53:28 deraadt Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
@@ -455,7 +455,9 @@ swcr_newsession(u_int32_t *sid, struct cryptoini *cri)
struct swcr_data **swd;
struct auth_hash *axf;
struct enc_xform *txf;
+#ifdef IPCOMP
struct comp_algo *cxf;
+#endif
u_int32_t i;
int k;
@@ -618,14 +620,12 @@ swcr_newsession(u_int32_t *sid, struct cryptoini *cri)
(*swd)->sw_axf = axf;
break;
+#ifdef IPCOMP
case CRYPTO_DEFLATE_COMP:
cxf = &comp_algo_deflate;
- goto compcommon;
-
- compcommon:
(*swd)->sw_cxf = cxf;
break;
-
+#endif
default:
swcr_freesession(i);
return EINVAL;
diff --git a/sys/crypto/xform.c b/sys/crypto/xform.c
index b8e9d4a93a7..0c014b6ca53 100644
--- a/sys/crypto/xform.c
+++ b/sys/crypto/xform.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xform.c,v 1.11 2001/07/05 16:44:00 jjbg Exp $ */
+/* $OpenBSD: xform.c,v 1.12 2001/07/05 17:53:28 deraadt Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -183,12 +183,14 @@ struct auth_hash auth_hash_key_sha1 = {
(void (*)(u_int8_t *, void *)) SHA1Final
};
+#ifdef IPCOMP
/* Compression instance */
struct comp_algo comp_algo_deflate = {
CRYPTO_DEFLATE_COMP, "Deflate",
90, deflate_compress,
deflate_decompress
};
+#endif
/*
* Encryption wrapper routines.
@@ -401,6 +403,8 @@ SHA1Update_int(void *ctx, u_int8_t *buf, u_int16_t len)
return 0;
}
+#ifdef IPCOMP
+
/*
* And compression
*/
@@ -422,3 +426,5 @@ deflate_decompress(data, size, out)
{
return deflate_global(data, size, 1, out);
}
+
+#endif