1 (edited by delphiwolf 2017-06-28 05:23:15)

Topic: Linking problem while compiling WolfCLU on Ubuntu 16.04 LTS

Hi,


I am trying to compile WolfCLU utility on an Ubuntu. Earlier I have compiled WolfSSL with default configure options and installed.

cisadmin@a2md15616l:~/wolfssl_example/wolfssl-examples-master/wolfCLU$ ./configure --enable-pwdbased --enable-opensslextra && make && make check

I see below linking error when I compile WolfCLU.

cisadmin@a2md15616l:~/wolfssl_example/wolfssl-examples-master/wolfCLU$ make
make -j3  all-am
make[1]: Entering directory `/home/wolfssl_example/wolfssl-examples-master/wolfCLU'
  CCLD     wolfssl
clu_src/tools/clu_hex_to_bin.o: In function `wolfCLU_hexToBin':
clu_hex_to_bin.c:(.text+0x124): undefined reference to `Base16_Decode'
clu_hex_to_bin.c:(.text+0x224): undefined reference to `Base16_Decode'
clu_hex_to_bin.c:(.text+0x340): undefined reference to `Base16_Decode'
clu_hex_to_bin.c:(.text+0x478): undefined reference to `Base16_Decode'
clu_src/crypto/clu_decrypt.o: In function `wolfCLU_decrypt':
clu_decrypt.c:(.text+0x3af): undefined reference to `wc_PBKDF2'
clu_src/x509/clu_parse.o: In function `wolfCLU_parseFile':
clu_parse.c:(.text+0x24d): undefined reference to `wc_DerToPem'
clu_src/genkey/clu_genkey.o: In function `wolfCLU_genKey_PWDBASED':
clu_genkey.c:(.text+0xb9): undefined reference to `wc_PBKDF2'
collect2: error: ld returned 1 exit status
make[1]: *** [wolfssl] Error 1


Does it required to enable some more option in WolfSSL compilation?

Appreciate your help in  providing the right steps.

Thanks,

Share

Re: Linking problem while compiling WolfCLU on Ubuntu 16.04 LTS

Hi delphiwolf,

You have the correct configuration.

./configure --enable-pwdbased --enable-opensslextra && make && make check

Did you also do:

sudo make install

After the successful 'make check'?

It looks like you have the correct setup but the CLU is linking to a different version of the library IE NOT the version you configured. Please double check there are no "other" versions of libwolfssl in the /usr/local/lib directory that wolfCLU might be linking against instead. Also please ensure to install the wolfSSL library after configuring.

You might also try in the wolfCLU directory re-running "./autogen.sh && ./configure && make".

Let me know what you find.


Warm Regards,

Kaleb

3 (edited by delphiwolf 2017-07-04 06:42:53)

Re: Linking problem while compiling WolfCLU on Ubuntu 16.04 LTS

Hi Kaleb,

Thank you for the inputs. I am able to compile WolfCLU with using another linux PC (Ubuntu 14.04 LTS). Now I am porting a script that uses openssl utility with wolfssl utility.

My existing key generation script with openssl is as follows. Can you provide me the equivalent commands with wolfssl.

I could not find pkcs8 option in wolfCLU.

openssl req -newkey ${ca_key_type} -passout file:./key_pass.txt \
                   -subj ${ca_subj_req} \
                   -x509 -extensions v3_ca \
                   -keyout temp_ca.pem \
                   -out ${ca_cert}.pem \
                   -days ${val_period} -config ../ca/openssl.cnf

    # Generate CA key in PKCS #8 format - both PEM and DER
    openssl pkcs8 -passin file:./key_pass.txt -passout file:./key_pass.txt \
                  -topk8 -inform PEM -outform DER -v2 des3 \
                  -in temp_ca.pem \
                  -out ${ca_key}.der

    openssl pkcs8 -passin file:./key_pass.txt -passout file:./key_pass.txt \
                  -topk8 -inform PEM -outform PEM -v2 des3 \
                  -in temp_ca.pem \
                  -out ${ca_key}.pem

    # Convert CA Certificate to DER format
    openssl x509 -inform PEM -outform DER -in ${ca_cert}.pem -out ${ca_cert}.der

Thanks,
Krishnan.

Share

Re: Linking problem while compiling WolfCLU on Ubuntu 16.04 LTS

Hi,

After looking at the options , I could not see RSA key generation option.
In genkey file it is mentioned as it is this feature will release  soon. Is it possible to get an update.

Regards,
Krishnan.

Share

Re: Linking problem while compiling WolfCLU on Ubuntu 16.04 LTS

Hi delphiwolf,

As the wolfCLU project is currently un-funded I tend to work on it when I get time and that usually occurs around thanksgiving each year. I'll happily make a note that you wish RSA key gen to be the next feature added!

Alternatively if you have great demand and wish to fund the effort rod@wolfssl.com would always be happy to set up an exploratory call to discuss expediting that feature addition through our consulting service. Let me know if this interests you.


Warm Regards,

Kaleb