User Manual

If you want to change the output filename (in case you have multiple header files to deal with), and convert two
domains at the same time into a single header file, you would issue the following command:
Converting PEM Files
You can also use the convert command to convert a text PEM/.pem file to a C header, which is provided as a
convenience since many browsers will allow you to navigate to a specific domain and export the certificate chain in
.pem format.
Parameters
The ' convert ' command has the following parameters:
Usage
To convert a single .pem file to a C header you could use the following command:
You can also convert multiple .pem files into one C header as follows:
$ pycert download --output data.h google.com adafruit.com
Usage: pycert.py convert [OPTIONS] [CERT]...
-c, --cert-var TEXT name of the variable in the header which will
contain certificate data (default: rootca_certs)
-l, --cert-length-var TEXT name of the define in the header which will
contain the length of the certificate data
(default: ROOTCA_CERTS_LEN)
-o, --output FILENAME name of the output file (default:
certificates.h)
-f, --full-chain use the full certificate chain and not just the
root/last cert (default: false, root cert only)
-d, --keep-dupes write all certs including any duplicates
(default: remove duplicates)
--help Show this message and exit.
$ python pycert.py convert foo.pem
$ python pycert.py convert foo.pem bar.pem
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 167 of 202