diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2021-02-18 17:24:35 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2021-02-18 17:53:25 +0000 |
| commit | a10020cfe2830e9626ac58ae97ecd12afb3553be (patch) | |
| tree | 8e3d8730903ef7563806bf61da2441998b8b8c7e /sys/opencrypto/cryptosoft.c | |
| parent | 4dd6800e22b08fa1f756115600e9436818abb168 (diff) | |
Diffstat (limited to 'sys/opencrypto/cryptosoft.c')
| -rw-r--r-- | sys/opencrypto/cryptosoft.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c index b92e25e86f76..947f27a388d1 100644 --- a/sys/opencrypto/cryptosoft.c +++ b/sys/opencrypto/cryptosoft.c @@ -537,6 +537,9 @@ swcr_gcm(struct swcr_session *ses, struct cryptop *crp) } } + if (crp->crp_cipher_key != NULL) + exf->setkey(swe->sw_kschedule, crp->crp_cipher_key, + crypto_get_params(crp->crp_session)->csp_cipher_klen); exf->reinit(swe->sw_kschedule, iv); /* Do encryption with MAC */ @@ -755,6 +758,9 @@ swcr_ccm(struct swcr_session *ses, struct cryptop *crp) if (error) return (error); + if (crp->crp_cipher_key != NULL) + exf->setkey(swe->sw_kschedule, crp->crp_cipher_key, + crypto_get_params(crp->crp_session)->csp_cipher_klen); exf->reinit(swe->sw_kschedule, iv); /* Do encryption/decryption with MAC */ |
