FreeBSD/sys/mips/nlm/dev/sec/nlmrsa.c
/*
 * Deallocate a session.
 * XXX this routine should run a zero'd mac/encrypt key into context ram.
 * XXX to blow away any keys already stored there.
 */
Deallocate a session.
XXX this routine should run a zero'd mac/encrypt key into context ram.
XXX to blow away any keys already stored there.
Deallocate a session . XXX this routine should run a zero ' d mac / encrypt key into context ram . XXX to blow away any keys already stored there .
static int
xlp_rsa_freesession(device_t dev, u_int64_t tid)
{
	struct xlp_rsa_softc *sc = device_get_softc(dev);
	int session;
	u_int32_t sid = CRYPTO_SESID2LID(tid);
	if (sc == NULL)
		return (EINVAL);
	session = XLP_RSA_SESSION(sid);
	if (session >= sc->sc_nsessions)
		return (EINVAL);
	sc->sc_sessions[session].hs_used = 0;
	return (0);
}
static int xlp_rsa_freesession ( device_t dev , u_int64_t tid ) { struct xlp_rsa_softc * sc = device_get_softc ( dev ) ; int session ; u_int32_t sid = CRYPTO_SESID2LID ( tid ) ; if ( sc == NULL ) return ( EINVAL ) ; session = XLP_RSA_SESSION ( sid ) ; if ( session >= sc -> sc_nsessions ) return ( EINVAL ) ; sc -> sc_sessions [ session ] . hs_used = 0 ; return ( 0 ) ; }
Deallocate a session.
Deallocate a session .