Changeset View
Changeset View
Standalone View
Standalone View
sys/opencrypto/cryptosoft.c
Show First 20 Lines • Show All 1,267 Lines • ▼ Show 20 Lines | swcr_probesession(device_t dev, const struct crypto_session_params *csp) | ||||
case CSP_MODE_DIGEST: | case CSP_MODE_DIGEST: | ||||
if (!swcr_auth_supported(csp)) | if (!swcr_auth_supported(csp)) | ||||
return (EINVAL); | return (EINVAL); | ||||
break; | break; | ||||
case CSP_MODE_AEAD: | case CSP_MODE_AEAD: | ||||
switch (csp->csp_cipher_alg) { | switch (csp->csp_cipher_alg) { | ||||
case CRYPTO_AES_NIST_GCM_16: | case CRYPTO_AES_NIST_GCM_16: | ||||
case CRYPTO_AES_CCM_16: | case CRYPTO_AES_CCM_16: | ||||
if (csp->csp_cipher_key == NULL) | |||||
return (EINVAL); | |||||
cem: Maybe add a comment about this being an implementation limitation? | |||||
break; | break; | ||||
default: | default: | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
break; | break; | ||||
case CSP_MODE_ETA: | case CSP_MODE_ETA: | ||||
/* AEAD algorithms cannot be used for EtA. */ | /* AEAD algorithms cannot be used for EtA. */ | ||||
switch (csp->csp_cipher_alg) { | switch (csp->csp_cipher_alg) { | ||||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |
Maybe add a comment about this being an implementation limitation?