1

(3 replies, posted in wolfSSL)

Hi,
Could you please provide the documentation of using WolfSSL Library for the iOS apps and an example of WolfSSL iOS app? It would be very helpful for our requirement to use TLS into our iOS app.

2

(3 replies, posted in wolfSSL)

Hi,
In continuation of our discussion in https://www.wolfssl.com/forums/post7128.html#p7128.
The Github link for the WolfSSL iOS app implementation is
https://github.com/MuatazMedini-WolfSSL … ementation
There are two projects in this repository
1. Wolfssl-master
2. WolfSSLTest

The "wolfssl-master" project downloaded from the official WolfSSL GitHub website mentioned the instructions to generate a libwolfssl.a file and the "include" folder from the XCODE WolfSSL project. I followed the instructions to create a "libwolfssl.a" file and made a new "WolfSSLTest" project, importing the "include" folder and the "libwolfssl.a" into this project.
I could not access either a WolfSSL Object or the functions of that library.

The link to the instructions to generate a "libwolfssl.a" file is
https://github.com/MuatazMedini-WolfSSL … /IDE/XCODE

The WolfSSL Android app project implementation is
https://github.com/MuatazMedini-WolfSSL … ample_demo
/Users/muatazmedini/Desktop/Screenshots of WolfSSL Android and iOS project implementations.zip
The WolfSSL Android app project is well documented and provides test cases that were very useful to use in our project requirements.

The link for the screenshots is
https://gist.github.com/andromedini07/d … 0160f7032a

The screenshots are for Android WolfSSL implementation successful build and the iOS WolfSSL implementation failed build respectively.

Could you please provide the same level of documentation for the iOS apps and an example of WolfSSL iOS app implementation?

3

(3 replies, posted in wolfSSL)

Could you please provide the documentation on using the WolfSSL Library for iOS Swift and the Swift codes?
The WolfSSL GitHub project mentioned in the developer forum is old and written in Objective C. (https://github.com/wolfSSL/wolfssl/tree … /IDE/XCODE).

The WolfSSL Android documentation provided in this link (https://github.com/wolfSSL/wolfssljni/t … DE/Android) helped me a lot to develop an Android application to perform SSL Handshake with an embedded device using WolfSSL Library.

I need the same for developing an iOS app.

Basically I need to use WolfSSL in an Android app to perform a handshake, send and receive messages over the Bluetooth GATT layer (BLE Characteristics). I will go through the documentation you had provided. Thank you for providing me the link.

Hello,
How do I import WolfSSL Library into the Android App? I downloaded the WolfSSL Android Client and went through the instructions provided in the "Readme.md" file :

An Android SSL Client using the wolfSSL JNI library

## Prerequisits for successful installation
In order to build the wolfSSL Android client you need to:
* Have `Java JDK 7` or later installed
* Install the `Android NDK` [link](https://developer.android.com/tools/sdk/ndk/index.html)
* Install the `Android SDK` [link](http://developer.android.com/sdk/index.html)
* Install [JUnit-4.11](http://junit.org/) or later. Add `JUNIT_HOME` to your classpath

After installing the Android SDK, run the `SDK Tools` app packaged with it and install Android 4.3 or higher. After you have those installed, you will need to build and install CyaSSL to your system.

### Build and Install CyaSSL
CyaSSL should be located at the root of JNI-Client.

1. To install CyaSSL in Terminal, use the following configure command and hit enter:
```
./configure --enable-dtls --enable-opensslextra --enable-crl --enable-ocsp --enable-crl-monitor --enable-savesession --enable-savecert --enable-atomicuser --enable-ecc --enable-aesgcm --enable-camellia --enable-pkcallbacks
```

2. Type `make`, hit enter.

3. Type `sudo make install`, hit enter. CyaSSL should now be installed.

Once you have compiled and installed CyaSSL, navigate to the `wolfssl-jni` folder located at the root of JNI-Client.

Before we can build the JNI library, we need to make sure your `java.sh` file is setup correctly. Open your `java.sh` file and make sure the `javaIncludes=` path is correctly pointing to your java includes folder. For example, you may need to change it from `java-7-openjdk-amd64` to `oracle-java-8` if you are using oracles Java 8.

1. type `./java.sh` and hit enter, this compiles the native JNI sources into a shared library

2. type `ant` and hit enter, this compiles the java sources and runs tests to make sure it's working correctly

3. You should now have a `wolfssl.jar` file in the `libs` folder. Copy the `wolfssl.jar` file to `JNI-Client/libs` folder.

#### Troubleshooting
When running `ant`, if you get compile errors referring to JUnit you may need to edit the `build.xml` and change
```xml
<include name="junit4.jar"/>
```
to
```xml
<include name="junit-4.11.jar"/>
```
or to whatever the latest version of JUnit is that you installed.

## Building the Android Client
1. In terminal, navigate to the root of JNI-Client

2. type `android list targets` and get the id # of the latest Android version you have installed.

3. type `android update project -t <id#> -p .` without the < > brackets, hit enter. This will create the project properties file.

4. type `ndk-build` hit enter. This will compile the native c files used in the JNI.

The project should now be built and ready to install to an Android device, or emulator.

## Installing the Android Client
To install to your Android device or emulator, make sure your device or emulator has `Android HoneyComb` or later installed then do the following.

1. a) If you are using an emulator, start the emulator and wait until it is fully loaded before continuing.

1. b) If you are using a physical device, make sure you have the Google USB drivers installed and then plug your device in via usb cable.

2. type `ant debug` then hit enter.

3. type `ant debug install` then hit enter, the Android Client should now be installed on your device/emulator as `SSL Client`

## Coding Style

wolfSSL has a strict coding standard that we like to follow. If you plan on submitting a pull request and are using the Eclipse IDE, please import our coding standard.

1. Open the `Windows -> Preferences`

2. Under `Java -> Code Style -> Formatter` click on `Import...`

3. Browse to the `wolfssl-eclipse-format.xml` file at the root of the repository.

4. Save the settings and use `ctrl-shift-f` to format any added source.

In addition to using the Eclipse formatter, please use `ctrl-shift-o` to organize the import statements and remove unneeded ones.


I have Android SDK, NDK, Java 1.8 installed into my laptop. I even mentioned the JVM path to be included in the java.sh file - "/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/include".

When I run this command "./java.sh", I get an error like this:

clang: error: no such file or directory: './native/com_wolfssl_WolfSSL.o'
clang: error: no such file or directory: './native/com_wolfssl_WolfSSLSession.o'
clang: error: no such file or directory: './native/com_wolfssl_WolfSSLContext.o'
clang: error: no such file or directory: './native/com_wolfssl_wolfcrypt_RSA.o'
clang: error: no such file or directory: './native/com_wolfssl_wolfcrypt_ECC.o'

I'm using MacBook Air M2. Can anyone help me to import WolfSSL into the Android App?

6

(1 replies, posted in wolfSSL)

I need to integrate WolfSSL Library into Xamarin Forms. Can anyone guide me on how to integrate?