Content-Length: 223097 | pFad | http://github.com/kbengine/kbengine/issues/1563

4D error: 'void BF_set_key(BF_KEY*, int, const unsigned char*)' is deprecated · Issue #1563 · kbengine/kbengine · GitHub
Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: 'void BF_set_key(BF_KEY*, int, const unsigned char*)' is deprecated #1563

Open
loveskycloud opened this issue Jun 9, 2022 · 3 comments

Comments

@loveskycloud
Copy link

g++ -m64 -fPIC -pipe -Wall -Wno-deprecated -Wno-uninitialized -Wno-char-subscripts -fno-strict-aliasing -Wno-non-virtual-dtor -Wno-invalid-offsetof -Werror -std=c++11 -O3 -g -DENABLE_WATCHERS -DNO_USE_LOG4CXX -DUSE_SIGAR -DUSE_JEMALLOC -DKBE_SERVER -MMD -DKBE_CONFIG="Hybrid64" -DCODE_INLINE -DKBE_USE_ASSERTS -D_HYBRID -I /shared/kbengine/kbe/src -I /shared/kbengine/kbe/src/lib -I /shared/kbengine/kbe/src/server -I /shared/kbengine/kbe/src/lib/dependencies -I /shared/kbengine/kbe/src/lib/dependencies/zlib -I /shared/kbengine/kbe/src/lib/dependencies/tinyxml -I /shared/kbengine/kbe/src/lib/dependencies/fmt/include -I /shared/kbengine/kbe/src/lib/dependencies/curl/include -I /shared/kbengine/kbe/src/lib/dependencies/log4cxx/src/main/include -I/usr/include -I/shared/kbengine/kbe/src/lib/dependencies/g3dlite -I/shared/kbengine/kbe/src/lib/dependencies/sigar/linux -I/usr/include/tirpc -I/shared/kbengine/kbe/src/lib/dependencies/jwsmtp/jwsmtp/jwsmtp -I/shared/kbengine/kbe/src/lib/dependencies/tmxparser -I/shared/kbengine/kbe/src/lib/dependencies/jemalloc/include -c blowfish.cpp -o Hybrid64/blowfish.o
blowfish.cpp: In member function 'bool KBEngine::KBEBlowfish::init()':
blowfish.cpp:54:27: error: 'void BF_set_key(BF_KEY*, int, const unsigned char*)' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
54 | BF_set_key(this->pBlowFishKey(), key_.size(), (unsigned char*)key_.c_str() );
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from blowfish.h:7,
from blowfish.cpp:3:
/usr/include/openssl/blowfish.h:50:28: note: declared here
50 | OSSL_DEPRECATEDIN_3_0 void BF_set_key(BF_KEY key, int len,
| ^~~~~~~~~~
blowfish.cpp: In member function 'int KBEngine::KBEBlowfish::encrypt(const unsigned char
, unsigned char*, int)':
blowfish.cpp:108:31: error: 'void BF_ecb_encrypt(const unsigned char*, unsigned char*, const BF_KEY*, int)' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
108 | BF_ecb_encrypt(dest + i, dest + i, this->pBlowFishKey(), BF_ENCRYPT);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from blowfish.h:7,
from blowfish.cpp:3:
/usr/include/openssl/blowfish.h:54:28: note: declared here
54 | OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char in,
| ^~~~~~~~~~~~~~
blowfish.cpp: In member function 'int KBEngine::KBEBlowfish::decrypt(const unsigned char
, unsigned char*, int)':
blowfish.cpp:131:31: error: 'void BF_ecb_encrypt(const unsigned char*, unsigned char*, const BF_KEY*, int)' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
131 | BF_ecb_encrypt(src + i, dest + i, this->pBlowFishKey(), BF_DECRYPT);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from blowfish.h:7,
from blowfish.cpp:3:
/usr/include/openssl/blowfish.h:54:28: note: declared here
54 | OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char *in,
| ^~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [/shared/kbengine/kbe/src/build/common.mak:524: Hybrid64/blowfish.o] Error 1
make[2]: Leaving directory '/shared/kbengine/kbe/src/lib/common'
make[1]: *** [Makefile:49: all] Error 2

@14488474
Copy link

你好 请问是怎么解决的

@14488474
Copy link

libssl-dev 降级为1.1可解决整个问题。

@14488474
Copy link

openssl也需要降级

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/kbengine/kbengine/issues/1563

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy