[openssl-dev] [openssl.org #3690] s_client.c and missing psk_key symbol
noloader@gmail.com via RT
rt at openssl.org
Sun Feb 8 16:37:07 UTC 2015
Modifying and compiling s_client.c manually results in a compile failure:
export OPENSSLDIR=/usr/local/ssl/darwin
gcc -DMONOLITH -I$OPENSSLDIR/include -I../ -c apps.c
gcc -DMONOLITH -I$OPENSSLDIR/include -I../ -c app_rand.c
gcc -DMONOLITH -I$OPENSSLDIR/include -I../ -c s_cb.c
gcc -DMONOLITH -I$OPENSSLDIR/include -I../ -c s_socket.c
gcc -I$OPENSSLDIR/include -I../ app_rand.o apps.o s_cb.o s_socket.o \
$OPENSSLDIR/lib/libssl.a $OPENSSLDIR/lib/libcrypto.a s_client.c -o
my_s_client.exe
Undefined symbols for architecture x86_64:
"_psk_key", referenced from:
_main in s_client-7f5596.o
_psk_client_cb in s_client-7f5596.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
It appears psk_key was inadvertently commented out (from around line 225):
#ifndef OPENSSL_NO_PSK
/* Default PSK identity and key */
static char *psk_identity="Client_identity";
/*char *psk_key=NULL; by default PSK is not used */
...
More information about the openssl-dev
mailing list