Home | History | Annotate | Download | only in engine

Lines Matching full:state

359 	struct dev_crypto_state *state = ctx->cipher_data;
360 struct session_op *sess = &state->d_sess;
364 if (state->d_fd < 0)
391 if (ioctl(state->d_fd, CIOCCRYPT, &cryp) == -1) {
412 struct dev_crypto_state *state = ctx->cipher_data;
413 struct session_op *sess = &state->d_sess;
425 state->d_fd = -1;
431 if ((state->d_fd = get_dev_crypto()) < 0)
438 if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) {
439 close(state->d_fd);
440 state->d_fd = -1;
454 struct dev_crypto_state *state = ctx->cipher_data;
455 struct session_op *sess = &state->d_sess;
457 if (state->d_fd < 0)
471 if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) == -1) {
476 close(state->d_fd);
477 state->d_fd = -1;
668 struct dev_crypto_state *state = ctx->md_data;
669 struct session_op *sess = &state->d_sess;
677 memset(state, 0, sizeof(struct dev_crypto_state));
679 if ((state->d_fd = get_dev_crypto()) < 0) {
684 sess->mackey = state->dummy_mac_key;
688 if (ioctl(state->d_fd, CIOCGSESSION, sess) < 0) {
689 close(state->d_fd);
690 state->d_fd = -1;
702 struct dev_crypto_state *state = ctx->md_data;
703 struct session_op *sess = &state->d_sess;
705 if (!data || state->d_fd < 0) {
716 state->mac_data = OPENSSL_realloc(state->mac_data, state->mac_len + count);
718 if (!state->mac_data) {
723 memcpy(state->mac_data + state->mac_len, data, count);
724 state->mac_len += count;
736 cryp.mac = (caddr_t) state->digest_res;
737 if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) {
748 struct dev_crypto_state *state = ctx->md_data;
749 struct session_op *sess = &state->d_sess;
753 if (!md || state->d_fd < 0) {
764 cryp.len = state->mac_len;
765 cryp.src = state->mac_data;
769 if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) {
777 memcpy(md, state->digest_res, ctx->digest->md_size);
786 struct dev_crypto_state *state = ctx->md_data;
787 struct session_op *sess = &state->d_sess;
789 if (state->d_fd < 0) {
794 if (state->mac_data) {
795 OPENSSL_free(state->mac_data);
796 state->mac_data = NULL;
797 state->mac_len = 0;
800 if (state->copy)
803 if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) < 0) {
809 close(state->d_fd);
810 state->d_fd = -1;