Fixes when building against latest master (plus https://github.com/wolfSSL/wolfssl/pull/2070). Updates to README.md for building wolfSSL.

pull/120/head
David Garske 2019-02-12 16:10:03 -08:00
parent 7e771fdfdf
commit 10bf5d543b
3 changed files with 16 additions and 6 deletions

View File

@ -12,10 +12,10 @@ DEBUG_INC_PATHS = -MD
OPTIMIZE = -Os
# Options
CFLAGS+=$(DEBUG_FLAGS)
#CFLAGS+=$(OPTIMIZE)
LIBS+=$(STATIC_LIB) -ldl -lm
#LIBS+=$(DYN_LIB)
#CFLAGS+=$(DEBUG_FLAGS)
CFLAGS+=$(OPTIMIZE)
#LIBS+=$(STATIC_LIB) -ldl -lm
LIBS+=$(DYN_LIB)
# build targets
SRC=$(wildcard *.c)

View File

@ -100,9 +100,19 @@ softhsm2-util --import ../certs/server-keyPkcs8.pem --slot $SOFTHSM2_SLOTID --id
## Run server and client
### Build wolfSSL
./autogen.sh
./configure --enable-pkcs11
make
sudo make install
### Build Server Example
make
./server-tls-pkcs11 <Path to SoftHSMv2 library> $SOFTHSM2_SLOTID SoftToken cryptoki
# In wolfSSL directory
### Run Client
./examples/client/client

View File

@ -95,7 +95,7 @@ int server_tls(int devId)
}
/* Load server key into WOLFSSL_CTX */
if (wolfSSL_CTX_use_PrivateKey_id(ctx, privKeyId, 2, 2048) != SSL_SUCCESS) {
if (wolfSSL_CTX_use_PrivateKey_id(ctx, privKeyId, 2, devId, 2048) != SSL_SUCCESS) {
fprintf(stderr, "ERROR: failed to set id.\n");
return -1;
}