7.1 Certificate and Key Utility
The certificate and key utility is a python tool which can support load, delete and list
operations over the RNWF file system. The tool can only accept the PEM formatted X509
certificates or cryptographic key files. It can identify whether the given PEM file is a
certificate or key file based on its header information and load it in the corresponding
section of the file system. The file upload utility is available in the RNWF product page:rnwf_utilities_vX.X.X
(
rnwf_utilities_vX.X.X\file_upload
)Requirements
- Python v3.8.0 or higher
Using the command terminal, navigate to the utility folder
(
rnwf_utilities_vX.X.X\file_upload
) and install the necessary
python modules by using the following
command.>python -m pip install -r requirements.txtThe certificate and key utility syntax is as follows:
python file_upload.py <Operation> [-h] [-f <File_Name>] [-p <File_Path>] [-proto Protocol] Arguments: Operation Valid operations ['load', 'list', 'delete'] File_Type File types of given operation ['cert','key'] (Required only for list & delete) Optional: -h, --help show this help message and exit -f <File_Name>, --file <File_Name> File Name to save on board -p <File_Path>, --path <File_Path> File Path on local machine -proto Protocol, --protocol Protocol File transfer protocol ('xsum','xcrc','x1k' Default:xsum)
Features
- Auto Detects the RNWF02 COM/Serial port
- Determines the File-type (cert/key) while Uploading
- Detects if the Given File to Load/Delete Already Exists
Examples
- List Certificates or
Keys:
python file_upload.py list cert OR python file_upload.py list key
- Load a Certificate or Key:Note: Uses the default file-transfer protocol - xsum (X Modem + checksum)
python file_upload.py load cert -f <File Name to save on Board> -p <File Path on local machine> OR python file_upload.py load key -f <File Name to save on Board> -p <File Path on local machine>
- Load a Certificate or Key -
Specify a protocol while uploading Certificate or
Key
python file_upload.py load cert/key -f <File Name to save on Board> -p <File Path on local machine> -proto xcrc
- Delete a Certificate or
Key:
python file_upload.py delete cert -f <File Name to delete from Board> OR python file_upload.py delete key -f <File Name to delete from Board>