Fixes when building against latest master (plus https://github.com/wolfSSL/wolfssl/pull/2070). Updates to README.md for building wolfSSL.
parent
7e771fdfdf
commit
10bf5d543b
|
@ -12,10 +12,10 @@ DEBUG_INC_PATHS = -MD
|
||||||
OPTIMIZE = -Os
|
OPTIMIZE = -Os
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
CFLAGS+=$(DEBUG_FLAGS)
|
#CFLAGS+=$(DEBUG_FLAGS)
|
||||||
#CFLAGS+=$(OPTIMIZE)
|
CFLAGS+=$(OPTIMIZE)
|
||||||
LIBS+=$(STATIC_LIB) -ldl -lm
|
#LIBS+=$(STATIC_LIB) -ldl -lm
|
||||||
#LIBS+=$(DYN_LIB)
|
LIBS+=$(DYN_LIB)
|
||||||
|
|
||||||
# build targets
|
# build targets
|
||||||
SRC=$(wildcard *.c)
|
SRC=$(wildcard *.c)
|
||||||
|
|
|
@ -100,9 +100,19 @@ softhsm2-util --import ../certs/server-keyPkcs8.pem --slot $SOFTHSM2_SLOTID --id
|
||||||
|
|
||||||
## Run server and client
|
## 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
|
./server-tls-pkcs11 <Path to SoftHSMv2 library> $SOFTHSM2_SLOTID SoftToken cryptoki
|
||||||
|
|
||||||
# In wolfSSL directory
|
### Run Client
|
||||||
./examples/client/client
|
./examples/client/client
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ int server_tls(int devId)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load server key into WOLFSSL_CTX */
|
/* 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");
|
fprintf(stderr, "ERROR: failed to set id.\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue