Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1383755 - libqtelegram-ae: FTBFS in Fedora Rawhide: invalid use of incomplete type 'RSA {aka struct rsa_st}'
Summary: libqtelegram-ae: FTBFS in Fedora Rawhide: invalid use of incomplete type 'RSA...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: libqtelegram-ae
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Igor Gnatenko
QA Contact: Fedora Extras Quality Assurance
URL: http://apps.fedoraproject.org/koschei...
Whiteboard:
: 1423875 (view as bug list)
Depends On:
Blocks: 1383740 F26FTBFS
TreeView+ depends on / blocked
 
Reported: 2016-10-11 16:56 UTC by Igor Gnatenko
Modified: 2018-05-29 11:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:38:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Aseman-Land libqtelegram-aseman-edition issues 51 0 None open openssl 1.1 support 2020-03-17 15:13:01 UTC

Description Igor Gnatenko 2016-10-11 16:56:11 UTC
Description of problem:
Package libqtelegram-ae fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
10.0.0-2.fc25

Steps to Reproduce:
koji build --scratch f26 libqtelegram-ae-10.0.0-2.fc25.src.rpm

Additional info:
This package is tracked by Koschei. See:
http://apps.fedoraproject.org/koschei/package/libqtelegram-ae


../util/utils.cpp: In static member function 'static qint64 Utils::computeRSAFingerprint(RSA*)':
../util/utils.cpp:283:17: error: invalid use of incomplete type 'RSA {aka struct rsa_st}'
     Q_ASSERT(key->n && key->e);
                 ^
/usr/include/qt5/QtCore/qglobal.h:720:54: note: in definition of macro 'Q_ASSERT'
 #    define Q_ASSERT(cond) do { } while ((false) && (cond))
                                                      ^~~~
In file included from /usr/include/openssl/bn.h:32:0,
                 from ../util/utils.h:36,
                 from ../util/utils.cpp:22:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA {aka struct rsa_st}'
 typedef struct rsa_st RSA;
                ^~~~~~
In file included from /usr/include/qt5/QtCore/qnamespace.h:43:0,
                 from /usr/include/qt5/QtCore/qobjectdefs.h:48,
                 from /usr/include/qt5/QtCore/qobject.h:46,
                 from /usr/include/qt5/QtCore/QObject:1,
                 from ../util/utils.h:35,
                 from ../util/utils.cpp:22:
../util/utils.cpp:283:27: error: invalid use of incomplete type 'RSA {aka struct rsa_st}'
     Q_ASSERT(key->n && key->e);
                           ^
/usr/include/qt5/QtCore/qglobal.h:720:54: note: in definition of macro 'Q_ASSERT'
 #    define Q_ASSERT(cond) do { } while ((false) && (cond))
                                                      ^~~~
In file included from /usr/include/openssl/bn.h:32:0,
                 from ../util/utils.h:36,
                 from ../util/utils.cpp:22:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA {aka struct rsa_st}'
 typedef struct rsa_st RSA;
                ^~~~~~
../util/utils.cpp:284:37: error: invalid use of incomplete type 'RSA {aka struct rsa_st}'
     qint32 l1 = serializeBignum (key->n, tempbuff, 4096);
                                     ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from ../util/utils.h:36,
                 from ../util/utils.cpp:22:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA {aka struct rsa_st}'
 typedef struct rsa_st RSA;
                ^~~~~~
../util/utils.cpp:286:37: error: invalid use of incomplete type 'RSA {aka struct rsa_st}'
     qint32 l2 = serializeBignum (key->e, tempbuff + l1, 4096 - l1);
                                     ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from ../util/utils.h:36,
                 from ../util/utils.cpp:22:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA {aka struct rsa_st}'
 typedef struct rsa_st RSA;
                ^~~~~~
g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-delete-null-pointer-checks -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DLIBQTELEGRAM_LIBRARY -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../libqtelegram-aseman-edition-10.0.0-stable -I. -I/usr/include -I/usr/local/include -I/usr/include/qt5 -I/usr/include/qt5/QtMultimedia -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o cryptoutils.o ../util/cryptoutils.cpp
make: *** [Makefile:8081: utils.o] Error 1
make: *** Waiting for unfinished jobs....
../util/cryptoutils.cpp: In member function 'qint32 CryptoUtils::encryptPacketBuffer(OutboundPkt&, void*)':
../util/cryptoutils.cpp:43:118: error: invalid use of incomplete type 'RSA {aka struct rsa_st}'
     return padRsaEncrypt((char *) p.buffer(), p.length() * 4, (char *) encryptBuffer, ENCRYPT_BUFFER_INTS * 4, pubKey->n, pubKey->e);
                                                                                                                      ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/outboundpkt.h:30,
                 from ../util/cryptoutils.h:26,
                 from ../util/cryptoutils.cpp:22:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA {aka struct rsa_st}'
 typedef struct rsa_st RSA;
                ^~~~~~
