-
Notifications
You must be signed in to change notification settings - Fork 1
Code Signing an App for AOS UI Import
Once an application is compiled and ready for deployment via AOS UI, use the following process to create and sign a package that can then be uploaded.
If the application is a oneM2M AE and has not yet been registered in AOS, first obtain the credential ID, otherwise skip to Code Signing Tokens.
In AOS UI:
-
Select More → System Settings
-
Click the AE Registration Credentials tab
-
Enter the Application Identified (App-ID) of the application to be deployed, then click the Generate Credential ID button

- Copy the Application Credential ID and paste it into a file named “credential-id” in the same directory as the application binary

In AOS UI:
-
Select More → System Settings
-
Click the Code Signing Tokens tab
-
Enter the Application Identified (App-ID) of the application to be deployed, then click the Generated Token button

- Copy the Code Signing Token for use in the next steps below

In a terminal at the same directory as the app binary and manifest.json:
Make sure the SDK environment is sourced (. AOSSDKPATH/environment-setup-*) or run the SDK subshell (AOSSDKPATH/aossdkshell)
The default RA is https://policynet-ra.m2m.aos:18090. If this is not the correct RA url for your environment, use the --URL option to specify it.
If the hostname of the RA does not resolve to an IP address, you'll either need to use the --URL option and replace the hostname with its IP address in the url, or add an entry in your /etc/hosts file.
-
Run the following command in the terminal, the app-id is not required if running within the same directory as the manifest.json
aoscsr [--app-id APP_ID] [--url URL] token example: aoscsr VVV123SSSS444BBBQ
-
Upon success, you should see the following:
Sending Certificate Signing Request ...Success Sending Certificate Confirmation ...Success Updated certs and key saved to: certs
In a terminal at the same directory as the app binary and manifest.json:
Make sure the SDK environment is sourced (. AOSSDKPATH/environment-setup-*) or run the SDK subshell (AOSSDKPATH/aossdkshell)
-
Run the following command in the terminal to create an aos package
aospkg -
Upon success, you should see the following:
Created aos_sample_app-1.0.aos
-
Sign the package using the certs obtained from the CSR above by running the following command
aossignpkg -
Upon success, you should see the following:
Updated aos_sample_app-1.0.aos