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

Possible fix for X509 compilation errors for 5.15.x versions #3

Open
wants to merge 2 commits into
base: 5.15
Choose a base branch
from

Conversation

MichaelColonel
Copy link

Dear developers,

Linux distribution with: Qt-5.15.2, GCC-10.3, OpenSSL-1.1.1m

I usually use 5.12.2 version of OPC UA. I have a compilation error in more recent versions (with openssl support ).

In file included from x509/openssl_symbols.cpp:57:
x509/openssl_symbols.cpp: In function 'int q_BN_set_word(const BIGNUM*, long unsigned int)':
x509/openssl_symbols.cpp:276:48: error: invalid conversion from 'const BIGNUM*' {aka 'const bignum_st*'} to 'BIGNUM*' {aka 'bignum_st*'} [-fpermissive]
  276 | DEFINEFUNC2(int, BN_set_word, const BIGNUM *a, a, BN_ULONG w, w, return 0, return)
      |                                                ^
      |                                                |
      |                                                const BIGNUM* {aka const bignum_st*}
x509/openssl_symbols_p.h:217:45: note: in definition of macro 'DEFINEFUNC2'
  217 |     ret q_##func(arg1, arg2) { funcret func(a, b); }
      |                                             ^
In file included from /usr/include/openssl/asn1.h:23,
                 from x509/openssl_symbols_p.h:59,
                 from x509/openssl_symbols.cpp:57:
/usr/include/openssl/bn.h:271:25: note:   initializing argument 1 of 'int BN_set_word(BIGNUM*, long unsigned int)'
  271 | int BN_set_word(BIGNUM *a, BN_ULONG w);
      |                 ~~~~~~~~^
In file included from x509/openssl_symbols.cpp:57:
x509/openssl_symbols.cpp: In function 'int q_PEM_write_bio_PKCS8PrivateKey(BIO*, EVP_PKEY*, const EVP_CIPHER*, unsigned char*, int, int (*)(char*, int, int, void*), void*)':
x509/openssl_symbols.cpp:342:118: error: invalid conversion from 'unsigned char*' to 'char*' [-fpermissive]
  342 | DEFINEFUNC7(int, PEM_write_bio_PKCS8PrivateKey, BIO *a, a, EVP_PKEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
      |                                                                                                                      ^
      |                                                                                                                      |
      |                                                                                                                      unsigned char*
x509/openssl_symbols_p.h:237:84: note: in definition of macro 'DEFINEFUNC7'
  237 |     ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7) { funcret func(a, b, c, d, e, f, g); }
      |                                                                                    ^
In file included from x509/openssl_symbols_p.h:64,
                 from x509/openssl_symbols.cpp:57:
/usr/include/openssl/pem.h:330:35: note:   initializing argument 4 of 'int PEM_write_bio_PKCS8PrivateKey(BIO*, EVP_PKEY*, const EVP_CIPHER*, char*, int, int (*)(char*, int, int, void*), void*)'
  330 |                                   char *, int, pem_password_cb *, void *);
      |                                   ^~~~~~
make[2]: *** [Makefile:2717: .obj/openssl_symbols.o] Error 1

Could you check that this PR is appropriate for fix that issue. Compilation with that fix finished without problems.

Antti Kokko and others added 2 commits November 3, 2020 10:28
Pick-to: dev 5.15
Change-Id: I3ccb64d19c390dd3b397a302b3cdb832b85eedef
Reviewed-by: Frank Meerkoetter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant