# Openssl library for legato - WP8548

**URL:** https://forum.legato.io/t/openssl-library-for-legato-wp8548/2762
**Category:** Uncategorized
**Created:** [November 3, 2017, 6:04am UTC](https://forum.legato.io/t/openssl-library-for-legato-wp8548/2762 "2017-11-03T06:04:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wedapashi](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@wedapashi](https://forum.legato.io/u/wedapashi)
#### Post date: [November 3, 2017, 6:04am UTC](https://forum.legato.io/t/openssl-library-for-legato-wp8548/2762/1 "2017-11-03T06:04:53Z")

</div>

Is there a version of openssl library somewhere on Github that we can use with legato-16.10.1 for WP8548?

I have tried cross compiling [this openssl from github](https://github.com/openssl/openssl) using a `./Configuration` option,

```
CC=$WP85_TOOLCHAIN_DIR/arm-poky-linux-gnueabi-gcc 
RANLIB=$WP85_TOOLCHAIN_DIR/arm-poky-linux-gnueabi-ranlib 
STRIP=$WP85_TOOLCHAIN_DIR/arm-poky-linux-gnueabi-strip   
./Configure --cross-compile-prefix=$WP85_TOOLCHAIN_DIR/arm-poky-linux-gnueabi-gcc --host=arm-poky-linux --enable-static --enable-shared --without-zlib --without-bzip2 --without-pcre --with-openssl --with-openssl-libs=/usr/lib

```

But it says,

```
Configuring for 
Warning! target doesn't exist!
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]

pick os/compiler from:
BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-sparc64 BSD-sparcv8 
BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486 Cygwin-i586 
Cygwin-i686 Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc OS390-Unix QNX6 
QNX6-i386 UEFI UWIN VC-CE VC-WIN32 VC-WIN64A VC-WIN64A-masm VC-WIN64I aix-cc 
aix-gcc aix64-cc aix64-gcc android android-armeabi android-mips android-x86 
android64 android64-aarch64 bsdi-elf-gcc cc darwin-i386-cc darwin-ppc-cc 
darwin64-debug-test-64-clang darwin64-ppc-cc darwin64-x86_64-cc dist gcc 
haiku-x86 haiku-x86_64 hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc 
hpux-parisc-gcc hpux-parisc1_1-cc hpux-parisc1_1-gcc hpux64-ia64-cc 
hpux64-ia64-gcc hpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 ios-cross 
ios64-cross iphoneos-cross irix-mips3-cc irix-mips3-gcc irix64-mips4-cc 
irix64-mips4-gcc linux-aarch64 linux-alpha-gcc linux-aout linux-arm64ilp32 
linux-armv4 linux-c64xplus linux-elf linux-generic32 linux-generic64 
linux-ia64 linux-mips32 linux-mips64 linux-ppc linux-ppc64 linux-ppc64le 
linux-sparcv8 linux-sparcv9 linux-x32 linux-x86 linux-x86-clang linux-x86_64 
linux-x86_64-clang linux32-s390x linux64-mips64 linux64-s390x linux64-sparcv9 
mingw mingw64 nextstep nextstep3.3 purify qnx4 sco5-cc sco5-gcc 
solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc solaris-sparcv8-gcc 
solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-gcc solaris64-sparcv9-cc 
solaris64-sparcv9-gcc solaris64-x86_64-cc solaris64-x86_64-gcc tru64-alpha-cc 
tru64-alpha-gcc uClinux-dist uClinux-dist64 unixware-2.0 unixware-2.1 
unixware-7 unixware-7-gcc vms-alpha vms-alpha-p32 vms-alpha-p64 vms-ia64 
vms-ia64-p32 vms-ia64-p64 vos-gcc vxworks-mips vxworks-ppc405 vxworks-ppc60x 
vxworks-ppc750 vxworks-ppc750-debug vxworks-ppc860 vxworks-ppcgen 
vxworks-simlinux debug debug-erbridge debug-linux-ia32-aes debug-linux-pentium 
debug-linux-ppro debug-test-64-clang 

NOTE: If in doubt, on Unix-ish systems use './config'.

```

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)
#### Post date: [November 3, 2017, 8:31am UTC](https://forum.legato.io/t/openssl-library-for-legato-wp8548/2762/2 "2017-11-03T08:31:51Z")

</div>

Hi,

Seems there is already ssl library in the toolchain.  
I have tried the following to compile the application with ssl library before:

/home/owner/legato/packages/legato.toolchain.1.7.3.SWI9X15Y\_07112100-wp85-wp750x-native-x86\_64-201701091132/resources/native/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -o sslconnect.arm.o sslconnect.c -lssl -lcrypto

---

<div class="post-metadata">

### Author: ![wedapashi](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@wedapashi](https://forum.legato.io/u/wedapashi)
#### Post date: [November 3, 2017, 10:21am UTC](https://forum.legato.io/t/openssl-library-for-legato-wp8548/2762/3 "2017-11-03T10:21:50Z")

</div>

Thanks @jyijyi, but I think we are off on a different scene here.

I am trying to cross-compile a jwt library (which so far has been of a lot of pain), that library internally needs openssl. Now, I have put an `externalBuild:` section in Component.cdef file present in the directory where the jwt library is kept. And that fails.  
This may rise to a different question altogether, but I’d rather prefer to get the exact steps to cross compile a jwt library which is compatible with [this example](https://github.com/startwithsierra/mangoh-to-gcloud/tree/green),
