1

I was compiling some code I found on the internet and I was given the error

calcCookie.c:1050: warning: ‘HMAC’ is deprecated (declared at /usr/include/openssl/hmac.h:103) calcCookie.c:1050: warning: ‘EVP_sha1’ is deprecated (declared at /usr/include/openssl/evp.h:666)

when I googled the libraries I couldn't find anything about the symbols being deprecated, I just found a reference to the symbols I used.

http://www.openssl.org/docs/crypto/hmac.html etc.

Do you have any tricks/websites that you can use to find the replacement for deprecated symbols?

cmwarre
  • 11
  • 2
  • 3
    They are warnings not errors. – codaddict Nov 05 '11 at 18:35
  • 1
    That should be part of the documentation. And if you look at the documentation at the link you provided, it does so for a couple of functions. Perhaps the documentation is not up-to-date with respect to the version you're using? – Bart Nov 05 '11 at 18:48

2 Answers2

1

First of all, try to find up-to-date documentation for the library.

If that does not work, the warning message from the compiler tells you the file name and line number where the symbol was declared. Look there and hopefully you fill find a comment that explains why it is deprecated and what the alternative is.

If that does not work, then you can look at the version history of the library. Find the first revision where the symbol was marked as deprecated. Look at the commit message and the other changes that were happening around the same time to get a clue about what is going on.

David Grayson
  • 84,103
  • 24
  • 152
  • 189
0

Are/Were you by chance compiling on OSX?

Apple has decided to deprecate OpenSSL and replace it with CommonCrypto.

Why is Apple Deprecating OpenSSL in MacOS 10.7 (Lion)?

Community
  • 1
  • 1
Bill Brasky
  • 2,614
  • 2
  • 19
  • 20