Hi,
Thank you for your suggestions. I am running the build from a Windows machine and do not have ./configure or autoconf available. I originally built wolfSSL using the IDE\VS-ARM\wolfssl.vcxproj.
I did add the following defines in wolfssl\wolfcrypt\settings.h
/* Uncomment next line if building for Dolphin Emulator */
/* #define DOLPHIN_EMULATOR */
// DL: Substituting encryption layer with wolfSSL from OpenSSL
#undef OPENSSL_EXTRA
#define OPENSSL_EXTRA
#undef OPENSSL_ALL
#define OPENSSL_ALL
I did so after reading the following comment in wolfssl\wolfcrypt\settings.h. The suggestions related to options.h left me puzzled.
/* This flag allows wolfSSL to include options.h instead of having client
* projects do it themselves. This should *NEVER* be defined when building
* wolfSSL as it can cause hard to debug problems. */
#ifdef EXTERNAL_OPTS_OPENVPN
#include <wolfssl/options.h>
#endif
I also verified that the header wolfssl\wolfcrypt\settings.h is also included in wolfssl\openssl\sha.h as shown here:
/* sha.h for openssl */
#ifndef WOLFSSL_SHA_H_
#define WOLFSSL_SHA_H_
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/types.h>
Therefore, the compile errors related to SHA225_Init(&cx)/wolfSSL_SHA224_Init are still reported.
As suggested, I added the BIO_TYPE_SOCKET definition in wolfssl\openssl\bio.h header file as:
// Copied from openssl\bio.h (original)
/* There are the classes of BIOs */
//# define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
//# define BIO_TYPE_FILTER 0x0200
//# define BIO_TYPE_SOURCE_SINK 0x0400
/* These are the 'types' of BIOs */
//# define BIO_TYPE_NONE 0
//# define BIO_TYPE_MEM ( 1|BIO_TYPE_SOURCE_SINK)
//# define BIO_TYPE_FILE ( 2|BIO_TYPE_SOURCE_SINK)
//# define BIO_TYPE_FD ( 4|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
//# define BIO_TYPE_SOCKET ( 5|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
//# define BIO_TYPE_NULL ( 6|BIO_TYPE_SOURCE_SINK)
// DL Redefining for WolfSSL;
# define BIO_TYPE_NONE WOLFSSL_BIO_UNDEF
# define BIO_TYPE_SOCKET WOLFSSL_BIO_SOCKET
This addition addressed the undeclared identifier error initially reported. However, casting errors as shown here are now reported. I will be modifying the source code to address these.
PathToFolder/realm-core/src/realm/util/network_ssl.cpp:420:13: error: cannot initialize an array element of type 'char' with an rvalue of type 'nullptr_t'
nullptr, // const char* name
^~~~~~~
PathToFolder/realm-core/src/realm/util/network_ssl.cpp:421:13: error: cannot initialize an array element of type 'char' with an rvalue of type 'int (*)(BIO *, const char *, int) noexcept' (aka 'int (*)(WOLFSSL_BIO *, const char *, int) noexcept')
&Stream::bio_write, // int (*bwrite)(BIO*, const char*, int)
^~~~~~~~~~~~~~~~~~
PathToFolder/realm-core/src/realm/util/network_ssl.cpp:422:13: error: cannot initialize an array element of type 'char' with an rvalue of type 'int (*)(BIO *, char *, int) noexcept' (aka 'int (*)(WOLFSSL_BIO *, char *, int) noexcept')
&Stream::bio_read, // int (*bread)(BIO*, char*, int)
^~~~~~~~~~~~~~~~~
PathToFolder/realm-core/src/realm/util/network_ssl.cpp:423:13: error: cannot initialize an array element of type 'char' with an rvalue of type 'int (*)(BIO *, const char *) noexcept' (aka 'int (*)(WOLFSSL_BIO *, const char *) noexcept')
&Stream::bio_puts, // int (*bputs)(BIO*, const char*)
^~~~~~~~~~~~~~~~~
PathToFolder/realm-core/src/realm/util/network_ssl.cpp:424:13: error: cannot initialize an array element of type 'char' with an rvalue of type 'nullptr_t'
nullptr, // int (*bgets)(BIO*, char*, int)
^~~~~~~
PathToFolder/realm-core/src/realm/util/network_ssl.cpp:425:13: error: cannot initialize an array element of type 'char' with an rvalue of type 'long (*)(BIO *, int, long, void *) noexcept' (aka 'long (*)(WOLFSSL_BIO *, int, long, void *) noexcept')
&Stream::bio_ctrl, // long (*ctrl)(BIO*, int, long, void*)
^~~~~~~~~~~~~~~~~
Best regards,
Daniel