Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix crypto deprecation warnings #665

Closed
arjan opened this Issue Sep 22, 2013 · 4 comments

Comments

Projects
None yet
2 participants
Owner

arjan commented Sep 22, 2013

This is a grep of all crypto warnings for a clean compile:
(also includes subprojects)

src/smtp_util.erl:65: Warning: crypto:md5_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/mochiweb_session.erl:105: Warning: crypto:aes_cfb_128_encrypt/3 is deprecated and will be removed in in a future release; use crypto:block_encrypt/4
src/mochiweb_session.erl:110: Warning: crypto:aes_cfb_128_decrypt/3 is deprecated and will be removed in in a future release; use crypto:block_decrypt/4
src/mochiweb_session.erl:114: Warning: crypto:md5_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/mochiweb_session.erl:118: Warning: crypto:sha_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/oauth_rsa_sha1.erl:9: Warning: public_key:pem_to_der/1: deprecated (will be removed in R15A); use file:read_file/1 and public_key:pem_decode/1
src/oauth_rsa_sha1.erl:10: Warning: public_key:decode_private_key/1 is deprecated and will be removed in R15A; use public_key:pem_entry_decode/1
src/oauth_rsa_sha1.erl:22: Warning: public_key:pem_to_der/1: deprecated (will be removed in R15A); use file:read_file/1 and public_key:pem_decode/1
src/oauth_hmac_sha1.erl:8: Warning: crypto:sha_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_utils.erl:159: Warning: crypto:sha_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_utils.erl:166: Warning: crypto:sha_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_utils.erl:196: Warning: crypto:md5_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_utils.erl:204: Warning: crypto:md5_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_mediaclass.erl:272: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/models/m_media.erl:561: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/models/m_identity.erl:294: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/models/m_identity.erl:301: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_geomap/mod_geomap.erl:138: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_oauth/models/m_oauth_app.erl:169: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_import_csv/support/import_csv.erl:637: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_base/support/z_websocket_hybi17.erl:44: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_base/support/z_websocket_hybi00.erl:45: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_base/filters/filter_sha1.erl:26: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
Owner

mmzeeman commented Sep 23, 2013

Nice one, a major change in the API. All these calls are not available in R15.

For now we should probably just silence the deprecation warnings with the "nowarn_deprecated_function" option.

This is a grep of all crypto warnings for a clean compile:
(also includes subprojects)

src/smtp_util.erl:65: Warning: crypto:md5_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/mochiweb_session.erl:105: Warning: crypto:aes_cfb_128_encrypt/3 is deprecated and will be removed in in a future release; use crypto:block_encrypt/4
src/mochiweb_session.erl:110: Warning: crypto:aes_cfb_128_decrypt/3 is deprecated and will be removed in in a future release; use crypto:block_decrypt/4
src/mochiweb_session.erl:114: Warning: crypto:md5_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/mochiweb_session.erl:118: Warning: crypto:sha_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/oauth_rsa_sha1.erl:9: Warning: public_key:pem_to_der/1: deprecated (will be removed in R15A); use file:read_file/1 and public_key:pem_decode/1
src/oauth_rsa_sha1.erl:10: Warning: public_key:decode_private_key/1 is deprecated and will be removed in R15A; use public_key:pem_entry_decode/1
src/oauth_rsa_sha1.erl:22: Warning: public_key:pem_to_der/1: deprecated (will be removed in R15A); use file:read_file/1 and public_key:pem_decode/1
src/oauth_hmac_sha1.erl:8: Warning: crypto:sha_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_utils.erl:159: Warning: crypto:sha_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_utils.erl:166: Warning: crypto:sha_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_utils.erl:196: Warning: crypto:md5_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_utils.erl:204: Warning: crypto:md5_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3
src/support/z_mediaclass.erl:272: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/models/m_media.erl:561: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/models/m_identity.erl:294: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/models/m_identity.erl:301: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_geomap/mod_geomap.erl:138: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_oauth/models/m_oauth_app.erl:169: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_import_csv/support/import_csv.erl:637: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_base/support/z_websocket_hybi17.erl:44: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_base/support/z_websocket_hybi00.erl:45: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2
modules/mod_base/filters/filter_sha1.erl:26: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2

Reply to this email directly or view it on GitHub.

Owner

arjan commented Sep 23, 2013

Hmm interesting..

Owner

mmzeeman commented Sep 23, 2013

Most of the changes are just a change in the API, not in functionality. Instead of calling crypto:md5("blah"), you now have to call crypto:hash(md5, "blah"). That probably eases things for the maintainers of the crypto library.

Hmm interesting..


Reply to this email directly or view it on GitHub.

Owner

arjan commented Apr 17, 2014

Since these are just warnings, let's leave them in for now.

@arjan arjan closed this Apr 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment