aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/after_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-02-12 15:05:52 +0100
committerSverker Eriksson <[email protected]>2014-02-12 15:05:52 +0100
commit651b949d85f847318ece301b64c099ad7959e9d0 (patch)
treeee454d37c1ddddfa72247f7530a37da52a14c0d3 /erts/emulator/test/after_SUITE.erl
parent4082c3d1ad3d0e8bb85706c5f3b2bde97bb43fcb (diff)
downloadotp-651b949d85f847318ece301b64c099ad7959e9d0.tar.gz
otp-651b949d85f847318ece301b64c099ad7959e9d0.tar.bz2
otp-651b949d85f847318ece301b64c099ad7959e9d0.zip
crypto: Fix bug when using old hmac context
Symptom: Using an old context (that had already been passed as argument to either hmac_upgrade or hmac_final) could cause VM crash or worse. Reason: Only a shallow copy (memcpy) of the context was made causing a new context to partly mutate its parent context into an inconsistent state. Problem: Only OpenSSL v1.0 supports deep copy of hmac context. It is thus not possible to implement a functional interface for older OpenSSL versions (0.9.8) which still have wide spread use. Solution: Change hmac contexts into a mutable state using NIF resources. Document reuse of old contexts as undefined. Future: If a need for reusing old context variables arise, a new hmac_copy function could be introduced that is only supported for OpenSSL v1.0.
Diffstat (limited to 'erts/emulator/test/after_SUITE.erl')
0 files changed, 0 insertions, 0 deletions