For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
https://forum.pine64.org/showthread.php?tid=2500&pid=22739#pid22739 | |
I finally received a handful of PADI modules last week and spent a little quite some time over the weekend analyzing the OTA update and firmware recovery methods. Generally speaking, the firmware on the PADI is an improvement over the one on the B&T modules, but there are still a few caveats involved. | |
First, a few definitions: | |
Bootloader (BL) / Img1 | |
First stage image loaded by ROM code, always located at flash address 0x0. No source available in any SDK. | |
Img2 | |
Runtime firmware image, loaded by Bootloader. |
package test_mqtt; | |
import java.io.BufferedInputStream; | |
import java.io.FileInputStream; | |
import java.io.FileReader; | |
import java.security.KeyPair; | |
import java.security.KeyStore; | |
import java.security.Security; | |
import java.security.cert.CertificateFactory; | |
import java.security.cert.X509Certificate; |
; a hand-made GIF containing valid JavaScript code | |
; abusing header to start a JavaScript comment | |
; inspired by Saumil Shah's Deadly Pixels presentation | |
; Ange Albertini, BSD Licence 2013 | |
; yamal gifjs.asm -o img.gif | |
WIDTH equ 10799 ; equivalent to 2f2a, which is '/*' in ASCII, thus starting an opening comment |