1
1

Initial dump from Zyxel

This commit is contained in:
2026-04-17 17:00:52 +02:00
commit 81fec250f4
23116 changed files with 5231237 additions and 0 deletions
@@ -0,0 +1,46 @@
Index: mailsend-1.17b15/smtp.c
===================================================================
--- mailsend-1.17b15.orig/smtp.c 2014-05-26 02:24:43.000000000 +0800
+++ mailsend-1.17b15/smtp.c 2017-03-29 13:37:43.317648230 +0800
@@ -51,9 +51,33 @@
}
else
{
+#if 1 /* Zyxel, if user not select protocol, query IPv4 address at first, try IPv6 if fail. */
+ showVerbose("Use IPv4 address of SMTP server at first, try IPv6 if fail.\n");
+#else
showVerbose("Will detect IPv4 or IPv6 automatically\n");
+#endif
}
+#if 1 /* Zyxel, if user not select protocol, query IPv4 address at first, try IPv6 if fail. */
+ if(g_use_protocol == MSOCK_USE_AUTO)
+ {
+ sfd=clientSocket(MSOCK_USE_IPV4, smtp_server,port, g_connect_timeout);
+ if (sfd == INVALID_SOCKET)
+ {
+ sfd=clientSocket(MSOCK_USE_IPV6, smtp_server,port, g_connect_timeout);
+ if (sfd == INVALID_SOCKET)
+ {
+ errorMsg("Could not connect to SMTP server \"%s\" at port %d",
+ smtp_server,port);
+ return (INVALID_SOCKET);
+ }
+ }
+ }
+ else
+ {
+ sfd=clientSocket(g_use_protocol, smtp_server,port, g_connect_timeout);
+ }
+#else
sfd=clientSocket(g_use_protocol, smtp_server,port, g_connect_timeout);
if (sfd == INVALID_SOCKET)
{
@@ -61,6 +85,7 @@
smtp_server,port);
return (INVALID_SOCKET);
}
+#endif
/* set the socket to msock lib's static place, not thread safe*/
msock_set_socket(sfd);
@@ -0,0 +1,37 @@
Index: mailsend-1.17b15/utils.c
===================================================================
--- mailsend-1.17b15.orig/utils.c 2014-05-26 02:24:43.000000000 +0800
+++ mailsend-1.17b15/utils.c 2020-02-07 12:01:36.906823900 +0800
@@ -791,8 +791,13 @@
unsigned char
hmac_md5[16];
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
HMAC_CTX
ctx;
+#else
+ HMAC_CTX
+ *ctx;
+#endif
const EVP_MD
*md5=NULL;
@@ -831,11 +836,18 @@
showVerbose("Challenge After decoding: %s\n",data);
/* take HMAC-MD5 of the challenge*/
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
md5=EVP_get_digestbyname("md5");
HMAC_CTX_init(&ctx);
HMAC_Init(&ctx,secret,strlen(secret),md5);
HMAC_Update(&ctx,data,data_len);
HMAC_Final(&ctx,hmac_md5,&hmac_len);
+#else
+ ctx = HMAC_CTX_new();
+ HMAC_Init_ex(ctx,secret,strlen(secret),EVP_md5(),NULL);
+ HMAC_Update(ctx,data,data_len);
+ HMAC_Final(ctx,hmac_md5,&hmac_len);
+#endif
/* convert the digest to hex */
memset(hex,0,sizeof(hex));