diff options
author | Edwin Mons <edwin.mons@isode.com> | 2018-11-19 10:59:53 (GMT) |
---|---|---|
committer | Edwin Mons <edwin.mons@isode.com> | 2018-11-19 10:59:53 (GMT) |
commit | 560b5642eeeee9135e8995c04f99613387a7bfa8 (patch) | |
tree | 6126e9a1b32ffdcf4931add32ef9d0fe6295728c /Swiften | |
parent | 279c48e1a0a99cf12a8d06b256a558888e994ccf (diff) | |
download | swift-560b5642eeeee9135e8995c04f99613387a7bfa8.zip swift-560b5642eeeee9135e8995c04f99613387a7bfa8.tar.bz2 |
Fix incorrect cast in OpenSSL provider
A numeric cast was added to the call to HMAC that doesn't belong there,
this commit reverts that.
Test-Information:
Unit tests pass on macOS 10.14 and Debian 9
Change-Id: I8deb568f7bff4d401fc6dd6de21edf7f061ebd59
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/Crypto/OpenSSLCryptoProvider.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/Crypto/OpenSSLCryptoProvider.cpp b/Swiften/Crypto/OpenSSLCryptoProvider.cpp index 73f46a6..5245bd8 100644 --- a/Swiften/Crypto/OpenSSLCryptoProvider.cpp +++ b/Swiften/Crypto/OpenSSLCryptoProvider.cpp @@ -108,7 +108,7 @@ namespace { unsigned int len = SHA_DIGEST_LENGTH; std::vector<unsigned char> result(len); try { - HMAC(EVP_sha1(), vecptr(key), boost::numeric_cast<int>(key.size()), vecptr(data), boost::numeric_cast<int>(data.size()), vecptr(result), &len); + HMAC(EVP_sha1(), vecptr(key), boost::numeric_cast<int>(key.size()), vecptr(data), data.size(), vecptr(result), &len); } catch (const boost::numeric::bad_numeric_cast&) { assert(false); |