Using Openssl to implement cryptography

Hi,

I’m writing a program to transmit SMS message on WP7702, I would like to encrypt the message before it is transmitted over the network. I wonder how can I use openssl lib on Legato?
sample code would be very helpful!!

Thanks

you can see this document:

SSL in Legato application.docx (464.9 KB)

Hi I tried to run the sample code you posted, but I got the following error:

May 7 12:19:35 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1050]/supervisor T=main | app.c CreateFileLink() 2042 | Could not stat file at ‘/lib/libcrypto.so.1.0.0’. No such file or directory
May 7 12:19:35 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1050]/supervisor T=main | app.c CreateFileLink() 2159 | Failed to create link at ‘/lib/libcrypto.so.1.0.0’ in app ‘ssltest’.

this is the .cdef file:

sources:

{
main.c
}

requires:

{
lib:

{
    ssl
    crypto
}

file:

{

    // Make the library available inside the app sandbox (in the app's /lib directory).
    /usr/lib/libssl.so.1.0.0    /lib/
    /lib/libcrypto.so.1.0.0 /lib/
}

}

I manually checked /usr/lib, could not find libssl.so.1.0.0 nor libcrypto.so.1.0.0

you can use these in .cdef file

/usr/lib/libssl.so.1.0.2

/usr/lib/libcrypto.so.1.0.2

1 Like