SMB2_SIG_SIZE
ctx->param.ccm.ulMACLen = SMB2_SIG_SIZE;
ctx->param.gcm.ulTagBits = SMB2_SIG_SIZE << 3; /* bytes to bits */
outlen = clearlen + SMB2_SIG_SIZE;
if (cipherlen <= SMB2_SIG_SIZE)
outlen = cipherlen - SMB2_SIG_SIZE;
CK_ULONG len = SMB2_SIG_SIZE;
ctx->param.ccm.ulMACLen = SMB2_SIG_SIZE;
ctx->param.gcm.ulTagBits = SMB2_SIG_SIZE << 3; /* bytes to bits */
CK_ULONG mac_len = SMB2_SIG_SIZE;
ctx->param.gcm.ulTagBits = SMB2_SIG_SIZE << 3; /* bytes to bits */
outlen = clearlen + SMB2_SIG_SIZE;
if (cipherlen <= SMB2_SIG_SIZE)
outlen = cipherlen - SMB2_SIG_SIZE;
ctx->param.ccm.ulMACSize = SMB2_SIG_SIZE;
out.cd_length = SMB2_SIG_SIZE;
out.cd_raw.iov_len = SMB2_SIG_SIZE;
mb_put_mem(mbp, NULL, SMB2_SIG_SIZE, MB_MZERO); // signature (later)
authdata, SMB2_SIG_SIZE,
thdr->b_wptr = thdr->b_rptr + SMB2_SIG_SIZE;
md_get_mem(mdp, NULL, SMB2_SIG_SIZE, MB_MZERO); // signature
md_get_mem(mdp, NULL, SMB2_SIG_SIZE, MB_MZERO); // nonce
tlen = bodylen + SMB2_SIG_SIZE;
authdata, SMB2_SIG_SIZE,
thdr->b_wptr = thdr->b_rptr + SMB2_SIG_SIZE;
smb2_sign_init_hmac_param(&mech, ¶m, SMB2_SIG_SIZE);
bzero(tmp_hdr + SMB2_SIG_OFFS, SMB2_SIG_SIZE);
uint8_t req_sig[SMB2_SIG_SIZE];
uint8_t vfy_sig[SMB2_SIG_SIZE];
if (smb_mbc_peek(mbc, sig_off, "#c", SMB2_SIG_SIZE, req_sig) != 0)
if (memcmp(vfy_sig, req_sig, SMB2_SIG_SIZE) == 0) {
uint8_t reply_sig[SMB2_SIG_SIZE];
SMB2_SIG_SIZE, reply_sig);
cipherlen = sr->th_msglen + SMB2_SIG_SIZE;
in_vdb->vdb_uio.uio_iov[cnt].iov_len = SMB2_SIG_SIZE;
in_vdb->vdb_uio.uio_resid += SMB2_SIG_SIZE;
out_vdb->vdb_uio.uio_iov[cnt].iov_len = SMB2_SIG_SIZE;
out_vdb->vdb_uio.uio_resid += SMB2_SIG_SIZE;
SMB2_SIG_SIZE, sr->smb2_sig);
ctx->param.ccm.ulMACSize = SMB2_SIG_SIZE;
ctx->param.gcm.ulTagBits = SMB2_SIG_SIZE << 3; /* bytes to bits */
return (smb2_mac(mech, key, key_len, &in_cd, digest16, SMB2_SIG_SIZE));