aboutsummaryrefslogtreecommitdiff
path: root/package/utils/px5g-wolfssl/px5g-wolfssl.c
Commit message (Collapse)AuthorAge
* px5g-wolfssl: Fix permission of private keyHauke Mehrtens2023-11-07
| | | | | | | | | | | | | | | | | Store the private key with read and write permission for the user only and not with read permissions for everyone. This converts the write_file() function from fopen() to open() because open allows to specify the permission mask of the newly created file. It also adds and fixes some existing error handling. OpenSSL does this in the same way already. With this change it looks like this: root@OpenWrt:/# ls -al /etc/uhttpd.* -rw-r--r-- 1 root root 749 Nov 6 23:14 /etc/uhttpd.crt -rw------- 1 root root 121 Nov 6 23:14 /etc/uhttpd.key Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* px5g-wolfssl: replace unnecessary strncmp()Jian Huang2022-09-11
| | | | | | Replace some of the calls to strncmp() with strcmp(). Signed-off-by: Jian Huang <JyanHw@outlook.com>
* utils/px5g-wolfssl: make selfsigned certicates compatible with chromiumSergey V. Lobanov2021-12-29
| | | | | | | | | | | | | | Chromium based web-browsers (version >58) checks x509v3 extended attributes. If this check fails then chromium does not allow to click "Proceed to ... (unsafe)" link. This patch add three x509v3 extended attributes to self-signed certificate: 1. SAN (Subject Alternative Name) (DNS Name) = CN (common name) 2. Key Usage = Digital Signature, Non Repudiation, Key Encipherment 3. Extended Key Usage = TLS Web Server Authentication SAN will be added only if CONFIG_WOLFSSL_ALT_NAMES=y Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
* px5g-wolfssl: Fix certificate signatureJeffrey Elms2021-01-26
| | | | | | | | | | Certificate signature algorithm was being set after call to `wc_MakeCert`, resulting in a mismatch between specified signature in certificate and the actual signature type. Signed-off-by: Jeffrey Elms <jeff@wolfssl.com> [fix commit subject, use COMMITCOUNT] Signed-off-by: Paul Spooren <mail@aparcar.org>
* px5g-wolfssl: cleanup Makefile and SPDX licensePaul Spooren2020-08-31
| | | | | | | Minor cosmetic cleanups of the Makefile and add a SPDX compatible license headers. Signed-off-by: Paul Spooren <mail@aparcar.org>
* px5g-wolfssl: add packagePaul Spooren2020-08-31
This package creates certificates and private keys, just like `px5g` does. Hower it uses WolfSSL rather than MbedTLS. Signed-off-by: Paul Spooren <mail@aparcar.org>