aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2023-11-07 00:33:38 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2023-11-07 21:55:55 +0100
commit6aad5ab0992fefd88ce612bc0484e0115a004572 (patch)
treeabac2d2e7d9b23596ebee8b8c3aec225bf10e4c5 /target/linux
parent929c9a58c9a17a3ca8d2a3be0c5dc4ac98e848e2 (diff)
downloadupstream-6aad5ab0992fefd88ce612bc0484e0115a004572.tar.gz
upstream-6aad5ab0992fefd88ce612bc0484e0115a004572.tar.bz2
upstream-6aad5ab0992fefd88ce612bc0484e0115a004572.zip
px5g-wolfssl: 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.* -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>
Diffstat (limited to 'target/linux')
0 files changed, 0 insertions, 0 deletions