| /freebsd-11-stable/sys/geom/eli/ |
| HD | g_eli_privacy.c | 68 g_eli_crypto_read_done(struct cryptop *crp) in g_eli_crypto_read_done() argument 73 if (crp->crp_etype == EAGAIN) { in g_eli_crypto_read_done() 74 if (g_eli_crypto_rerun(crp) == 0) in g_eli_crypto_read_done() 77 bp = (struct bio *)crp->crp_opaque; in g_eli_crypto_read_done() 79 if (crp->crp_etype == 0) { in g_eli_crypto_read_done() 82 bp->bio_completed += crp->crp_olen; in g_eli_crypto_read_done() 85 bp->bio_inbed, bp->bio_children, crp->crp_etype); in g_eli_crypto_read_done() 87 bp->bio_error = crp->crp_etype; in g_eli_crypto_read_done() 91 g_eli_key_drop(sc, crp->crp_desc->crd_key); in g_eli_crypto_read_done() 119 g_eli_crypto_write_done(struct cryptop *crp) in g_eli_crypto_write_done() argument [all …]
|
| HD | g_eli_crypto.c | 50 g_eli_crypto_done(struct cryptop *crp) in g_eli_crypto_done() argument 53 crp->crp_opaque = (void *)crp; in g_eli_crypto_done() 54 wakeup(crp); in g_eli_crypto_done() 63 struct cryptop *crp; in g_eli_crypto_cipher() local 79 p = malloc(sizeof(*crp) + sizeof(*crd), M_ELI, M_NOWAIT | M_ZERO); in g_eli_crypto_cipher() 84 crp = (struct cryptop *)p; p += sizeof(*crp); in g_eli_crypto_cipher() 98 crp->crp_sid = sid; in g_eli_crypto_cipher() 99 crp->crp_ilen = datasize; in g_eli_crypto_cipher() 100 crp->crp_olen = datasize; in g_eli_crypto_cipher() 101 crp->crp_opaque = NULL; in g_eli_crypto_cipher() [all …]
|
| HD | g_eli_integrity.c | 129 g_eli_auth_read_done(struct cryptop *crp) in g_eli_auth_read_done() argument 134 if (crp->crp_etype == EAGAIN) { in g_eli_auth_read_done() 135 if (g_eli_crypto_rerun(crp) == 0) in g_eli_auth_read_done() 138 bp = (struct bio *)crp->crp_opaque; in g_eli_auth_read_done() 140 if (crp->crp_etype == 0) { in g_eli_auth_read_done() 141 bp->bio_completed += crp->crp_olen; in g_eli_auth_read_done() 143 bp->bio_inbed, bp->bio_children, (intmax_t)crp->crp_olen, (intmax_t)bp->bio_completed); in g_eli_auth_read_done() 146 bp->bio_inbed, bp->bio_children, crp->crp_etype); in g_eli_auth_read_done() 148 bp->bio_error = crp->crp_etype; in g_eli_auth_read_done() 151 g_eli_key_drop(sc, crp->crp_desc->crd_next->crd_key); in g_eli_auth_read_done() [all …]
|
| /freebsd-11-stable/sys/kgssapi/krb5/ |
| HD | kcrypto_des3.c | 154 des3_crypto_cb(struct cryptop *crp) in des3_crypto_cb() argument 157 struct des3_state *ds = (struct des3_state *) crp->crp_opaque; in des3_crypto_cb() 162 error = crp->crp_etype; in des3_crypto_cb() 164 error = crypto_dispatch(crp); in des3_crypto_cb() 166 if (error || (crp->crp_flags & CRYPTO_F_DONE)) in des3_crypto_cb() 167 wakeup(crp); in des3_crypto_cb() 178 struct cryptop *crp; in des3_encrypt_1() local 182 crp = crypto_getreq(1); in des3_encrypt_1() 183 crd = crp->crp_desc; in des3_encrypt_1() 196 crp->crp_sid = ds->ds_session; in des3_encrypt_1() [all …]
|
| HD | kcrypto_aes.c | 118 aes_crypto_cb(struct cryptop *crp) in aes_crypto_cb() argument 121 struct aes_state *as = (struct aes_state *) crp->crp_opaque; in aes_crypto_cb() 123 if (CRYPTO_SESID2CAPS(crp->crp_sid) & CRYPTOCAP_F_SYNC) in aes_crypto_cb() 126 error = crp->crp_etype; in aes_crypto_cb() 128 error = crypto_dispatch(crp); in aes_crypto_cb() 130 if (error || (crp->crp_flags & CRYPTO_F_DONE)) in aes_crypto_cb() 131 wakeup(crp); in aes_crypto_cb() 142 struct cryptop *crp; in aes_encrypt_1() local 146 crp = crypto_getreq(1); in aes_encrypt_1() 147 crd = crp->crp_desc; in aes_encrypt_1() [all …]
|
| HD | kcrypto_des.c | 144 des1_crypto_cb(struct cryptop *crp) in des1_crypto_cb() argument 147 struct des1_state *ds = (struct des1_state *) crp->crp_opaque; in des1_crypto_cb() 152 error = crp->crp_etype; in des1_crypto_cb() 154 error = crypto_dispatch(crp); in des1_crypto_cb() 156 if (error || (crp->crp_flags & CRYPTO_F_DONE)) in des1_crypto_cb() 157 wakeup(crp); in des1_crypto_cb() 168 struct cryptop *crp; in des1_encrypt_1() local 172 crp = crypto_getreq(1); in des1_encrypt_1() 173 crd = crp->crp_desc; in des1_encrypt_1() 186 crp->crp_sid = ds->ds_session; in des1_encrypt_1() [all …]
|
| /freebsd-11-stable/sys/netipsec/ |
| HD | xform_ipcomp.c | 89 static int ipcomp_input_cb(struct cryptop *crp); 90 static int ipcomp_output_cb(struct cryptop *crp); 195 struct cryptop *crp; in ipcomp_input() local 222 crp = crypto_getreq(1); in ipcomp_input() 223 if (crp == NULL) { in ipcomp_input() 233 crypto_freereq(crp); in ipcomp_input() 236 crdc = crp->crp_desc; in ipcomp_input() 247 crp->crp_ilen = m->m_pkthdr.len - (skip + hlen); in ipcomp_input() 248 crp->crp_flags = CRYPTO_F_IMBUF | CRYPTO_F_CBIFSYNC; in ipcomp_input() 249 crp->crp_buf = (caddr_t) m; in ipcomp_input() [all …]
|
| HD | xform_esp.c | 101 static int esp_output_cb(struct cryptop *crp); 298 struct cryptop *crp; in esp_input() local 368 crp = crypto_getreq(esph && espx ? 2 : 1); in esp_input() 369 if (crp == NULL) { in esp_input() 382 crypto_freereq(crp); in esp_input() 388 struct cryptodesc *crda = crp->crp_desc; in esp_input() 409 crde = crp->crp_desc; in esp_input() 413 crp->crp_ilen = m->m_pkthdr.len; /* Total input length */ in esp_input() 414 crp->crp_flags = CRYPTO_F_IMBUF | CRYPTO_F_CBIFSYNC; in esp_input() 415 crp->crp_buf = (caddr_t) m; in esp_input() [all …]
|
| HD | xform_ah.c | 556 struct cryptop *crp; in ah_input() local 620 crp = crypto_getreq(1); in ah_input() 621 if (crp == NULL) { in ah_input() 629 crda = crp->crp_desc; in ah_input() 647 crypto_freereq(crp); in ah_input() 671 crypto_freereq(crp); in ah_input() 677 crp->crp_ilen = m->m_pkthdr.len; /* Total input length. */ in ah_input() 678 crp->crp_flags = CRYPTO_F_IMBUF | CRYPTO_F_CBIFSYNC; in ah_input() 679 crp->crp_buf = (caddr_t) m; in ah_input() 680 crp->crp_callback = ah_input_cb; in ah_input() [all …]
|
| /freebsd-11-stable/sys/opencrypto/ |
| HD | crypto.c | 179 static int crypto_invoke(struct cryptocap *cap, struct cryptop *crp, int hint); 819 crypto_dispatch(struct cryptop *crp) in crypto_dispatch() argument 829 binuptime(&crp->crp_tstamp); in crypto_dispatch() 832 hid = CRYPTO_SESID2HID(crp->crp_sid); in crypto_dispatch() 834 if ((crp->crp_flags & CRYPTO_F_BATCH) == 0) { in crypto_dispatch() 844 result = crypto_invoke(cap, crp, 0); in crypto_dispatch() 854 TAILQ_INSERT_TAIL(&crp_q, crp, crp_next); in crypto_dispatch() 1043 crypto_invoke(struct cryptocap *cap, struct cryptop *crp, int hint) in crypto_invoke() argument 1046 KASSERT(crp != NULL, ("%s: crp == NULL", __func__)); in crypto_invoke() 1047 KASSERT(crp->crp_callback != NULL, in crypto_invoke() [all …]
|
| HD | cryptosoft.c | 75 static int swcr_authenc(struct cryptop *crp); 459 swcr_authenc(struct cryptop *crp) in swcr_authenc() argument 471 caddr_t buf = (caddr_t)crp->crp_buf; in swcr_authenc() 477 for (crd = crp->crp_desc; crd; crd = crd->crd_next) { in swcr_authenc() 478 for (sw = swcr_sessions[crp->crp_sid & 0xffffffff]; in swcr_authenc() 528 crypto_copyback(crp->crp_flags, buf, crde->crd_inject, in swcr_authenc() 537 crypto_copydata(crp->crp_flags, buf, crde->crd_inject, in swcr_authenc() 551 crypto_copydata(crp->crp_flags, buf, crda->crd_skip + i, len, in swcr_authenc() 566 crypto_copydata(crp->crp_flags, buf, crde->crd_skip + i, len, in swcr_authenc() 571 crypto_copyback(crp->crp_flags, buf, in swcr_authenc() [all …]
|
| HD | cryptodev.c | 798 struct cryptop *crp = NULL; in cryptodev_op() local 819 crp = crypto_getreq((cse->txform != NULL) + (cse->thash != NULL)); in cryptodev_op() 820 if (crp == NULL) { in cryptodev_op() 828 crde = crp->crp_desc; in cryptodev_op() 831 crda = crp->crp_desc; in cryptodev_op() 835 crda = crp->crp_desc; in cryptodev_op() 837 crde = crp->crp_desc; in cryptodev_op() 873 crp->crp_ilen = cop->len; in cryptodev_op() 874 crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIMM in cryptodev_op() 876 crp->crp_uio = &cod->uio; in cryptodev_op() [all …]
|
| /freebsd-11-stable/sys/crypto/via/ |
| HD | padlock_cipher.c | 169 padlock_cipher_alloc(struct cryptodesc *enccrd, struct cryptop *crp, in padlock_cipher_alloc() argument 174 if (crp->crp_flags & CRYPTO_F_IMBUF) in padlock_cipher_alloc() 177 if (crp->crp_flags & CRYPTO_F_IOV) { in padlock_cipher_alloc() 181 uio = (struct uio *)crp->crp_buf; in padlock_cipher_alloc() 187 addr = (u_char *)crp->crp_buf; in padlock_cipher_alloc() 202 struct cryptop *crp) in padlock_cipher_process() argument 210 buf = padlock_cipher_alloc(enccrd, crp, &allocated); in padlock_cipher_process() 233 crypto_copyback(crp->crp_flags, crp->crp_buf, in padlock_cipher_process() 242 crypto_copydata(crp->crp_flags, crp->crp_buf, in padlock_cipher_process() 248 crypto_copydata(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, in padlock_cipher_process() [all …]
|
| HD | padlock.c | 70 static int padlock_process(device_t, struct cryptop *crp, int hint __unused); 309 padlock_process(device_t dev, struct cryptop *crp, int hint __unused) in padlock_process() argument 319 if (crp == NULL) in padlock_process() 322 if (crp->crp_callback == NULL || crp->crp_desc == NULL) { in padlock_process() 327 for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { in padlock_process() 361 if (ses->ses_id == (crp->crp_sid & 0xffffffff)) in padlock_process() 372 error = padlock_hash_process(ses, maccrd, crp); in padlock_process() 377 error = padlock_cipher_process(ses, enccrd, crp); in padlock_process() 383 error = padlock_hash_process(ses, maccrd, crp); in padlock_process() 400 crp->crp_etype = error; in padlock_process() [all …]
|
| /freebsd-11-stable/sys/crypto/aesni/ |
| HD | aesni.c | 84 struct cryptodesc *enccrd, struct cryptodesc *authcrd, struct cryptop *crp); 331 aesni_process(device_t dev, struct cryptop *crp, int hint __unused) in aesni_process() argument 344 if (crp == NULL) in aesni_process() 347 if (crp->crp_callback == NULL || crp->crp_desc == NULL) { in aesni_process() 352 for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { in aesni_process() 404 if (ses->id == (crp->crp_sid & 0xffffffff)) in aesni_process() 413 error = aesni_cipher_process(ses, enccrd, authcrd, crp); in aesni_process() 418 crp->crp_etype = error; in aesni_process() 419 crypto_done(crp); in aesni_process() 424 aesni_cipher_alloc(struct cryptodesc *enccrd, struct cryptop *crp, in aesni_cipher_alloc() argument [all …]
|
| /freebsd-11-stable/sys/dev/cxgbe/crypto/ |
| HD | t4_crypto.c | 242 ccr_populate_sglist(struct sglist *sg, struct cryptop *crp) in ccr_populate_sglist() argument 247 if (crp->crp_flags & CRYPTO_F_IMBUF) in ccr_populate_sglist() 248 error = sglist_append_mbuf(sg, (struct mbuf *)crp->crp_buf); in ccr_populate_sglist() 249 else if (crp->crp_flags & CRYPTO_F_IOV) in ccr_populate_sglist() 250 error = sglist_append_uio(sg, (struct uio *)crp->crp_buf); in ccr_populate_sglist() 252 error = sglist_append(sg, crp->crp_buf, crp->crp_ilen); in ccr_populate_sglist() 383 struct cryptop *crp) in ccr_populate_wreq() argument 409 crwr->wreq.cookie = htobe64((uintptr_t)crp); in ccr_populate_wreq() 426 struct cryptop *crp) in ccr_hmac() argument 437 crd = crp->crp_desc; in ccr_hmac() [all …]
|
| /freebsd-11-stable/sys/mips/nlm/dev/sec/ |
| HD | nlmsec.c | 72 void xlp_sec_print_data(struct cryptop *crp); 201 xlp_sec_print_data(struct cryptop *crp) in xlp_sec_print_data() argument 207 crp->crp_sid, crp->crp_ilen, crp->crp_olen); in xlp_sec_print_data() 209 printf("crp_flags = 0x%x\n", crp->crp_flags); in xlp_sec_print_data() 212 for (i = 0; i < crp->crp_ilen; i++) { in xlp_sec_print_data() 213 printf("%c ", crp->crp_buf[i]); in xlp_sec_print_data() 220 crp_desc = crp->crp_desc; in xlp_sec_print_data() 244 printf("crp :0x%x\n",(uint32_t)cmd->crp); in print_cmd() 305 KASSERT(cmd != NULL && cmd->crp != NULL, in nlm_xlpsec_msgring_handler() 324 crypto_copydata(cmd->crp->crp_flags, cmd->crp->crp_buf, in nlm_xlpsec_msgring_handler() [all …]
|
| HD | nlmseclib.c | 97 struct cryptop *crp = NULL; in nlm_crypto_form_srcdst_segs() local 99 crp = cmd->crp; in nlm_crypto_form_srcdst_segs() 112 if (crp->crp_flags & CRYPTO_F_IMBUF) { in nlm_crypto_form_srcdst_segs() 115 m = (struct mbuf *)crp->crp_buf; in nlm_crypto_form_srcdst_segs() 125 } else if (crp->crp_flags & CRYPTO_F_IOV) { in nlm_crypto_form_srcdst_segs() 130 uio = (struct uio *)crp->crp_buf; in nlm_crypto_form_srcdst_segs() 147 ((caddr_t)crp->crp_buf), crp->crp_ilen); in nlm_crypto_form_srcdst_segs() 150 ((caddr_t)crp->crp_buf), crp->crp_ilen); in nlm_crypto_form_srcdst_segs()
|
| /freebsd-11-stable/sys/mips/cavium/cryptocteon/ |
| HD | cryptocteon.c | 339 cryptocteon_process(device_t dev, struct cryptop *crp, int hint) in cryptocteon_process() argument 355 if (sc == NULL || crp == NULL) in cryptocteon_process() 358 crp->crp_etype = 0; in cryptocteon_process() 360 if (crp->crp_desc == NULL || crp->crp_buf == NULL) { in cryptocteon_process() 362 crp->crp_etype = EINVAL; in cryptocteon_process() 366 lid = crp->crp_sid & 0xffffffff; in cryptocteon_process() 369 crp->crp_etype = ENOENT; in cryptocteon_process() 379 if (crp->crp_flags & CRYPTO_F_IMBUF) { in cryptocteon_process() 382 m = (struct mbuf *) crp->crp_buf; in cryptocteon_process() 391 m = (struct mbuf *) crp->crp_buf; in cryptocteon_process() [all …]
|
| /freebsd-11-stable/sys/mips/rmi/dev/sec/ |
| HD | rmisec.c | 62 void xlr_sec_print_data(struct cryptop *crp); 66 static int xlr_sec_process(device_t dev, struct cryptop *crp, int hint); 305 xlr_sec_print_data(struct cryptop *crp) in xlr_sec_print_data() argument 311 crp->crp_sid, crp->crp_ilen, crp->crp_olen); in xlr_sec_print_data() 313 printf("crp_flags = 0x%x\n", crp->crp_flags); in xlr_sec_print_data() 317 for (i = 0; i < crp->crp_ilen; i++) { in xlr_sec_print_data() 318 printf("%c ", crp->crp_buf[i]); in xlr_sec_print_data() 325 crp_desc = crp->crp_desc; in xlr_sec_print_data() 347 xlr_sec_process(device_t dev, struct cryptop *crp, int hint) in xlr_sec_process() argument 355 if (crp == NULL || crp->crp_callback == NULL) { in xlr_sec_process() [all …]
|
| /freebsd-11-stable/sys/dev/glxsb/ |
| HD | glxsb.c | 717 glxsb_crypto_encdec(struct cryptop *crp, struct cryptodesc *crd, in glxsb_crypto_encdec() argument 753 crypto_copyback(crp->crp_flags, crp->crp_buf, in glxsb_crypto_encdec() 761 crypto_copydata(crp->crp_flags, crp->crp_buf, in glxsb_crypto_encdec() 773 crypto_copydata(crp->crp_flags, crp->crp_buf, in glxsb_crypto_encdec() 785 crypto_copyback(crp->crp_flags, crp->crp_buf, in glxsb_crypto_encdec() 825 struct cryptop *crp; in glxsb_crypto_task() local 831 crp = sc->sc_to.to_crp; in glxsb_crypto_task() 836 error = glxsb_hash_process(ses, maccrd, crp); in glxsb_crypto_task() 841 error = glxsb_crypto_encdec(crp, enccrd, ses, sc); in glxsb_crypto_task() 847 error = glxsb_hash_process(ses, maccrd, crp); in glxsb_crypto_task() [all …]
|
| /freebsd-11-stable/sys/dev/sec/ |
| HD | sec.c | 90 static int sec_process(device_t dev, struct cryptop *crp, int hint); 93 static int sec_split_crp(struct cryptop *crp, struct cryptodesc **enc, 96 struct sec_desc *desc, struct sec_session *ses, struct cryptop *crp, 99 struct sec_desc *desc, struct sec_session *ses, struct cryptop *crp, 109 struct sec_session *ses, struct sec_desc *desc, struct cryptop *crp, 116 struct sec_session *ses, struct sec_desc *desc, struct cryptop *crp, 126 struct sec_session *ses, struct sec_desc *desc, struct cryptop *crp, 1208 sec_split_crp(struct cryptop *crp, struct cryptodesc **enc, in sec_split_crp() argument 1213 e = crp->crp_desc; in sec_split_crp() 1363 sec_process(device_t dev, struct cryptop *crp, int hint) in sec_process() argument [all …]
|
| /freebsd-11-stable/lib/libc/rpc/ |
| HD | pmap_rmt.c | 152 xdr_rmtcallres(XDR *xdrs, struct rmtcallres *crp) in xdr_rmtcallres() argument 157 assert(crp != NULL); in xdr_rmtcallres() 159 port_ptr = (caddr_t)(void *)crp->port_ptr; in xdr_rmtcallres() 161 (xdrproc_t)xdr_u_long) && xdr_u_long(xdrs, &crp->resultslen)) { in xdr_rmtcallres() 162 crp->port_ptr = (u_long *)(void *)port_ptr; in xdr_rmtcallres() 163 return ((*(crp->xdr_results))(xdrs, crp->results_ptr)); in xdr_rmtcallres()
|
| /freebsd-11-stable/sys/dev/hifn/ |
| HD | hifn7751.c | 1801 struct cryptop *crp, in hifn_crypto() argument 1834 if (crp->crp_flags & CRYPTO_F_IMBUF) { in hifn_crypto() 1841 } else if (crp->crp_flags & CRYPTO_F_IOV) { in hifn_crypto() 1857 if (crp->crp_flags & CRYPTO_F_IOV) { in hifn_crypto() 1860 } else if (crp->crp_flags & CRYPTO_F_IMBUF) { in hifn_crypto() 1943 if (crp->crp_flags & CRYPTO_F_IMBUF) { in hifn_crypto() 1950 } else if (crp->crp_flags & CRYPTO_F_IOV) { in hifn_crypto() 2113 if (crp->crp_flags & CRYPTO_F_IMBUF) { in hifn_crypto() 2442 hifn_process(device_t dev, struct cryptop *crp, int hint) in hifn_process() argument 2449 if (crp == NULL || crp->crp_callback == NULL) { in hifn_process() [all …]
|
| /freebsd-11-stable/sys/dev/safe/ |
| HD | safe.c | 848 safe_process(device_t dev, struct cryptop *crp, int hint) in safe_process() argument 862 if (crp == NULL || crp->crp_callback == NULL || sc == NULL) { in safe_process() 866 if (SAFE_SESSION(crp->crp_sid) >= sc->sc_nsessions) { in safe_process() 885 re->re_crp = crp; in safe_process() 886 re->re_sesn = SAFE_SESSION(crp->crp_sid); in safe_process() 888 if (crp->crp_flags & CRYPTO_F_IMBUF) { in safe_process() 889 re->re_src_m = (struct mbuf *)crp->crp_buf; in safe_process() 890 re->re_dst_m = (struct mbuf *)crp->crp_buf; in safe_process() 891 } else if (crp->crp_flags & CRYPTO_F_IOV) { in safe_process() 892 re->re_src_io = (struct uio *)crp->crp_buf; in safe_process() [all …]
|