Commit 636dd0c1 authored by Vitaly Chikunov's avatar Vitaly Chikunov
Browse files

Fix EVP_MD_CTX_copy_ex for OMAC



Openssl copies a state between valid contexts. But, EVP_MD_CTX_copy_ex
just memcpy-s private data (md_data), which points to OMAC_CTX), which
have pointer to CMAC_CTX. Copying pointer makes CMAC context just the
same on the both sides. As a consequence, we can not do normal copy of a
state between CMAC contexts. As a fix, we just clone it if it's equal
between copy sides.

Reported-by: default avatarGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
parent ae390d45
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment