Topic: [SOLVED] Compilation errors on iOS
Hi,
I have an iOS app that uses OpenSSL, and to reduce memory usage I wanted to give it a try to wolfSSL. Unfortunately I'm having trouble compiling my project with wolfSSL.
To build wolfSSL I'm defining IPHONE, as well as passing the following flags to configure
                "--enable-opensslall",
                "--enable-opensslextra",
                "--enable-asio",
                "--enable-static",
                "--disable-shared",
                "--enable-lowresource",
                "--enable-sni",
                "--enable-alpn",
                "--enable-ecc",
                "--enable-sp",
                "--enable-harden",
                "--enable-fastmath",
                "--enable-tls13",
                "--disable-oldtls",
                "--disable-pwdbased",
                "--enable-poly1305",
                "--enable-chacha",
                "--enable-supportedcurves",
                "--enable-extended-master",
                "--enable-sha3=small",
                "--enable-aesgcm=small",
                "--enable-curve25519=small",
                "--enable-ed25519=small",
                "--enable-certgen",
                "--enable-certreq",
                "--enable-certext",
                "--disable-examples"When I try to compile my project I get compilation errors only with ASN1 and certificate extensions:
In file included from /Users/spaque/Workspace/proxy/src/cert/Certificate.cpp:1:
In file included from /Users/spaque/Workspace/proxy/src/cert/Certificate.h:8:
In file included from /Users/spaque/.conan/data/wolfssl/4.4.0/_/_/package/a53c403ad85370bc61eaa67d47bf767b370c82cf/include/wolfssl/openssl/ssl.h:35:
In file included from /Users/spaque/.conan/data/wolfssl/4.4.0/_/_/package/a53c403ad85370bc61eaa67d47bf767b370c82cf/include/wolfssl/ssl.h:3208:
/Users/spaque/.conan/data/wolfssl/4.4.0/_/_/package/a53c403ad85370bc61eaa67d47bf767b370c82cf/include/wolfssl/openssl/asn1.h:126:66: error: expected ')'
WOLFSSL_API void *wolfSSL_ASN1_item_new(const WOLFSSL_ASN1_ITEM *template);
                                                                 ^
/Users/spaque/.conan/data/wolfssl/4.4.0/_/_/package/a53c403ad85370bc61eaa67d47bf767b370c82cf/include/wolfssl/openssl/asn1.h:126:40: note: to match this
 '('
WOLFSSL_API void *wolfSSL_ASN1_item_new(const WOLFSSL_ASN1_ITEM *template);
                                       ^
/Users/spaque/.conan/data/wolfssl/4.4.0/_/_/package/a53c403ad85370bc61eaa67d47bf767b370c82cf/include/wolfssl/openssl/asn1.h:127:77: error: expected ')'
WOLFSSL_API void wolfSSL_ASN1_item_free(void *val, const WOLFSSL_ASN1_ITEM *template);
                                                                            ^
/Users/spaque/.conan/data/wolfssl/4.4.0/_/_/package/a53c403ad85370bc61eaa67d47bf767b370c82cf/include/wolfssl/openssl/asn1.h:127:40: note: to match this
 '('
WOLFSSL_API void wolfSSL_ASN1_item_free(void *val, const WOLFSSL_ASN1_ITEM *template);
                                       ^
/Users/spaque/.conan/data/wolfssl/4.4.0/_/_/package/a53c403ad85370bc61eaa67d47bf767b370c82cf/include/wolfssl/openssl/asn1.h:129:64: error: expected ')'
                                      const WOLFSSL_ASN1_ITEM *template);
                                                               ^
/Users/spaque/.conan/data/wolfssl/4.4.0/_/_/package/a53c403ad85370bc61eaa67d47bf767b370c82cf/include/wolfssl/openssl/asn1.h:128:38: note: to match this
 '('
WOLFSSL_API int wolfSSL_ASN1_item_i2d(const void *src, byte **dest,
                                     ^
/Users/spaque/Workspace/proxy/src/cert/Certificate.cpp:116:13: error: use of undeclared identifier 'X509_add_ext'
            X509_add_ext(cert, extension, -1);
            ^Before including ssl.h I'm always including wolfssl/options.h. Am I missing something or using incompatible configure flags?