forked from wolfSSL/wolfssl
move ProcessChainBufer out of filesystem only, add configure option for noFilesystem
This commit is contained in:
16
configure.in
16
configure.in
@ -14,7 +14,8 @@ CYASSL_LIBRARY_VERSION=2:1:0
|
||||
# current:revision:age
|
||||
# | | |
|
||||
# | | +- increment if interfaces have been added
|
||||
# | | set to zero if interfaces have been removed or changed
|
||||
# | | set to zero if interfaces have been removed
|
||||
# | or changed
|
||||
# | +- increment if source code has changed
|
||||
# | set to zero if current is incremented
|
||||
# +- increment if interfaces have been added, removed or changed
|
||||
@ -337,6 +338,19 @@ then
|
||||
fi
|
||||
|
||||
|
||||
# No Filesystem Build
|
||||
AC_ARG_ENABLE(noFilesystem,
|
||||
[ --enable-noFilesystem Enable No Filesystem (default: disabled)],
|
||||
[ ENABLED_NOFILESYSTEM=$enableval ],
|
||||
[ ENABLED_NOFILESYSTEM=no ]
|
||||
)
|
||||
|
||||
if test "$ENABLED_NOFILESYSTEM" = "yes"
|
||||
then
|
||||
CFLAGS="$CFLAGS -DNO_FILESYSTEM"
|
||||
fi
|
||||
|
||||
|
||||
# ECC
|
||||
AC_ARG_ENABLE(ecc,
|
||||
[ --enable-ecc Enable ECC (default: disabled)],
|
||||
|
48
src/ssl.c
48
src/ssl.c
@ -891,30 +891,6 @@ int AddCA(SSL_CTX* ctx, buffer der)
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_FILESYSTEM
|
||||
|
||||
#ifndef MICRIUM
|
||||
#define XFILE FILE
|
||||
#define XFOPEN fopen
|
||||
#define XFSEEK fseek
|
||||
#define XFTELL ftell
|
||||
#define XREWIND rewind
|
||||
#define XFREAD fread
|
||||
#define XFCLOSE fclose
|
||||
#define XSEEK_END SEEK_END
|
||||
#else
|
||||
#include <fs.h>
|
||||
#define XFILE FS_FILE
|
||||
#define XFOPEN fs_fopen
|
||||
#define XFSEEK fs_fseek
|
||||
#define XFTELL fs_ftell
|
||||
#define XREWIND fs_rewind
|
||||
#define XFREAD fs_fread
|
||||
#define XFCLOSE fs_fclose
|
||||
#define XSEEK_END FS_SEEK_END
|
||||
#endif
|
||||
|
||||
|
||||
/* CA PEM file for verification, may have multiple/chain certs to process */
|
||||
static int ProcessChainBuffer(SSL_CTX* ctx, const unsigned char* buff,
|
||||
long sz, int format, int type, SSL* ssl)
|
||||
@ -945,6 +921,30 @@ static int ProcessChainBuffer(SSL_CTX* ctx, const unsigned char* buff,
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_FILESYSTEM
|
||||
|
||||
#ifndef MICRIUM
|
||||
#define XFILE FILE
|
||||
#define XFOPEN fopen
|
||||
#define XFSEEK fseek
|
||||
#define XFTELL ftell
|
||||
#define XREWIND rewind
|
||||
#define XFREAD fread
|
||||
#define XFCLOSE fclose
|
||||
#define XSEEK_END SEEK_END
|
||||
#else
|
||||
#include <fs.h>
|
||||
#define XFILE FS_FILE
|
||||
#define XFOPEN fs_fopen
|
||||
#define XFSEEK fs_fseek
|
||||
#define XFTELL fs_ftell
|
||||
#define XREWIND fs_rewind
|
||||
#define XFREAD fs_fread
|
||||
#define XFCLOSE fs_fclose
|
||||
#define XSEEK_END FS_SEEK_END
|
||||
#endif
|
||||
|
||||
|
||||
/* process a file with name fname into ctx of format and type
|
||||
userChain specifies a user certificate chain to pass during handshake */
|
||||
static int ProcessFile(SSL_CTX* ctx, const char* fname, int format, int type,
|
||||
|
Reference in New Issue
Block a user