From: Michael Haas <haas@computerlinguist.org> * init script no longer creates certificates (consider client mode as use case) * patches/010_fix_getnameinfo.patch: Fix getnameinfo signature * patches/011_disable_ssp_linking.patch: Disable -fstack-protector as it is not always available in OpenWRT * old patches (in oldpackages) no longer necessary * remove libwrap dependency * remove libpthread dependency * respect CONFIG_IPV6 * init script uses procd * sample stunnel.conf runs in client mode - prevents start failure, does not require cert Possible enhancement: automatically generate certificate as done in uhttpd. However, as client mode is a possible use case, I'd rather not. Additionally, stunnel may use several certs with user-defined locations and we can't easily set a cert location via command-line args. The package is based on https://sites.google.com/site/twisteroidambassador/openwrt/stunnel Signed-off-by: Michael Haas <haas@computerlinguist.org>
25 lines
904 B
Diff
25 lines
904 B
Diff
--- a/src/prototypes.h
|
|
+++ b/src/prototypes.h
|
|
@@ -559,7 +559,7 @@ extern GETNAMEINFO s_getnameinfo;
|
|
|
|
#endif /* USE_WIN32 */
|
|
|
|
-int getnameinfo(const struct sockaddr *, int, char *, int, char *, int, int);
|
|
+int getnameinfo(const struct sockaddr *, socklen_t, char *, socklen_t, char *, socklen_t, unsigned int);
|
|
|
|
#endif /* !defined HAVE_GETNAMEINFO */
|
|
|
|
--- a/src/resolver.c
|
|
+++ b/src/resolver.c
|
|
@@ -535,8 +535,9 @@ const char *s_gai_strerror(int err) {
|
|
/* implementation is limited to functionality needed by stunnel */
|
|
|
|
#ifndef HAVE_GETNAMEINFO
|
|
-int getnameinfo(const struct sockaddr *sa, int salen,
|
|
- char *host, int hostlen, char *serv, int servlen, int flags) {
|
|
+int getnameinfo(const struct sockaddr *sa, socklen_t salen,
|
|
+ char *host, socklen_t hostlen, char *serv, socklen_t servlen,
|
|
+ unsigned int flags) {
|
|
|
|
#if defined(USE_WIN32) && !defined(_WIN32_WCE)
|
|
if(s_getnameinfo)
|