Lines Matching full:dstate
825 struct dev_crypto_state *dstate = to->md_data;
829 if (dstate == NULL || fstate == NULL)
832 memcpy(dstate, fstate, sizeof(struct dev_crypto_state));
834 sess = &dstate->d_sess;
838 sess->mackey = dstate->dummy_mac_key;
842 dstate->d_fd = get_dev_crypto();
844 if (ioctl(dstate->d_fd, CIOCGSESSION, sess) < 0) {
845 put_dev_crypto(dstate->d_fd);
846 dstate->d_fd = -1;
854 dstate->mac_data = OPENSSL_malloc(fstate->mac_len);
855 memcpy(dstate->mac_data, fstate->mac_data, fstate->mac_len);
856 dstate->mac_len = fstate->mac_len;