hcrypto PKCS#11 backend: allow digest update with NULL (#378)
In the PKCS#11 backend, add an assertion check to p11_md_update() to validate that the data length is zero if the data is NULL.
This commit is contained in:
@@ -387,6 +387,7 @@ p11_md_update(EVP_MD_CTX *ctx, const void *data, size_t length)
|
||||
CK_RV rv;
|
||||
|
||||
assert(p11_module != NULL);
|
||||
assert(data != NULL || length == 0);
|
||||
|
||||
rv = p11_module->C_DigestUpdate(p11ctx->hSession,
|
||||
data ? (CK_BYTE_PTR)data : (CK_BYTE_PTR)"",
|
||||
|
Reference in New Issue
Block a user