
Comment 1 by Francesco Turco, Jan 8, 2023
I can't attach the log, so I'll paste it here: mkdir obj c++ -Wall -fPIC -I./include -I./lib/pugixml/src/ -I./lib/updfparser/include -O2 -c src/libgourou.cpp -o obj/libgourou.o src/libgourou.cpp: In member function 'void gourou::DRMProcessor::exportPrivateLicenseKey(std::string)': src/libgourou.cpp:939:14: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)' declared with attribute 'warn_unused_result' [-Wunused-result] 939 | write(fd, privateLicenseKey.data()+26, privateLicenseKey.length()-26); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++ -Wall -fPIC -I./include -I./lib/pugixml/src/ -I./lib/updfparser/include -O2 -c src/user.cpp -o obj/user.o c++ -Wall -fPIC -I./include -I./lib/pugixml/src/ -I./lib/updfparser/include -O2 -c src/device.cpp -o obj/device.o c++ -Wall -fPIC -I./include -I./lib/pugixml/src/ -I./lib/updfparser/include -O2 -c src/fulfillment_item.cpp -o obj/fulfillment_item.o c++ -Wall -fPIC -I./include -I./lib/pugixml/src/ -I./lib/updfparser/include -O2 -c src/loan_token.cpp -o obj/loan_token.o c++ -Wall -fPIC -I./include -I./lib/pugixml/src/ -I./lib/updfparser/include -O2 -c src/bytearray.cpp -o obj/bytearray.o c++ -Wall -fPIC -I./include -I./lib/pugixml/src/ -I./lib/updfparser/include -O2 -c src/pugixml.cpp -o obj/pugixml.o c++ obj/*.o ./lib/updfparser/libupdfparser.a -o libgourou.so -shared make -C utils ROOT=/home/fturco/tmp/libgourou CXX=c++ AR=ar DEBUG= STATIC_UTILS= make[1]: Entering directory '/home/fturco/tmp/libgourou/utils' c++ -Wall -fPIC -I/home/fturco/tmp/libgourou/include -I/home/fturco/tmp/libgourou/lib/pugixml/src/ -O2 drmprocessorclientimpl.cpp utils_common.cpp -L/home/fturco/tmp/libgourou -lcrypto -lzip -lz -lcurl -lgourou -c drmprocessorclientimpl.cpp: In member function 'virtual void DRMProcessorClientImpl::RSAPrivateEncrypt(const unsigned char*, unsigned int, gourou::RSAInterface::RSA_KEY_TYPE, const string&, const unsigned char*, unsigned int, unsigned char*)': drmprocessorclientimpl.cpp:345:14: error: 'EVP_PKEY_get_size' was not declared in this scope; did you mean 'EVP_PKEY_size'? 345 | outlen = EVP_PKEY_get_size(pkey); | ^~~~~~~~~~~~~~~~~ | EVP_PKEY_size drmprocessorclientimpl.cpp: In member function 'virtual void* DRMProcessorClientImpl::generateRSAKey(int)': drmprocessorclientimpl.cpp:454:5: error: 'EVP_PKEY_CTX_set1_rsa_keygen_pubexp' was not declared in this scope; did you mean 'EVP_PKEY_CTX_set_rsa_keygen_pubexp'? 454 | EVP_PKEY_CTX_set1_rsa_keygen_pubexp(ctx, bn); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | EVP_PKEY_CTX_set_rsa_keygen_pubexp utils_common.cpp: In function 'void fileCopy(const char*, const char*)': utils_common.cpp:122:16: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)' declared with attribute 'warn_unused_result' [-Wunused-result] 122 | ::write(fdOut, buffer, ret); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~ make[1]: *** [Makefile:29: utils.a] Error 1 make[1]: Leaving directory '/home/fturco/tmp/libgourou/utils' make: *** [Makefile:69: build_utils] Error 2

Comment 2 by Grégory Soutadé, Jan 8, 2023
Hi Francesco, Which version of OpenSSL are you running ? I made some changes in order to build using OpenSSL 3.

Comment 3 by Francesco Turco, Jan 9, 2023
I have openssl-1.1.1s on Gentoo Linux since I'm using the stable repository (amd64). OpenSSL 3 belongs to the testing repository (~amd64), which I prefer to avoid at this moment. On my only other computer I run Void Linux, which also uses openssl 1.1.1s currently.

Comment 4 by Grégory Soutadé, Jan 9, 2023
OK. The support for this version of OpenSSL will end in september 2003. Since that, you have to use libgourou v0.7.1.

Comment 5 by Francesco Turco, Jan 10, 2023
I upgraded OpenSSL to version 3.x on Gentoo, and now I'm able to build and use libgourou successfully. Thank you!
Sign in to reply to this comment.
Reported by Francesco Turco, Jan 8, 2023