Lines Matching defs:ses

52 glxsb_hash_key_setup(struct glxsb_session *ses, caddr_t key, int klen)
58 axf = ses->ses_axf;
63 axf->Init(ses->ses_ictx);
64 axf->Update(ses->ses_ictx, key, klen);
65 axf->Update(ses->ses_ictx, hmac_ipad_buffer, axf->blocksize - klen);
70 axf->Init(ses->ses_octx);
71 axf->Update(ses->ses_octx, key, klen);
72 axf->Update(ses->ses_octx, hmac_opad_buffer, axf->blocksize - klen);
82 glxsb_authcompute(struct glxsb_session *ses, struct cryptodesc *crd,
90 axf = ses->ses_axf;
91 bcopy(ses->ses_ictx, &ctx, axf->ctxsize);
98 bcopy(ses->ses_octx, &ctx, axf->ctxsize);
104 ses->ses_mlen == 0 ? axf->hashsize : ses->ses_mlen, hash);
109 glxsb_hash_setup(struct glxsb_session *ses, struct cryptoini *macini)
112 ses->ses_mlen = macini->cri_mlen;
117 ses->ses_axf = &auth_hash_null;
120 ses->ses_axf = &auth_hash_hmac_md5;
123 ses->ses_axf = &auth_hash_hmac_sha1;
126 ses->ses_axf = &auth_hash_hmac_ripemd_160;
129 ses->ses_axf = &auth_hash_hmac_sha2_256;
132 ses->ses_axf = &auth_hash_hmac_sha2_384;
135 ses->ses_axf = &auth_hash_hmac_sha2_512;
140 ses->ses_ictx = malloc(ses->ses_axf->ctxsize, M_GLXSB,
142 ses->ses_octx = malloc(ses->ses_axf->ctxsize, M_GLXSB,
144 if (ses->ses_ictx == NULL || ses->ses_octx == NULL)
149 glxsb_hash_key_setup(ses, macini->cri_key,
156 glxsb_hash_process(struct glxsb_session *ses, struct cryptodesc *maccrd,
162 glxsb_hash_key_setup(ses, maccrd->crd_key, maccrd->crd_klen);
164 error = glxsb_authcompute(ses, maccrd, crp->crp_buf, crp->crp_flags);
169 glxsb_hash_free(struct glxsb_session *ses)
172 if (ses->ses_ictx != NULL) {
173 bzero(ses->ses_ictx, ses->ses_axf->ctxsize);
174 free(ses->ses_ictx, M_GLXSB);
175 ses->ses_ictx = NULL;
177 if (ses->ses_octx != NULL) {
178 bzero(ses->ses_octx, ses->ses_axf->ctxsize);
179 free(ses->ses_octx, M_GLXSB);
180 ses->ses_octx = NULL;