Skip to content

Commit

Permalink
Ref #5 remove HMAC_CTX_cleanup from openssl 1.1.0 usage
Browse files Browse the repository at this point in the history
Change-Id: I832770a31f5ba998b3912af2ab712ec9d5bca391
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Mar 23, 2018
1 parent 57ee5f5 commit cc567cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/hmac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ std::string hmac::sign(const std::string &data)
uint32_t size;

HMAC_Final(hmac, res.get(), &size);
HMAC_CTX_cleanup(hmac);

#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#if OPENSSL_VERSION_NUMBER < 0x10100000L
HMAC_CTX_cleanup(hmac);
#else
HMAC_CTX_free(hmac);
#endif

Expand Down

1 comment on commit cc567cc

@OlafvdSpek
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

olaf@debian:~/josepp/build$ make
Scanning dependencies of target josepp-static
[  9%] Building CXX object CMakeFiles/josepp-static.dir/src/hmac.cpp.o
[ 18%] Building CXX object CMakeFiles/josepp-static.dir/src/rsa.cpp.o
[ 27%] Building CXX object CMakeFiles/josepp-static.dir/src/jws.cpp.o
[ 36%] Building CXX object CMakeFiles/josepp-static.dir/src/b64.cpp.o
[ 45%] Building CXX object CMakeFiles/josepp-static.dir/src/header.cpp.o
[ 54%] Building CXX object CMakeFiles/josepp-static.dir/src/ecdsa.cpp.o
[ 63%] Building CXX object CMakeFiles/josepp-static.dir/src/digest.cpp.o
[ 72%] Linking CXX static library libjosepp.a
[100%] Built target josepp-static

Thx!

Please sign in to comment.