Skip to content
Snippets Groups Projects
Commit a5fecc57 authored by Alexandre Eberhardt's avatar Alexandre Eberhardt
Browse files

Documentation: Clarify sign.md

Clarify and add example to sign.md

Change-Id: I1c12e68805707d6db987a4eb9723dc9a4f4795d8
parent 32ed9027
No related branches found
No related tags found
No related merge requests found
# To add your plugin built on Jami, you need to sign it with certificates.
# Certifying and Adding Your Plugin to Jami
To add your plugin built on Jami, you need to certify it by signing it with keys and certificates.
First, you will generate a unique developer key and certificate, which will be used to create a certificate for each plugin. Then, you will sign your plugin archive (.jpl) using the plugin’s certificate key.
After that, you will be able to add your signed plugin to Jami.
## Create a directory to store them:
```
```bash
mkdir -p jami-plugins/certificate
```
## In a Python environment (recommended) install the requirements:
## Install the Required Dependencies
```
Install the necessary dependencies in a Python environment:
```bash
cd jami-plugins/SDK
pip install -r requirements.txt
pip install -r certificate_requirements.txt
pip install requests
```
## Create the certificates:
## Create the Developer Key and Certificate
```
python3 ./certKey.py create --subject PluginName ../certificate/
Generate a unique developer certificate:
```bash
./certKey.py create --subject <YourName> ../certificate/<YourName>
```
## Verify the certificates:
## Create the Plugin Certificate
```
openssl x509 -in ../certificate/certificate.crt -text -noout
Use the developer certificate to create a plugin-specific certificate:
```bash
./certKey.py create --issuer ../certificate/<YourName> --subject <YourPlugin> ../certificate/<YourPlugin>
```
## Sign the plugin (certKey.py will automatically add the `.crt` and `.jpl` extensions):
## Verify the Certificates
```
python3 ./certKey.py --plugin sign --issuer <Path to your certificate without the ".crt"> --path <path to your plugin.jpl> <path to your signed plugin output without the ".jpl">
To verify the content of a certificate:
```bash
openssl x509 -in ../certificate/<CertificateName.crt> -text -noout
```
For example:
## Sign the Plugin
Sign your plugin archive using the created certificate:
```bash
python3 ./certKey.py --plugin sign --issuer ../certificate/<YourPlugin> --path ../build/<your distribution>/<YourPlugin.jpl> ../build/<your distribution>/signed/<YourPluginSigned>
```
python3 ./certKey.py --plugin sign --issuer ../certificate/certificate --path ../build/x86_64-linux-gnu/AutoAnswer.jpl ../build/x86_64-linux-gnu/signed/AutoAnswerSigned
```
## Display the signed files:
## Complete example with developer=Alexandre, plugin=AudioFilter, distribution=x86_64-linux-gnu:
```bash
python3 ./certKey.py create --subject Alexandre ../certificate/Alexandre
python3 ./certKey.py create --issuer ../certificate/Alexandre --subject AudioFilter ../certificate/AudioFilter
python3 ./certKey.py --plugin sign --issuer ../certificate/AudioFilter --path ../build/x86_64-linux-gnu/AudioFilter.jpl ../build/x86_64-linux-gnu/signed/AudioFilterSigned
```
## Display the Signed Files
Verify that the signed file is generated correctly:
```bash
ls ../build/<your distribution>/signed
```
## You can now add your signed `.jpl` plugin to Jami.
## Add Your Plugin to Jami
You can now add your signed `.jpl` archive to Jami.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment