diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2020-05-25 22:12:04 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2020-05-25 22:12:04 +0000 |
| commit | 9c0e3d3a534c3e3e7f6bfce0a150ed2a0841685a (patch) | |
| tree | 30ce1a860bcb9456d7c684bc82df9b370545b172 /sys/kgssapi | |
| parent | 852c303b61d12d13b56ed7affe31df193aadf9ae (diff) | |
Notes
Diffstat (limited to 'sys/kgssapi')
| -rw-r--r-- | sys/kgssapi/krb5/kcrypto_aes.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/kgssapi/krb5/kcrypto_aes.c b/sys/kgssapi/krb5/kcrypto_aes.c index 451f6d77a72f..04b68357be73 100644 --- a/sys/kgssapi/krb5/kcrypto_aes.c +++ b/sys/kgssapi/krb5/kcrypto_aes.c @@ -156,9 +156,10 @@ aes_encrypt_1(const struct krb5_key_state *ks, int buftype, void *buf, memset(crp->crp_iv, 0, 16); } - crp->crp_buf_type = buftype; - crp->crp_buf = buf; - crp->crp_ilen = skip + len; + if (buftype == CRYPTO_BUF_MBUF) + crypto_use_mbuf(crp, buf); + else + crypto_use_buf(crp, buf, skip + len); crp->crp_opaque = as; crp->crp_callback = aes_crypto_cb; @@ -328,9 +329,7 @@ aes_checksum(const struct krb5_key_state *ks, int usage, crp->crp_payload_length = inlen; crp->crp_digest_start = skip + inlen; crp->crp_flags = CRYPTO_F_CBIFSYNC; - crp->crp_buf_type = CRYPTO_BUF_MBUF; - crp->crp_mbuf = inout; - crp->crp_ilen = skip + inlen + 12; + crypto_use_mbuf(crp, inout); crp->crp_opaque = as; crp->crp_callback = aes_crypto_cb; |