../util/cryptoutils.cpp:43:129: error: invalid use of incomplete type 'RSA {aka struct rsa_st}'
     return padRsaEncrypt((char *) p.buffer(), p.length() * 4, (char *) encryptBuffer, ENCRYPT_BUFFER_INTS * 4, pubKey->n, pubKey->e);
                                                                                                                                 ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/outboundpkt.h:30,
                 from ../util/cryptoutils.h:26,
                 from ../util/cryptoutils.cpp:22:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA {aka struct rsa_st}'
 typedef struct rsa_st RSA;
                ^~~~~~
../util/cryptoutils.cpp: In member function 'qint32 CryptoUtils::padRsaEncrypt(char*, qint32, char*, qint32, BIGNUM*, BIGNUM*)':
../util/cryptoutils.cpp:55:26: warning: 'int RAND_pseudo_bytes(unsigned char*, int)' is deprecated [-Wdeprecated-declarations]
     qint32 isSupported = RAND_pseudo_bytes ((uchar *) from + from_len, pad); // returns -1 if not supported
                          ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/opensslconf.h:42:0,
                 from /usr/include/openssl/asn1.h:15,
                 from /usr/include/openssl/rsa.h:16,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/settings.h:80,
                 from ../util/cryptoutils.cpp:24:
/usr/include/openssl/rand.h:47:1: note: declared here
 DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
 ^
../util/cryptoutils.cpp:55:75: warning: 'int RAND_pseudo_bytes(unsigned char*, int)' is deprecated [-Wdeprecated-declarations]
     qint32 isSupported = RAND_pseudo_bytes ((uchar *) from + from_len, pad); // returns -1 if not supported
                                                                           ^
In file included from /usr/include/openssl/opensslconf.h:42:0,
                 from /usr/include/openssl/asn1.h:15,
                 from /usr/include/openssl/rsa.h:16,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/settings.h:80,
                 from ../util/cryptoutils.cpp:24:
/usr/include/openssl/rand.h:47:1: note: declared here
 DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
 ^
../util/cryptoutils.cpp:64:12: error: aggregate 'BIGNUM x' has incomplete type and cannot be defined
     BIGNUM x, y;
            ^
../util/cryptoutils.cpp:64:15: error: aggregate 'BIGNUM y' has incomplete type and cannot be defined
     BIGNUM x, y;
               ^
../util/cryptoutils.cpp:65:16: error: 'BN_init' was not declared in this scope
     BN_init (&x);
                ^
../util/cryptoutils.cpp: In member function 'qint32 CryptoUtils::padAESEncrypt(const char*, qint32, char*, qint32)':
../util/cryptoutils.cpp:152:34: warning: 'int RAND_pseudo_bytes(unsigned char*, int)' is deprecated [-Wdeprecated-declarations]
         qint32 isRandSupported = RAND_pseudo_bytes ((uchar *) from + fromLen, paddedSize - fromLen);
                                  ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/opensslconf.h:42:0,
                 from /usr/include/openssl/asn1.h:15,
                 from /usr/include/openssl/rsa.h:16,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/settings.h:80,
                 from ../util/cryptoutils.cpp:24:
/usr/include/openssl/rand.h:47:1: note: declared here
 DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
 ^
../util/cryptoutils.cpp:152:99: warning: 'int RAND_pseudo_bytes(unsigned char*, int)' is deprecated [-Wdeprecated-declarations]
         qint32 isRandSupported = RAND_pseudo_bytes ((uchar *) from + fromLen, paddedSize - fromLen);
                                                                                                   ^
In file included from /usr/include/openssl/opensslconf.h:42:0,
                 from /usr/include/openssl/asn1.h:15,
                 from /usr/include/openssl/rsa.h:16,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/settings.h:80,
                 from ../util/cryptoutils.cpp:24:
/usr/include/openssl/rand.h:47:1: note: declared here
 DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
 ^
../util/cryptoutils.cpp: In member function 'qint32 CryptoUtils::checkPrime(BIGNUM*)':
../util/cryptoutils.cpp:169:16: warning: 'int BN_is_prime(const BIGNUM*, int, void (*)(int, int, void*), BN_CTX*, void*)' is deprecated [-Wdeprecated-declarations]
     qint32 r = BN_is_prime (p, BN_prime_checks, 0, BN_ctx, 0);
                ^~~~~~~~~~~
In file included from /usr/include/openssl/opensslconf.h:42:0,
                 from /usr/include/openssl/crypto.h:32,
                 from /usr/include/openssl/bn.h:33,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/outboundpkt.h:30,
                 from ../util/cryptoutils.h:26,
                 from ../util/cryptoutils.cpp:22:
