1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00

facilio: openssl exit codes suggested by @CoalNova

This commit is contained in:
Rene Schallner 2023-12-29 16:13:58 +01:00
parent 62fc16aaac
commit ff1a0a2174
2 changed files with 6 additions and 6 deletions

View file

@ -31,7 +31,7 @@ Feel free to copy, use and enjoy according to the license provided.
#undef REQUIRE_LIBRARY #undef REQUIRE_LIBRARY
#define REQUIRE_LIBRARY() \ #define REQUIRE_LIBRARY() \
FIO_LOG_FATAL("No supported SSL/TLS library available."); \ FIO_LOG_FATAL("No supported SSL/TLS library available."); \
exit(-1); exit(202); // CoalNova's suggestion. Was: -1
#endif #endif
/* STOP deleting after this line */ /* STOP deleting after this line */
@ -514,7 +514,7 @@ void FIO_TLS_WEAK fio_tls_cert_add(fio_tls_s *tls, const char *server_name,
file_missing: file_missing:
FIO_LOG_FATAL("TLS certificate file missing for either %s or %s or both.", FIO_LOG_FATAL("TLS certificate file missing for either %s or %s or both.",
key, cert); key, cert);
exit(-1); exit(203); // CoalNova's suggestion. Was: -1
} }
/** /**
@ -575,7 +575,7 @@ void FIO_TLS_WEAK fio_tls_trust(fio_tls_s *tls, const char *public_cert_file) {
return; return;
file_missing: file_missing:
FIO_LOG_FATAL("TLS certificate file missing for %s ", public_cert_file); FIO_LOG_FATAL("TLS certificate file missing for %s ", public_cert_file);
exit(-1); exit(204); // CoalNova's suggestion. was: -1.
} }
/** /**

View file

@ -14,7 +14,7 @@ Feel free to copy, use and enjoy according to the license provided.
*/ */
#include "fio_tls.h" #include "fio_tls.h"
#if HAVE_OPENSSL #ifdef HAVE_OPENSSL
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/ssl.h> #include <openssl/ssl.h>
@ -889,7 +889,7 @@ void FIO_TLS_WEAK fio_tls_cert_add(fio_tls_s *tls, const char *server_name,
file_missing: file_missing:
FIO_LOG_FATAL("TLS certificate file missing for either %s or %s or both.", FIO_LOG_FATAL("TLS certificate file missing for either %s or %s or both.",
key, cert); key, cert);
exit(-1); exit(200); // CoalNova's suggestion. Was: -1
} }
/** /**
@ -952,7 +952,7 @@ void FIO_TLS_WEAK fio_tls_trust(fio_tls_s *tls, const char *public_cert_file) {
return; return;
file_missing: file_missing:
FIO_LOG_FATAL("TLS certificate file missing for %s ", public_cert_file); FIO_LOG_FATAL("TLS certificate file missing for %s ", public_cert_file);
exit(-1); exit(201); // CoalNova's suggestion. Was: -1
} }
/** /**