summaryrefslogtreecommitdiff
path: root/src/qmail-dksign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmail-dksign.c')
-rw-r--r--src/qmail-dksign.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/qmail-dksign.c b/src/qmail-dksign.c
index 50d1394..e94a561 100644
--- a/src/qmail-dksign.c
+++ b/src/qmail-dksign.c
@@ -65,33 +65,33 @@ buffer bi = BUFFER_INIT(read, 0, bufin, sizeof(bufin));
char bufout[1000];
buffer bo = BUFFER_INIT(write, 1, bufout, sizeof(bufout));
-void die(int e)
+static void die(int e)
{
_exit(e);
}
-void die_write(char *fn)
+static void die_write(char *fn)
{
unlink(fn);
die(53);
}
-void die_read()
+static void die_read()
{
die(54);
}
-void out(char *s)
+static void out(char *s)
{
if (buffer_puts(&bo, s) == -1) _exit(111);
}
-void zero()
+static void zero()
{
if (buffer_put(&bo, "\0", 1) == -1) _exit(111);
}
-void zerodie()
+static void zerodie()
{
zero();
buffer_flush(&bo);
@@ -111,19 +111,19 @@ stralloc ecckey = {0};
stralloc rsakey = {0};
char *dkimparams = 0;
-void temp_nomem()
+static void temp_nomem()
{
out("ZOut of memory. (#4.3.0)\n");
zerodie();
}
-void temp_chdir()
+static void temp_chdir()
{
out("ZUnable to switch to target directory. (#4.3.0)\n");
zerodie();
}
-void temp_create()
+static void temp_create()
{
out("ZUnable to create DKIM stage file: ");
out(error_str(errno));
@@ -132,31 +132,31 @@ void temp_create()
zerodie();
}
-void temp_unlink()
+static void temp_unlink()
{
out("ZUnable to unlink DKIM stage file. (#4.3.0)\n");
zerodie();
}
-void temp_control()
+static void temp_control()
{
out("ZUnable to read DKIM control files. (#4.3.0)\n");
zerodie();
}
-void perm_usage()
+static void perm_usage()
{
out("Zqmail-dksign was invoked improperly. (#5.3.5)\n");
zerodie();
}
-void temp_read()
+static void temp_read()
{
out("DUnable to read message for DKIM signing. (#4.3.0)\n");
zerodie();
}
-void temp_nosignkey()
+static void temp_nosignkey()
{
out("DCan't read sign key: ");
out(rsakey.s);
@@ -166,7 +166,7 @@ void temp_nosignkey()
zerodie();
}
-int get_controls()
+static int get_controls()
{
int i;
stralloc domname = {0};
@@ -225,14 +225,14 @@ int get_controls()
return 0;
}
-void fnmake_dkim(unsigned long id)
+static void fnmake_dkim(unsigned long id)
{
fndkin.len = fmtqfn(fndkin.s, "queue/dkim/", id, 1);
id += id;
fndkout.len = fmtqfn(fndkout.s, "queue/dkim/", id, 1);
}
-void dkim_unlink()
+static void dkim_unlink()
{
if (unlink(fndkin.s) == -1)
if (errno != ENOENT) temp_unlink();
@@ -240,7 +240,7 @@ void dkim_unlink()
if (errno != ENOENT) temp_unlink();
}
-void dkim_stage()
+static void dkim_stage()
{
int r;
int fd;
@@ -307,7 +307,7 @@ stralloc length = {0}; // -l
-z<hash> - set signature type (1=sha1, 2=sha256, 3=both, 4=ed25519, 5=hybrid)
*/
-int dkim_sign(const char *rsakeyfile, const char *ecckeyfile, const char *fnin, const char *fnout)
+static int dkim_sign(const char *rsakeyfile, const char *ecckeyfile, const char *fnin, const char *fnout)
{
int child;
int wstat;
@@ -379,7 +379,7 @@ int dkim_sign(const char *rsakeyfile, const char *ecckeyfile, const char *fnin,
}
}
-int qmail_remote(char **qargs, int fd)
+static int qmail_remote(char **qargs, int fd)
{
int child;
int wstat;
@@ -410,7 +410,7 @@ int qmail_remote(char **qargs, int fd)
}
}
-void dkim_setup()
+static void dkim_setup()
{
int c, i, j, k, l;
char *opt, *pos;