/usr/include/openssl/bn.h:291:1: note: declared here
 DEPRECATEDIN_0_9_8(int
 ^
../util/cryptoutils.cpp:169:61: warning: 'int BN_is_prime(const BIGNUM*, int, void (*)(int, int, void*), BN_CTX*, void*)' is deprecated [-Wdeprecated-declarations]
     qint32 r = BN_is_prime (p, BN_prime_checks, 0, BN_ctx, 0);
                                                             ^
In file included from /usr/include/openssl/opensslconf.h:42:0,
                 from /usr/include/openssl/crypto.h:32,
                 from /usr/include/openssl/bn.h:33,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/outboundpkt.h:30,
                 from ../util/cryptoutils.h:26,
                 from ../util/cryptoutils.cpp:22:
/usr/include/openssl/bn.h:291:1: note: declared here
 DEPRECATEDIN_0_9_8(int
 ^
../util/cryptoutils.cpp: In member function 'qint32 CryptoUtils::checkDHParams(BIGNUM*, qint32)':
../util/cryptoutils.cpp:176:12: error: aggregate 'BIGNUM t' has incomplete type and cannot be defined
     BIGNUM t;
            ^
../util/cryptoutils.cpp:177:16: error: 'BN_init' was not declared in this scope
     BN_init (&t);
                ^
../util/cryptoutils.cpp:179:12: error: aggregate 'BIGNUM dh_g' has incomplete type and cannot be defined
     BIGNUM dh_g;
            ^~~~
../util/cryptoutils.cpp:211:12: error: aggregate 'BIGNUM b' has incomplete type and cannot be defined
     BIGNUM b;
            ^
../util/cryptoutils.cpp: In member function 'qint32 CryptoUtils::checkCalculatedParams(const BIGNUM*, const BIGNUM*, const BIGNUM*)':
../util/cryptoutils.cpp:232:12: error: aggregate 'BIGNUM one' has incomplete type and cannot be defined
     BIGNUM one;
            ^~~
../util/cryptoutils.cpp:233:17: error: 'BN_init' was not declared in this scope
     BN_init(&one);
                 ^
../util/cryptoutils.cpp:249:12: error: aggregate 'BIGNUM exp' has incomplete type and cannot be defined
     BIGNUM exp;
            ^~~
../util/cryptoutils.cpp:253:12: error: aggregate 'BIGNUM base' has incomplete type and cannot be defined
     BIGNUM base;
            ^~~~
../util/cryptoutils.cpp:258:12: error: aggregate 'BIGNUM lowLimit' has incomplete type and cannot be defined
     BIGNUM lowLimit;
            ^~~~~~~~
../util/cryptoutils.cpp:263:12: error: aggregate 'BIGNUM highLimit' has incomplete type and cannot be defined
     BIGNUM highLimit;
            ^~~~~~~~~
../util/cryptoutils.cpp: In member function 'QByteArray CryptoUtils::encryptFilePart(const QByteArray&, uchar*, uchar*)':
../util/cryptoutils.cpp:296:13: warning: 'int RAND_pseudo_bytes(unsigned char*, int)' is deprecated [-Wdeprecated-declarations]
             RAND_pseudo_bytes(out.data() + length, paddedSize - length);
             ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/opensslconf.h:42:0,
                 from /usr/include/openssl/asn1.h:15,
                 from /usr/include/openssl/rsa.h:16,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/settings.h:80,
                 from ../util/cryptoutils.cpp:24:
/usr/include/openssl/rand.h:47:1: note: declared here
 DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
 ^
../util/cryptoutils.cpp:296:71: warning: 'int RAND_pseudo_bytes(unsigned char*, int)' is deprecated [-Wdeprecated-declarations]
             RAND_pseudo_bytes(out.data() + length, paddedSize - length);
                                                                       ^
In file included from /usr/include/openssl/opensslconf.h:42:0,
                 from /usr/include/openssl/asn1.h:15,
                 from /usr/include/openssl/rsa.h:16,
                 from ../../libqtelegram-aseman-edition-10.0.0-stable/core/settings.h:80,
                 from ../util/cryptoutils.cpp:24:
/usr/include/openssl/rand.h:47:1: note: declared here
 DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
 ^
../util/cryptoutils.cpp: In member function 'qint32 CryptoUtils::computeKeyFingerprint(const QByteArray&, const QByteArray&)':
../util/cryptoutils.cpp:329:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     qint32 keyFingerprint = (*(int *)md5) ^ (*(int *)(md5 + 4));
                                      ^~~

Comment 1 Igor Gnatenko 2017-02-22 10:39:32 UTC
*** Bug 1423875 has been marked as a duplicate of this bug. ***

Comment 2 Rex Dieter 2017-02-22 17:02:50 UTC
%changelog
* Wed Feb 22 2017 Rex Dieter <rdieter> - 10.0.0-3
- fix FTBFS, use same openssl as qt5-qtbase (#1383755)

which happens to be compat-openssl10-devel at the moment.  I'll leave it to you if you want to leave this open to track possibly enabling openssl-1.1.x support in the future or not (though probably also depends on qtbase support first)

Comment 3 Fedora End Of Life 2017-02-28 10:25:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 4 Fedora End Of Life 2018-05-03 08:25:36 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2018-05-29 11:38:45 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.