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 WINCS 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 (RNWF/WILC/WINC Utilities) is available on the WINCSxx Silicon Product Page.
Requirements
- Python v3.8.0 or higher
>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 WINCS02 COM/Serial port
- Determines the File-type (cert/key) while Uploading
- Detects if the Given File to Load/Delete Already Exists
- 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>