aboutsummaryrefslogtreecommitdiff
path: root/package/utils/px5g-wolfssl/px5g-wolfssl.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2023-11-05 23:05:24 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2023-11-07 21:55:55 +0100
commit929c9a58c9a17a3ca8d2a3be0c5dc4ac98e848e2 (patch)
treec996fbc4c346e89a2946decb66c56b1df3ab2cef /package/utils/px5g-wolfssl/px5g-wolfssl.c
parent7a8424827ff1e34503e70708f3c41d286d5aa94d (diff)
px5g-mbedtls: Fix permission of private key
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.crt /etc/uhttpd.key -rw-r--r-- 1 root root 519 Nov 6 22:58 /etc/uhttpd.crt -rw------- 1 root root 121 Nov 6 22:58 /etc/uhttpd.key Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/utils/px5g-wolfssl/px5g-wolfssl.c')
0 files changed, 0 insertions, 0 deletions