summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/hifn7751.c28
-rw-r--r--sys/dev/pci/ubsec.c32
2 files changed, 30 insertions, 30 deletions
diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c
index 053ed92f19b..83350e08f28 100644
--- a/sys/dev/pci/hifn7751.c
+++ b/sys/dev/pci/hifn7751.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hifn7751.c,v 1.51 2000/10/26 00:41:25 jason Exp $ */
+/* $OpenBSD: hifn7751.c,v 1.52 2000/11/17 05:18:41 angelos Exp $ */
/*
* Invertex AEON / Hi/fn 7751 driver
@@ -279,9 +279,9 @@ hifn_attach(parent, self, aux)
hifn_newsession, hifn_freesession, hifn_process);
/*FALLTHROUGH*/
case HIFN_PUSTAT_ENA_1:
- crypto_register(sc->sc_cid, CRYPTO_MD5_HMAC96,
+ crypto_register(sc->sc_cid, CRYPTO_MD5_HMAC,
hifn_newsession, hifn_freesession, hifn_process);
- crypto_register(sc->sc_cid, CRYPTO_SHA1_HMAC96,
+ crypto_register(sc->sc_cid, CRYPTO_SHA1_HMAC,
NULL, NULL, NULL);
crypto_register(sc->sc_cid, CRYPTO_DES_CBC,
NULL, NULL, NULL);
@@ -1150,8 +1150,8 @@ hifn_newsession(sidp, cri)
return (ENOMEM);
for (c = cri; c != NULL; c = c->cri_next) {
- if (c->cri_alg == CRYPTO_MD5_HMAC96 ||
- c->cri_alg == CRYPTO_SHA1_HMAC96) {
+ if (c->cri_alg == CRYPTO_MD5_HMAC ||
+ c->cri_alg == CRYPTO_SHA1_HMAC) {
if (mac)
return (EINVAL);
mac = 1;
@@ -1251,8 +1251,8 @@ hifn_process(crp)
crd2 = crd1->crd_next;
if (crd2 == NULL) {
- if (crd1->crd_alg == CRYPTO_MD5_HMAC96 ||
- crd1->crd_alg == CRYPTO_SHA1_HMAC96) {
+ if (crd1->crd_alg == CRYPTO_MD5_HMAC ||
+ crd1->crd_alg == CRYPTO_SHA1_HMAC) {
maccrd = crd1;
enccrd = NULL;
} else if (crd1->crd_alg == CRYPTO_DES_CBC ||
@@ -1266,8 +1266,8 @@ hifn_process(crp)
goto errout;
}
} else {
- if ((crd1->crd_alg == CRYPTO_MD5_HMAC96 ||
- crd1->crd_alg == CRYPTO_SHA1_HMAC96) &&
+ if ((crd1->crd_alg == CRYPTO_MD5_HMAC ||
+ crd1->crd_alg == CRYPTO_SHA1_HMAC) &&
(crd2->crd_alg == CRYPTO_DES_CBC ||
crd2->crd_alg == CRYPTO_3DES_CBC) &&
((crd2->crd_flags & CRD_F_ENCRYPT) == 0)) {
@@ -1276,8 +1276,8 @@ hifn_process(crp)
enccrd = crd2;
} else if ((crd1->crd_alg == CRYPTO_DES_CBC ||
crd1->crd_alg == CRYPTO_3DES_CBC) &&
- (crd2->crd_alg == CRYPTO_MD5_HMAC96 ||
- crd2->crd_alg == CRYPTO_SHA1_HMAC96) &&
+ (crd2->crd_alg == CRYPTO_MD5_HMAC ||
+ crd2->crd_alg == CRYPTO_SHA1_HMAC) &&
(crd1->crd_flags & CRD_F_ENCRYPT)) {
enccrd = crd1;
maccrd = crd2;
@@ -1331,7 +1331,7 @@ hifn_process(crp)
HIFN_MAC_CMD_MODE_HMAC | HIFN_MAC_CMD_RESULT |
HIFN_MAC_CMD_POS_IPSEC | HIFN_MAC_CMD_TRUNC;
- if (maccrd->crd_alg == CRYPTO_MD5_HMAC96)
+ if (maccrd->crd_alg == CRYPTO_MD5_HMAC)
cmd->mac_masks |= HIFN_MAC_CMD_ALG_MD5;
else
cmd->mac_masks |= HIFN_MAC_CMD_ALG_SHA1;
@@ -1425,8 +1425,8 @@ hifn_callback(sc, cmd, macbuf)
if (macbuf != NULL) {
for (crd = crp->crp_desc; crd; crd = crd->crd_next) {
- if (crd->crd_alg != CRYPTO_MD5_HMAC96 &&
- crd->crd_alg != CRYPTO_SHA1_HMAC96)
+ if (crd->crd_alg != CRYPTO_MD5_HMAC &&
+ crd->crd_alg != CRYPTO_SHA1_HMAC)
continue;
m_copyback((struct mbuf *)crp->crp_buf,
crd->crd_inject, 12, macbuf);
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index 7261feb30f2..f131bc01a7d 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.33 2000/09/21 04:39:11 jason Exp $ */
+/* $OpenBSD: ubsec.c,v 1.34 2000/11/17 05:18:41 angelos Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -183,8 +183,8 @@ ubsec_attach(parent, self, aux)
crypto_register(sc->sc_cid, CRYPTO_3DES_CBC,
ubsec_newsession, ubsec_freesession, ubsec_process);
crypto_register(sc->sc_cid, CRYPTO_DES_CBC, NULL, NULL, NULL);
- crypto_register(sc->sc_cid, CRYPTO_MD5_HMAC96, NULL, NULL, NULL);
- crypto_register(sc->sc_cid, CRYPTO_SHA1_HMAC96, NULL, NULL, NULL);
+ crypto_register(sc->sc_cid, CRYPTO_MD5_HMAC, NULL, NULL, NULL);
+ crypto_register(sc->sc_cid, CRYPTO_SHA1_HMAC, NULL, NULL, NULL);
WRITE_REG(sc, BS_CTRL,
READ_REG(sc, BS_CTRL) | BS_CTRL_MCR1INT | BS_CTRL_DMAERR |
@@ -383,8 +383,8 @@ ubsec_newsession(sidp, cri)
return (EINVAL);
for (c = cri; c != NULL; c = c->cri_next) {
- if (c->cri_alg == CRYPTO_MD5_HMAC96 ||
- c->cri_alg == CRYPTO_SHA1_HMAC96) {
+ if (c->cri_alg == CRYPTO_MD5_HMAC ||
+ c->cri_alg == CRYPTO_SHA1_HMAC) {
if (macini)
return (EINVAL);
macini = c;
@@ -457,7 +457,7 @@ ubsec_newsession(sidp, cri)
for (i = 0; i < macini->cri_klen / 8; i++)
macini->cri_key[i] ^= HMAC_IPAD_VAL;
- if (macini->cri_alg == CRYPTO_MD5_HMAC96) {
+ if (macini->cri_alg == CRYPTO_MD5_HMAC) {
MD5Init(&md5ctx);
MD5Update(&md5ctx, macini->cri_key,
macini->cri_klen / 8);
@@ -478,7 +478,7 @@ ubsec_newsession(sidp, cri)
for (i = 0; i < macini->cri_klen / 8; i++)
macini->cri_key[i] ^= (HMAC_IPAD_VAL ^ HMAC_OPAD_VAL);
- if (macini->cri_alg == CRYPTO_MD5_HMAC96) {
+ if (macini->cri_alg == CRYPTO_MD5_HMAC) {
MD5Init(&md5ctx);
MD5Update(&md5ctx, macini->cri_key,
macini->cri_klen / 8);
@@ -598,8 +598,8 @@ ubsec_process(crp)
crd2 = crd1->crd_next;
if (crd2 == NULL) {
- if (crd1->crd_alg == CRYPTO_MD5_HMAC96 ||
- crd1->crd_alg == CRYPTO_SHA1_HMAC96) {
+ if (crd1->crd_alg == CRYPTO_MD5_HMAC ||
+ crd1->crd_alg == CRYPTO_SHA1_HMAC) {
maccrd = crd1;
enccrd = NULL;
} else if (crd1->crd_alg == CRYPTO_DES_CBC ||
@@ -611,8 +611,8 @@ ubsec_process(crp)
goto errout;
}
} else {
- if ((crd1->crd_alg == CRYPTO_MD5_HMAC96 ||
- crd1->crd_alg == CRYPTO_SHA1_HMAC96) &&
+ if ((crd1->crd_alg == CRYPTO_MD5_HMAC ||
+ crd1->crd_alg == CRYPTO_SHA1_HMAC) &&
(crd2->crd_alg == CRYPTO_DES_CBC ||
crd2->crd_alg == CRYPTO_3DES_CBC) &&
((crd2->crd_flags & CRD_F_ENCRYPT) == 0)) {
@@ -620,8 +620,8 @@ ubsec_process(crp)
enccrd = crd2;
} else if ((crd1->crd_alg == CRYPTO_DES_CBC ||
crd1->crd_alg == CRYPTO_3DES_CBC) &&
- (crd2->crd_alg == CRYPTO_MD5_HMAC96 ||
- crd2->crd_alg == CRYPTO_SHA1_HMAC96) &&
+ (crd2->crd_alg == CRYPTO_MD5_HMAC ||
+ crd2->crd_alg == CRYPTO_SHA1_HMAC) &&
(crd1->crd_flags & CRD_F_ENCRYPT)) {
enccrd = crd1;
maccrd = crd2;
@@ -672,7 +672,7 @@ ubsec_process(crp)
if (maccrd) {
macoffset = maccrd->crd_skip;
- if (maccrd->crd_alg == CRYPTO_MD5_HMAC96)
+ if (maccrd->crd_alg == CRYPTO_MD5_HMAC)
q->q_ctx.pc_flags |= UBS_PKTCTX_AUTH_MD5;
else
q->q_ctx.pc_flags |= UBS_PKTCTX_AUTH_SHA1;
@@ -965,8 +965,8 @@ ubsec_callback(q)
}
for (crd = crp->crp_desc; crd; crd = crd->crd_next) {
- if (crd->crd_alg != CRYPTO_MD5_HMAC96 &&
- crd->crd_alg != CRYPTO_SHA1_HMAC96)
+ if (crd->crd_alg != CRYPTO_MD5_HMAC &&
+ crd->crd_alg != CRYPTO_SHA1_HMAC)
continue;
m_copyback((struct mbuf *)crp->crp_buf,
crd->crd_inject, 12, (caddr_t)q->q_macbuf);