]> git.pld-linux.org Git - packages/courier.git/blame - courier-certs.patch
- rediff patches
[packages/courier.git] / courier-certs.patch
CommitLineData
a16d6ff9
JR
1diff -urNp -x '*.orig' courier-1.0.9.org/courier/configure.ac courier-1.0.9/courier/configure.ac
2--- courier-1.0.9.org/courier/configure.ac 2019-06-08 15:03:56.000000000 +0200
3+++ courier-1.0.9/courier/configure.ac 2021-05-07 22:54:47.564469723 +0200
4@@ -472,6 +472,12 @@ eval "exec_prefix=$exec_prefix"
5d26edcf 5 eval "datarootdir=$datarootdir"
c2c7a750 6 eval "bindir=$bindir"
5d26edcf 7 eval "localstatedir=$localstatedir"
69e1f9b1
AA
8+eval "datadir=$datadir"
9+
c2c7a750 10+AC_ARG_WITH(certsdir, [ --with-certsdir Directory where certs are created ],
69e1f9b1 11+certsdir="$withval", certsdir=$datadir)
c2c7a750
AA
12+
13+AC_SUBST(certsdir)
69e1f9b1 14
c2c7a750
AA
15 MAILDROP="$bindir/maildrop"
16 AC_SUBST(MAILDROP)
a16d6ff9
JR
17diff -urNp -x '*.orig' courier-1.0.9.org/courier/imapd-ssl.rc.in courier-1.0.9/courier/imapd-ssl.rc.in
18--- courier-1.0.9.org/courier/imapd-ssl.rc.in 2021-05-07 22:54:46.201129431 +0200
19+++ courier-1.0.9/courier/imapd-ssl.rc.in 2021-05-07 22:54:47.564469723 +0200
20@@ -27,6 +27,12 @@ fi
c2c7a750
AA
21
22 case $1 in
23 start)
6d61614b
JB
24+ # If we do not have a certificate, make one up.
25+ if test ! -f @certsdir@/imapd.pem
26+ then
27+ @sbindir@/mkimapdcert
28+ fi
c2c7a750 29+
6d61614b
JB
30 if test "$TLS_CACHEFILE" != ""
31 then
32 rm -f "$TLS_CACHEFILE"
a16d6ff9
JR
33diff -urNp -x '*.orig' courier-1.0.9.org/courier/module.esmtp/configure.ac courier-1.0.9/courier/module.esmtp/configure.ac
34--- courier-1.0.9.org/courier/module.esmtp/configure.ac 2018-07-29 05:16:41.000000000 +0200
35+++ courier-1.0.9/courier/module.esmtp/configure.ac 2021-05-07 22:54:47.564469723 +0200
36@@ -288,6 +288,11 @@ mydatadir="$datadir"
5d26edcf 37 AC_SUBST(mydatadir) # Quell automake warning
38
c2c7a750
AA
39
40+AC_ARG_WITH(certsdir, [ --with-certsdir Directory where certs are created ],
b3795f4c 41+certsdir="$withval", certsdir=$datadir)
c2c7a750
AA
42+
43+AC_SUBST(certsdir)
44+
45 dnl
46 dnl Check what libraries are available
47 dnl
a16d6ff9
JR
48diff -urNp -x '*.orig' courier-1.0.9.org/courier/module.esmtp/esmtpd-ssl.dist.in courier-1.0.9/courier/module.esmtp/esmtpd-ssl.dist.in
49--- courier-1.0.9.org/courier/module.esmtp/esmtpd-ssl.dist.in 2018-11-10 01:50:19.000000000 +0100
50+++ courier-1.0.9/courier/module.esmtp/esmtpd-ssl.dist.in 2021-05-07 22:54:47.567803074 +0200
51@@ -236,7 +236,7 @@ COURIERTLS=@bindir@/couriertls
52 # In all cases, $TLS_CERTFILE needs to be linked to one of the existing
53 # certificate files.
5d26edcf 54
55-TLS_CERTFILE=@mydatadir@/esmtpd.pem
c2c7a750
AA
56+TLS_CERTFILE=@certsdir@/esmtpd.pem
57
a16d6ff9 58 ##NAME: TLS_PRIVATE_KEYFILE:0
c2c7a750 59 #
a16d6ff9
JR
60diff -urNp -x '*.orig' courier-1.0.9.org/courier/module.esmtp/esmtpd-ssl.in courier-1.0.9/courier/module.esmtp/esmtpd-ssl.in
61--- courier-1.0.9.org/courier/module.esmtp/esmtpd-ssl.in 2021-05-07 22:54:46.201129431 +0200
62+++ courier-1.0.9/courier/module.esmtp/esmtpd-ssl.in 2021-05-07 22:54:47.567803074 +0200
63@@ -24,6 +24,10 @@ export SHELL
c2c7a750
AA
64
65 case $1 in
66 start)
67+ # If we do not have a certificate, make one up.
68+ if [ ! -f @certsdir@/esmtpd.pem ]; then
69+ @sbindir@/mkesmtpdcert
70+ fi
71 ;;
72 stop)
73 ${sbindir}/couriertcpd -pid=$SSLPIDFILE -stop
a16d6ff9
JR
74diff -urNp -x '*.orig' courier-1.0.9.org/courier/module.esmtp/esmtpd.dist.in courier-1.0.9/courier/module.esmtp/esmtpd.dist.in
75--- courier-1.0.9.org/courier/module.esmtp/esmtpd.dist.in 2018-11-10 01:50:19.000000000 +0100
76+++ courier-1.0.9/courier/module.esmtp/esmtpd.dist.in 2021-05-07 22:54:47.564469723 +0200
77@@ -211,7 +211,7 @@ COURIERTLS=@bindir@/couriertls
78 # In all cases, $TLS_CERTFILE needs to be linked to one of the existing
79 # certificate files.
80
81-TLS_CERTFILE=@mydatadir@/esmtpd.pem
82+TLS_CERTFILE=@certsdir@/esmtpd.pem
83
84 ##NAME: TLS_DHPARAMS:0
85 #
86diff -urNp -x '*.orig' courier-1.0.9.org/courier/module.esmtp/mkesmtpdcert.in courier-1.0.9/courier/module.esmtp/mkesmtpdcert.in
87--- courier-1.0.9.org/courier/module.esmtp/mkesmtpdcert.in 2017-01-28 04:06:06.000000000 +0100
88+++ courier-1.0.9/courier/module.esmtp/mkesmtpdcert.in 2021-05-07 22:54:47.567803074 +0200
9754ea44
JB
89@@ -11,7 +11,7 @@
90 PEMFILE="$1"
91
92 if [ -z "$PEMFILE" ]; then
93- PEMFILE=@mydatadir@/esmtpd.pem
94+ PEMFILE=@certsdir@/esmtpd.pem
5d26edcf 95 fi
69e1f9b1 96
9754ea44 97 if test "@ssllib@" = "openssl"
a16d6ff9 98@@ -35,7 +35,7 @@ cleanup() {
69e1f9b1
AA
99 exit 1
100 }
101
5d26edcf 102-cd @mydatadir@
103+cd @certsdir@
9754ea44
JB
104 umask 077
105 BITS="$BITS"
106 set -e
a16d6ff9 107@@ -50,7 +50,7 @@ then
9754ea44
JB
108 -config @sysconfdir@/esmtpd.cnf -out "$PEMFILE" -keyout "$PEMFILE" || cleanup
109 @OPENSSL@ dhparam -2 -rand "$PEMFILE".rand 512 >>"$PEMFILE" || cleanup
110 @OPENSSL@ x509 -subject -dates -fingerprint -noout -in "$PEMFILE" || cleanup
5d26edcf 111- rm -f @mydatadir@/esmtpd.rand
5d26edcf 112+ rm -f @certsdir@/esmtpd.rand
113 else
9754ea44
JB
114 if test "$BITS" = ""
115 then
a16d6ff9
JR
116diff -urNp -x '*.orig' courier-1.0.9.org/courier/pop3d-ssl.in courier-1.0.9/courier/pop3d-ssl.in
117--- courier-1.0.9.org/courier/pop3d-ssl.in 2021-05-07 22:54:46.201129431 +0200
118+++ courier-1.0.9/courier/pop3d-ssl.in 2021-05-07 22:54:47.567803074 +0200
119@@ -28,6 +28,12 @@ fi
c2c7a750
AA
120
121 case $1 in
122 start)
6d61614b
JB
123+ # If we do not have a certificate, make one up.
124+ if test ! -f @certsdir@/pop3d.pem
125+ then
126+ @sbindir@/mkpop3dcert
127+ fi
c2c7a750 128+
6d61614b
JB
129 if test "$TLS_CACHEFILE" != ""
130 then
131 rm -f "$TLS_CACHEFILE"
a16d6ff9
JR
132diff -urNp -x '*.orig' courier-1.0.9.org/courier.sysvinit.in courier-1.0.9/courier.sysvinit.in
133--- courier-1.0.9.org/courier.sysvinit.in 2021-05-07 22:54:46.201129431 +0200
134+++ courier-1.0.9/courier.sysvinit.in 2021-05-07 22:54:47.567803074 +0200
135@@ -18,7 +18,7 @@ sysconfdir="@sysconfdir@"
c2c7a750
AA
136 sbindir="@sbindir@"
137 bindir="@bindir@"
138 libexecdir="@libexecdir@"
139-datadir="@datadir@"
140+certsdir="@certsdir@"
141
142 if test ! -f ${sysconfdir}/esmtpd
143 then
a16d6ff9 144@@ -92,7 +92,7 @@ start)
c2c7a750
AA
145 then
146 # If we do not have a certificate, make one up.
147
148- if test ! -f ${datadir}/esmtpd.pem
149+ if test ! -f ${certsdir}/esmtpd.pem
150 then
151 if test -x $COURIERTLS
152 then
a16d6ff9 153@@ -159,7 +159,7 @@ start)
c2c7a750
AA
154 then
155 # If we do not have a certificate, make one up.
156
157- if test ! -f ${datadir}/pop3d.pem
158+ if test ! -f ${certsdir}/pop3d.pem
159 then
160 echo -n " generating-POP3-SSL-certificate..."
161
a16d6ff9 162@@ -189,7 +189,7 @@ start)
c2c7a750
AA
163 then
164 # If we do not have a certificate, make one up.
165
166- if test ! -f ${datadir}/imapd.pem
167+ if test ! -f ${certsdir}/imapd.pem
168 then
169 echo -n " generating-IMAP-SSL-certificate..."
170
This page took 0.097372 seconds and 4 git commands to generate.