forked from aniani/gmnisrv
tls: fix crash when opening priv key for writing
The open syscall will return a negative value if the call fails. Switch the check to look for this instead of 0. before: [gmnisrv] generating certificate for localhost gmnisrv: src/tls.c:68: tls_host_gencert: Assertion `pf' failed. abort (core dumped) ./gmnisrv -C config.ini after: [gmnisrv] generating certificate for localhost [gmnisrv] opening private key for writing failed: No such file or directory [gmnisrv] TLS initialization failed Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
7aedbed774
commit
ea40fb5a53
Loading…
Reference in New Issue
Block a user