MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ah_init

Function ah_init

freebsd/netipsec/xform_ah.c:231–246  ·  view source on GitHub ↗

* ah_init() is called when an SPI is being set up. */

Source from the content-addressed store, hash-verified

229 * ah_init() is called when an SPI is being set up.
230 */
231static int
232ah_init(struct secasvar *sav, struct xformsw *xsp)
233{
234 struct crypto_session_params csp;
235 int error;
236
237 memset(&csp, 0, sizeof(csp));
238 csp.csp_mode = CSP_MODE_DIGEST;
239
240 if (sav->flags & SADB_X_SAFLAGS_ESN)
241 csp.csp_flags |= CSP_F_ESN;
242
243 error = ah_init0(sav, xsp, &csp);
244 return error ? error :
245 crypto_newsession(&sav->tdb_cryptoid, &csp, V_crypto_support);
246}
247
248static void
249ah_cleanup(struct secasvar *sav)

Callers

nothing calls this directly

Calls 3

memsetFunction · 0.85
ah_init0Function · 0.85
crypto_newsessionFunction · 0.85

Tested by

no test coverage detected