-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Before #9, we used to embed the certificate in a QR code as a URL. The URL led to a GitHub Pages hosted page that shows the certificate. The URL only contained the certificate. An example of this URL is https://cert-manager.github.io/print-your-cert/?asn1=MIICXDC...CAgOgA. This asn1 parameter was the URL-encoded base64-encoded (not wrapped with newlines) DER certificate.
Note
It is possible to turn the certificate back into PEM by running
echo "MIIDBzCCA...LMQswCQYD%0A" | urldecode | base64 -d | openssl asn1parse -inform DERThe benefit of this approach was that we didn't need to store the certificates anywhere. The downside is that the QR code was hard to read for QR code readers (for example, Google Lens).
Thanks to Ash's changes, the certificates' sizes were reduced and I noticed it was possible to fit the cert and key in less space than the old URLs.
| URL size | |
|---|---|
| Before (just cert) | 892 chars |
| After (cert + key) | 885 chars |
In main...maelvls:print-your-cert:bigger-qr-code, I made the QR code label 10% bigger to see if it was easier to read:
Regardless, we chose to go with a URL that points to the Raspberry's UI, of the form:
