constant. Then they are mapped as read only.
OK deraadt@ dlg@
-/* $OpenBSD: aesni.c,v 1.49 2019/03/16 16:33:59 visa Exp $ */
+/* $OpenBSD: aesni.c,v 1.50 2021/07/08 09:22:30 bluhm Exp $ */
/*-
* Copyright (c) 2003 Jason Wright
* Copyright (c) 2003, 2004 Theo de Raadt
struct aesni_session *ses = NULL;
struct aesni_aes_ctx *aes1, *aes2;
struct cryptoini *c;
- struct auth_hash *axf;
+ const struct auth_hash *axf;
struct swcr_data *swd;
int i;
aesni_free(struct aesni_session *ses)
{
struct swcr_data *swd;
- struct auth_hash *axf;
+ const struct auth_hash *axf;
if (ses->ses_ghash) {
explicit_bzero(ses->ses_ghash, sizeof(GHASH_CTX));
-/* $OpenBSD: via.c,v 1.33 2020/05/29 04:42:23 deraadt Exp $ */
+/* $OpenBSD: via.c,v 1.34 2021/07/08 09:22:30 bluhm Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
struct cryptoini *c;
struct viac3_softc *sc = vc3_sc;
struct viac3_session *ses = NULL;
- struct auth_hash *axf;
+ const struct auth_hash *axf;
struct swcr_data *swd;
int sesn, i, cw0;
{
struct viac3_softc *sc = vc3_sc;
struct swcr_data *swd;
- struct auth_hash *axf;
+ const struct auth_hash *axf;
int sesn;
u_int32_t sid = ((u_int32_t)tid) & 0xffffffff;
-/* $OpenBSD: cryptox.c,v 1.1 2021/02/21 14:55:17 tobhe Exp $ */
+/* $OpenBSD: cryptox.c,v 1.2 2021/07/08 09:22:30 bluhm Exp $ */
/*
* Copyright (c) 2003 Jason Wright
* Copyright (c) 2003, 2004 Theo de Raadt
{
struct cryptox_session *ses = NULL;
struct cryptoini *c;
- struct auth_hash *axf;
+ const struct auth_hash *axf;
struct swcr_data *swd;
int i;
cryptox_free(struct cryptox_session *ses)
{
struct swcr_data *swd;
- struct auth_hash *axf;
+ const struct auth_hash *axf;
if (ses->ses_swd) {
swd = ses->ses_swd;
-/* $OpenBSD: via.c,v 1.46 2020/05/29 04:42:24 deraadt Exp $ */
+/* $OpenBSD: via.c,v 1.47 2021/07/08 09:22:30 bluhm Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
struct cryptoini *c;
struct viac3_softc *sc = vc3_sc;
struct viac3_session *ses = NULL;
- struct auth_hash *axf;
+ const struct auth_hash *axf;
struct swcr_data *swd;
int sesn, i, cw0;
{
struct viac3_softc *sc = vc3_sc;
struct swcr_data *swd;
- struct auth_hash *axf;
+ const struct auth_hash *axf;
int sesn;
u_int32_t sid = ((u_int32_t)tid) & 0xffffffff;
-/* $OpenBSD: glxsb.c,v 1.36 2020/05/29 04:42:24 deraadt Exp $ */
+/* $OpenBSD: glxsb.c,v 1.37 2021/07/08 09:22:30 bluhm Exp $ */
/*
* Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
{
struct glxsb_softc *sc = glxsb_sc;
struct glxsb_session *ses = NULL;
- struct auth_hash *axf;
- struct enc_xform *txf;
+ const struct auth_hash *axf;
+ const struct enc_xform *txf;
struct cryptoini *c;
struct swcr_data *swd;
int sesn, i;
{
struct glxsb_softc *sc = glxsb_sc;
struct swcr_data *swd;
- struct auth_hash *axf;
- struct enc_xform *txf;
+ const struct auth_hash *axf;
+ const struct enc_xform *txf;
int sesn;
uint32_t sid = ((uint32_t)tid) & 0xffffffff;
-/* $OpenBSD: octcrypto.c,v 1.4 2021/02/25 02:48:19 dlg Exp $ */
+/* $OpenBSD: octcrypto.c,v 1.5 2021/07/08 09:22:30 bluhm Exp $ */
/*
* Copyright (c) 2018 Visa Hankala
void
octcrypto_free(struct octcrypto_session *ses)
{
- struct auth_hash *axf;
+ const struct auth_hash *axf;
struct swcr_data *swd;
if (ses->ses_swd != NULL) {
octcrypto_newsession(uint32_t *sidp, struct cryptoini *cri)
{
uint64_t block[ndwords(HMAC_MAX_BLOCK_LEN)];
- struct auth_hash *axf;
+ const struct auth_hash *axf;
struct cryptoini *c;
const struct octcrypto_hmac *hmac = NULL;
struct octcrypto_softc *sc = octcrypto_sc;
-/* $OpenBSD: cryptosoft.c,v 1.86 2020/05/29 01:22:53 deraadt Exp $ */
+/* $OpenBSD: cryptosoft.c,v 1.87 2021/07/08 09:22:30 bluhm Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
{
unsigned char iv[EALG_MAX_BLOCK_LEN], blk[EALG_MAX_BLOCK_LEN], *idat;
unsigned char *ivp, *nivp, iv2[EALG_MAX_BLOCK_LEN];
- struct enc_xform *exf;
+ const struct enc_xform *exf;
int i, k, j, blks, ind, count, ivlen;
struct mbuf *m = NULL;
struct uio *uio = NULL;
struct swcr_data *sw, caddr_t buf, int outtype)
{
unsigned char aalg[AALG_MAX_RESULT_LEN];
- struct auth_hash *axf;
+ const struct auth_hash *axf;
union authctx ctx;
int err;
union authctx ctx;
struct cryptodesc *crd, *crda = NULL, *crde = NULL;
struct swcr_data *sw, *swa, *swe = NULL;
- struct auth_hash *axf = NULL;
- struct enc_xform *exf = NULL;
+ const struct auth_hash *axf = NULL;
+ const struct enc_xform *exf = NULL;
caddr_t buf = (caddr_t)crp->crp_buf;
uint32_t *blkp;
int aadlen, blksz, i, ivlen, outtype, len, iskip, oskip;
caddr_t buf, int outtype)
{
u_int8_t *data, *out;
- struct comp_algo *cxf;
+ const struct comp_algo *cxf;
int adj;
u_int32_t result;
swcr_newsession(u_int32_t *sid, struct cryptoini *cri)
{
struct swcr_data **swd;
- struct auth_hash *axf;
- struct enc_xform *txf;
- struct comp_algo *cxf;
+ const struct auth_hash *axf;
+ const struct enc_xform *txf;
+ const struct comp_algo *cxf;
u_int32_t i;
int k;
swcr_freesession(u_int64_t tid)
{
struct swcr_data *swd;
- struct enc_xform *txf;
- struct auth_hash *axf;
+ const struct enc_xform *txf;
+ const struct auth_hash *axf;
u_int32_t sid = ((u_int32_t) tid) & 0xffffffff;
if (sid > swcr_sesnum || swcr_sessions == NULL ||
-/* $OpenBSD: cryptosoft.h,v 1.14 2012/12/07 17:03:22 mikeb Exp $ */
+/* $OpenBSD: cryptosoft.h,v 1.15 2021/07/08 09:22:30 bluhm Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
u_int8_t *SW_ictx;
u_int8_t *SW_octx;
u_int32_t SW_klen;
- struct auth_hash *SW_axf;
+ const struct auth_hash *SW_axf;
} SWCR_AUTH;
struct {
u_int8_t *SW_kschedule;
- struct enc_xform *SW_exf;
+ const struct enc_xform *SW_exf;
} SWCR_ENC;
struct {
u_int32_t SW_size;
- struct comp_algo *SW_cxf;
+ const struct comp_algo *SW_cxf;
} SWCR_COMP;
} SWCR_UN;
-/* $OpenBSD: xform.c,v 1.59 2018/04/09 04:34:56 visa Exp $ */
+/* $OpenBSD: xform.c,v 1.60 2021/07/08 09:22:30 bluhm Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
void aes_xts_crypt(struct aes_xts_ctx *, u_int8_t *, u_int);
/* Encryption instances */
-struct enc_xform enc_xform_3des = {
+const struct enc_xform enc_xform_3des = {
CRYPTO_3DES_CBC, "3DES",
8, 8, 24, 24, 384,
des3_encrypt,
NULL
};
-struct enc_xform enc_xform_blf = {
+const struct enc_xform enc_xform_blf = {
CRYPTO_BLF_CBC, "Blowfish",
8, 8, 5, 56 /* 448 bits, max key */,
sizeof(blf_ctx),
NULL
};
-struct enc_xform enc_xform_cast5 = {
+const struct enc_xform enc_xform_cast5 = {
CRYPTO_CAST_CBC, "CAST-128",
8, 8, 5, 16,
sizeof(cast_key),
NULL
};
-struct enc_xform enc_xform_aes = {
+const struct enc_xform enc_xform_aes = {
CRYPTO_AES_CBC, "AES",
16, 16, 16, 32,
sizeof(AES_CTX),
NULL
};
-struct enc_xform enc_xform_aes_ctr = {
+const struct enc_xform enc_xform_aes_ctr = {
CRYPTO_AES_CTR, "AES-CTR",
16, 8, 16+4, 32+4,
sizeof(struct aes_ctr_ctx),
aes_ctr_reinit
};
-struct enc_xform enc_xform_aes_gcm = {
+const struct enc_xform enc_xform_aes_gcm = {
CRYPTO_AES_GCM_16, "AES-GCM",
1, 8, 16+4, 32+4,
sizeof(struct aes_ctr_ctx),
aes_gcm_reinit
};
-struct enc_xform enc_xform_aes_gmac = {
+const struct enc_xform enc_xform_aes_gmac = {
CRYPTO_AES_GMAC, "AES-GMAC",
1, 8, 16+4, 32+4, 0,
NULL,
NULL
};
-struct enc_xform enc_xform_aes_xts = {
+const struct enc_xform enc_xform_aes_xts = {
CRYPTO_AES_XTS, "AES-XTS",
16, 8, 32, 64,
sizeof(struct aes_xts_ctx),
aes_xts_reinit
};
-struct enc_xform enc_xform_chacha20_poly1305 = {
+const struct enc_xform enc_xform_chacha20_poly1305 = {
CRYPTO_CHACHA20_POLY1305, "CHACHA20-POLY1305",
1, 8, 32+4, 32+4,
sizeof(struct chacha20_ctx),
chacha20_reinit
};
-struct enc_xform enc_xform_null = {
+const struct enc_xform enc_xform_null = {
CRYPTO_NULL, "NULL",
4, 0, 0, 256, 0,
null_encrypt,
};
/* Authentication instances */
-struct auth_hash auth_hash_hmac_md5_96 = {
+const struct auth_hash auth_hash_hmac_md5_96 = {
CRYPTO_MD5_HMAC, "HMAC-MD5",
16, 16, 12, sizeof(MD5_CTX), HMAC_MD5_BLOCK_LEN,
(void (*) (void *)) MD5Init, NULL, NULL,
(void (*) (u_int8_t *, void *)) MD5Final
};
-struct auth_hash auth_hash_hmac_sha1_96 = {
+const struct auth_hash auth_hash_hmac_sha1_96 = {
CRYPTO_SHA1_HMAC, "HMAC-SHA1",
20, 20, 12, sizeof(SHA1_CTX), HMAC_SHA1_BLOCK_LEN,
(void (*) (void *)) SHA1Init, NULL, NULL,
(void (*) (u_int8_t *, void *)) SHA1Final
};
-struct auth_hash auth_hash_hmac_ripemd_160_96 = {
+const struct auth_hash auth_hash_hmac_ripemd_160_96 = {
CRYPTO_RIPEMD160_HMAC, "HMAC-RIPEMD-160",
20, 20, 12, sizeof(RMD160_CTX), HMAC_RIPEMD160_BLOCK_LEN,
(void (*)(void *)) RMD160Init, NULL, NULL,
(void (*)(u_int8_t *, void *)) RMD160Final
};
-struct auth_hash auth_hash_hmac_sha2_256_128 = {
+const struct auth_hash auth_hash_hmac_sha2_256_128 = {
CRYPTO_SHA2_256_HMAC, "HMAC-SHA2-256",
32, 32, 16, sizeof(SHA2_CTX), HMAC_SHA2_256_BLOCK_LEN,
(void (*)(void *)) SHA256Init, NULL, NULL,
(void (*)(u_int8_t *, void *)) SHA256Final
};
-struct auth_hash auth_hash_hmac_sha2_384_192 = {
+const struct auth_hash auth_hash_hmac_sha2_384_192 = {
CRYPTO_SHA2_384_HMAC, "HMAC-SHA2-384",
48, 48, 24, sizeof(SHA2_CTX), HMAC_SHA2_384_BLOCK_LEN,
(void (*)(void *)) SHA384Init, NULL, NULL,
(void (*)(u_int8_t *, void *)) SHA384Final
};
-struct auth_hash auth_hash_hmac_sha2_512_256 = {
+const struct auth_hash auth_hash_hmac_sha2_512_256 = {
CRYPTO_SHA2_512_HMAC, "HMAC-SHA2-512",
64, 64, 32, sizeof(SHA2_CTX), HMAC_SHA2_512_BLOCK_LEN,
(void (*)(void *)) SHA512Init, NULL, NULL,
(void (*)(u_int8_t *, void *)) SHA512Final
};
-struct auth_hash auth_hash_gmac_aes_128 = {
+const struct auth_hash auth_hash_gmac_aes_128 = {
CRYPTO_AES_128_GMAC, "GMAC-AES-128",
16+4, GMAC_BLOCK_LEN, GMAC_DIGEST_LEN, sizeof(AES_GMAC_CTX),
AESCTR_BLOCKSIZE, AES_GMAC_Init, AES_GMAC_Setkey, AES_GMAC_Reinit,
AES_GMAC_Update, AES_GMAC_Final
};
-struct auth_hash auth_hash_gmac_aes_192 = {
+const struct auth_hash auth_hash_gmac_aes_192 = {
CRYPTO_AES_192_GMAC, "GMAC-AES-192",
24+4, GMAC_BLOCK_LEN, GMAC_DIGEST_LEN, sizeof(AES_GMAC_CTX),
AESCTR_BLOCKSIZE, AES_GMAC_Init, AES_GMAC_Setkey, AES_GMAC_Reinit,
AES_GMAC_Update, AES_GMAC_Final
};
-struct auth_hash auth_hash_gmac_aes_256 = {
+const struct auth_hash auth_hash_gmac_aes_256 = {
CRYPTO_AES_256_GMAC, "GMAC-AES-256",
32+4, GMAC_BLOCK_LEN, GMAC_DIGEST_LEN, sizeof(AES_GMAC_CTX),
AESCTR_BLOCKSIZE, AES_GMAC_Init, AES_GMAC_Setkey, AES_GMAC_Reinit,
AES_GMAC_Update, AES_GMAC_Final
};
-struct auth_hash auth_hash_chacha20_poly1305 = {
+const struct auth_hash auth_hash_chacha20_poly1305 = {
CRYPTO_CHACHA20_POLY1305_MAC, "CHACHA20-POLY1305",
CHACHA20_KEYSIZE+CHACHA20_SALT, POLY1305_BLOCK_LEN, POLY1305_TAGLEN,
sizeof(CHACHA20_POLY1305_CTX), CHACHA20_BLOCK_LEN,
};
/* Compression instance */
-struct comp_algo comp_algo_deflate = {
+const struct comp_algo comp_algo_deflate = {
CRYPTO_DEFLATE_COMP, "Deflate",
90, deflate_compress,
deflate_decompress
};
-struct comp_algo comp_algo_lzs = {
+const struct comp_algo comp_algo_lzs = {
CRYPTO_LZS_COMP, "LZS",
90, lzs_dummy,
lzs_dummy
-/* $OpenBSD: xform.h,v 1.30 2018/04/09 04:34:56 visa Exp $ */
+/* $OpenBSD: xform.h,v 1.31 2021/07/08 09:22:30 bluhm Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
AES_GMAC_CTX aes_gmac_ctx;
};
-extern struct enc_xform enc_xform_3des;
-extern struct enc_xform enc_xform_blf;
-extern struct enc_xform enc_xform_cast5;
-extern struct enc_xform enc_xform_aes;
-extern struct enc_xform enc_xform_aes_ctr;
-extern struct enc_xform enc_xform_aes_gcm;
-extern struct enc_xform enc_xform_aes_gmac;
-extern struct enc_xform enc_xform_aes_xts;
-extern struct enc_xform enc_xform_chacha20_poly1305;
-extern struct enc_xform enc_xform_null;
+extern const struct enc_xform enc_xform_3des;
+extern const struct enc_xform enc_xform_blf;
+extern const struct enc_xform enc_xform_cast5;
+extern const struct enc_xform enc_xform_aes;
+extern const struct enc_xform enc_xform_aes_ctr;
+extern const struct enc_xform enc_xform_aes_gcm;
+extern const struct enc_xform enc_xform_aes_gmac;
+extern const struct enc_xform enc_xform_aes_xts;
+extern const struct enc_xform enc_xform_chacha20_poly1305;
+extern const struct enc_xform enc_xform_null;
-extern struct auth_hash auth_hash_hmac_md5_96;
-extern struct auth_hash auth_hash_hmac_sha1_96;
-extern struct auth_hash auth_hash_hmac_ripemd_160_96;
-extern struct auth_hash auth_hash_hmac_sha2_256_128;
-extern struct auth_hash auth_hash_hmac_sha2_384_192;
-extern struct auth_hash auth_hash_hmac_sha2_512_256;
-extern struct auth_hash auth_hash_gmac_aes_128;
-extern struct auth_hash auth_hash_gmac_aes_192;
-extern struct auth_hash auth_hash_gmac_aes_256;
-extern struct auth_hash auth_hash_chacha20_poly1305;
+extern const struct auth_hash auth_hash_hmac_md5_96;
+extern const struct auth_hash auth_hash_hmac_sha1_96;
+extern const struct auth_hash auth_hash_hmac_ripemd_160_96;
+extern const struct auth_hash auth_hash_hmac_sha2_256_128;
+extern const struct auth_hash auth_hash_hmac_sha2_384_192;
+extern const struct auth_hash auth_hash_hmac_sha2_512_256;
+extern const struct auth_hash auth_hash_gmac_aes_128;
+extern const struct auth_hash auth_hash_gmac_aes_192;
+extern const struct auth_hash auth_hash_gmac_aes_256;
+extern const struct auth_hash auth_hash_chacha20_poly1305;
-extern struct comp_algo comp_algo_deflate;
-extern struct comp_algo comp_algo_lzs;
+extern const struct comp_algo comp_algo_deflate;
+extern const struct comp_algo comp_algo_lzs;
#endif /* _CRYPTO_XFORM_H_ */
-/* $OpenBSD: ip_ah.c,v 1.147 2021/06/18 15:34:21 bluhm Exp $ */
+/* $OpenBSD: ip_ah.c,v 1.148 2021/07/08 09:22:30 bluhm Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
int
ah_init(struct tdb *tdbp, struct xformsw *xsp, struct ipsecinit *ii)
{
- struct auth_hash *thash = NULL;
+ const struct auth_hash *thash = NULL;
struct cryptoini cria, crin;
int error;
int
ah_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
{
- struct auth_hash *ahx = (struct auth_hash *) tdb->tdb_authalgxform;
+ const struct auth_hash *ahx = tdb->tdb_authalgxform;
struct tdb_crypto *tc = NULL;
u_int32_t btsx, esn;
u_int8_t hl;
int
ah_input_cb(struct tdb *tdb, struct tdb_crypto *tc, struct mbuf *m, int clen)
{
- struct auth_hash *ahx = (struct auth_hash *) tdb->tdb_authalgxform;
+ const struct auth_hash *ahx = tdb->tdb_authalgxform;
int roff, rplen, skip, protoff;
u_int32_t btsx, esn;
caddr_t ptr;
ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
int protoff)
{
- struct auth_hash *ahx = (struct auth_hash *) tdb->tdb_authalgxform;
+ const struct auth_hash *ahx = tdb->tdb_authalgxform;
struct cryptodesc *crda;
struct tdb_crypto *tc = NULL;
struct mbuf *mi;
-/* $OpenBSD: ip_esp.c,v 1.164 2021/07/07 18:03:46 bluhm Exp $ */
+/* $OpenBSD: ip_esp.c,v 1.165 2021/07/08 09:22:30 bluhm Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
int
esp_init(struct tdb *tdbp, struct xformsw *xsp, struct ipsecinit *ii)
{
- struct enc_xform *txform = NULL;
- struct auth_hash *thash = NULL;
+ const struct enc_xform *txform = NULL;
+ const struct auth_hash *thash = NULL;
struct cryptoini cria, crie, crin;
int error;
int
esp_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
{
- struct auth_hash *esph = (struct auth_hash *) tdb->tdb_authalgxform;
- struct enc_xform *espx = (struct enc_xform *) tdb->tdb_encalgxform;
+ const struct auth_hash *esph = tdb->tdb_authalgxform;
+ const struct enc_xform *espx = tdb->tdb_encalgxform;
struct cryptodesc *crde = NULL, *crda = NULL;
struct cryptop *crp = NULL;
struct tdb_crypto *tc = NULL;
u_int8_t lastthree[3], aalg[AH_HMAC_MAX_HASHLEN];
int hlen, roff, skip, protoff;
struct mbuf *m1, *mo;
- struct auth_hash *esph;
+ const struct auth_hash *esph;
u_int32_t btsx, esn;
caddr_t ptr;
#ifdef ENCDEBUG
NET_ASSERT_LOCKED();
- esph = (struct auth_hash *) tdb->tdb_authalgxform;
+ esph = tdb->tdb_authalgxform;
/* If authentication was performed, check now. */
if (esph != NULL) {
esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
int protoff)
{
- struct enc_xform *espx = (struct enc_xform *) tdb->tdb_encalgxform;
- struct auth_hash *esph = (struct auth_hash *) tdb->tdb_authalgxform;
+ const struct enc_xform *espx = tdb->tdb_encalgxform;
+ const struct auth_hash *esph = tdb->tdb_authalgxform;
int ilen, hlen, rlen, padding, blks, alen, roff, error;
u_int64_t replay64;
u_int32_t replay;
-/* $OpenBSD: ip_ipcomp.c,v 1.68 2021/06/18 15:34:21 bluhm Exp $ */
+/* $OpenBSD: ip_ipcomp.c,v 1.69 2021/07/08 09:22:30 bluhm Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
int
ipcomp_init(struct tdb *tdbp, struct xformsw *xsp, struct ipsecinit *ii)
{
- struct comp_algo *tcomp = NULL;
+ const struct comp_algo *tcomp = NULL;
struct cryptoini cric;
int error;
int
ipcomp_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
{
- struct comp_algo *ipcompx = (struct comp_algo *) tdb->tdb_compalgxform;
+ const struct comp_algo *ipcompx = tdb->tdb_compalgxform;
struct tdb_crypto *tc;
int hlen, error;
ipcomp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
int protoff)
{
- struct comp_algo *ipcompx = (struct comp_algo *) tdb->tdb_compalgxform;
+ const struct comp_algo *ipcompx = tdb->tdb_compalgxform;
int error, hlen;
struct cryptodesc *crdc = NULL;
struct cryptop *crp = NULL;
-/* $OpenBSD: ip_ipsp.h,v 1.198 2021/07/07 18:03:46 bluhm Exp $ */
+/* $OpenBSD: ip_ipsp.h,v 1.199 2021/07/08 09:22:30 bluhm Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
struct tdb *tdb_onext;
struct xformsw *tdb_xform; /* Transform to use */
- struct enc_xform *tdb_encalgxform; /* Enc algorithm */
- struct auth_hash *tdb_authalgxform; /* Auth algorithm */
- struct comp_algo *tdb_compalgxform; /* Compression algo */
+ const struct enc_xform *tdb_encalgxform; /* Enc algorithm */
+ const struct auth_hash *tdb_authalgxform; /* Auth algorithm */
+ const struct comp_algo *tdb_compalgxform; /* Compression algo */
#define TDBF_UNIQUE 0x00001 /* This should not be used by others */
#define TDBF_TIMER 0x00002 /* Absolute expiration timer in use */
extern char ipsec_def_auth[];
extern char ipsec_def_comp[];
-extern struct enc_xform enc_xform_des;
-extern struct enc_xform enc_xform_3des;
-extern struct enc_xform enc_xform_blf;
-extern struct enc_xform enc_xform_cast5;
-
-extern struct auth_hash auth_hash_hmac_md5_96;
-extern struct auth_hash auth_hash_hmac_sha1_96;
-extern struct auth_hash auth_hash_hmac_ripemd_160_96;
-
-extern struct comp_algo comp_algo_deflate;
-
extern TAILQ_HEAD(ipsec_policy_head, ipsec_policy) ipsec_policy_head;
struct cryptop;