profanity-im / libmesode

*Deprecated* Fork of libstrophe (https://github.com/strophe/libstrophe) for use with Profanity XMPP Client
Other
16 stars 10 forks source link

Not building with openssl 1.1 #12

Closed jubalh closed 6 years ago

jubalh commented 6 years ago

Getting the following errors when building with openssl 1.1:

[   68s] src/tls_openssl.c: In function '_x509_to_tlscert':
[   68s] src/tls_openssl.c:171:32: error: dereferencing pointer to incomplete type 'X509 {aka struct x509_st}'
[   68s]   int alg_nid = OBJ_obj2nid(cert->cert_info->key->algor->algorithm);
[   68s]                                 ^~
[   68s] src/tls_openssl.c: In function 'verify_callback':
[   68s] src/tls_openssl.c:206:26: warning: passing argument 1 of 'sk_X509_pop_free' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
[   68s]          sk_X509_pop_free(sk, X509_free);
[   68s]                           ^~
[   68s] In file included from /usr/include/openssl/crypto.h:29:0,
[   68s]                  from /usr/include/openssl/comp.h:16,
[   68s]                  from /usr/include/openssl/ssl.h:47,
[   68s]                  from src/tls_openssl.c:21:
[   68s] /usr/include/openssl/x509.h:97:1: note: expected 'struct stack_st_X509 *' but argument is of type 'const struct stack_st_X509 *'
[   68s]  DEFINE_STACK_OF(X509)
[   68s]  ^
[   68s] src/tls_openssl.c:212:26: warning: passing argument 1 of 'sk_X509_pop_free' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
[   68s]          sk_X509_pop_free(sk, X509_free);
[   68s]                           ^~
[   68s] In file included from /usr/include/openssl/crypto.h:29:0,
[   68s]                  from /usr/include/openssl/comp.h:16,
[   68s]                  from /usr/include/openssl/ssl.h:47,
[   68s]                  from src/tls_openssl.c:21:
[   68s] /usr/include/openssl/x509.h:97:1: note: expected 'struct stack_st_X509 *' but argument is of type 'const struct stack_st_X509 *'
[   68s]  DEFINE_STACK_OF(X509)
[   68s]  ^
[   68s] src/tls_openssl.c:234:26: warning: passing argument 1 of 'sk_X509_pop_free' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
[   68s]          sk_X509_pop_free(sk, X509_free);
[   68s]                           ^~
[   68s] In file included from /usr/include/openssl/crypto.h:29:0,
[   68s]                  from /usr/include/openssl/comp.h:16,
[   68s]                  from /usr/include/openssl/ssl.h:47,
[   68s]                  from src/tls_openssl.c:21:
[   68s] /usr/include/openssl/x509.h:97:1: note: expected 'struct stack_st_X509 *' but argument is of type 'const struct stack_st_X509 *'
[   68s]  DEFINE_STACK_OF(X509)

Building libstrophe on the other hand works fine.

jubalh commented 6 years ago

Sorry, this was with 0.9.1, only saw now that https://github.com/boothj5/libmesode/commit/5ab52edb943985fc3943b33d9a6be1b23045a052 and https://github.com/boothj5/libmesode/commit/b91872cf7e7ed4d2443ab5c622f4cdb395d64dbe solve this.