From: mikeb Date: Wed, 21 Feb 2018 21:09:57 +0000 (+0000) Subject: Mark VIA padlock as capable of dealing with ESN X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c0e25af143e18e25221c56af208ef526289a0e09;p=openbsd Mark VIA padlock as capable of dealing with ESN There are no actual changes to the driver since the software crypto driver is called to handle authentication operations. This enabled padlock to be used when tunnels are setup with iked(8). Tested by and OK fcambus --- diff --git a/sys/arch/amd64/amd64/via.c b/sys/arch/amd64/amd64/via.c index 0f8f63f4957..5c102b67a7b 100644 --- a/sys/arch/amd64/amd64/via.c +++ b/sys/arch/amd64/amd64/via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: via.c,v 1.27 2018/02/20 15:02:13 mikeb Exp $ */ +/* $OpenBSD: via.c,v 1.28 2018/02/21 21:09:57 mikeb Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -97,6 +97,7 @@ viac3_crypto_setup(void) algs[CRYPTO_SHA2_256_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED; algs[CRYPTO_SHA2_384_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED; algs[CRYPTO_SHA2_512_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED; + algs[CRYPTO_ESN] = CRYPTO_ALG_FLAG_SUPPORTED; vc3_sc->sc_cid = crypto_get_driverid(0); if (vc3_sc->sc_cid < 0) { @@ -252,6 +253,9 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri) swd->sw_axf = axf; swd->sw_alg = c->cri_alg; + break; + case CRYPTO_ESN: + /* nothing to do */ break; default: viac3_crypto_freesession(sesn); diff --git a/sys/arch/i386/i386/via.c b/sys/arch/i386/i386/via.c index 89fd4a39a38..ddfcafb1f38 100644 --- a/sys/arch/i386/i386/via.c +++ b/sys/arch/i386/i386/via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: via.c,v 1.41 2018/02/20 15:02:13 mikeb Exp $ */ +/* $OpenBSD: via.c,v 1.42 2018/02/21 21:09:57 mikeb Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -98,6 +98,7 @@ viac3_crypto_setup(void) algs[CRYPTO_SHA2_256_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED; algs[CRYPTO_SHA2_384_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED; algs[CRYPTO_SHA2_512_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED; + algs[CRYPTO_ESN] = CRYPTO_ALG_FLAG_SUPPORTED; vc3_sc->sc_cid = crypto_get_driverid(0); if (vc3_sc->sc_cid < 0) { @@ -253,6 +254,9 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri) swd->sw_axf = axf; swd->sw_alg = c->cri_alg; + break; + case CRYPTO_ESN: + /* nothing to do */ break; default: viac3_crypto_freesession(sesn);