]> git.pld-linux.org Git - packages/courier.git/blame - courier-certs.patch
- updated to 0.78.3
[packages/courier.git] / courier-certs.patch
CommitLineData
9754ea44
JB
1--- courier-0.78.2.orig/courier/configure.ac 2010-01-09 22:13:40.000000000 +0100
2+++ courier-0.78.2/courier/configure.ac 2010-05-08 23:31:10.355976183 +0200
d17b8ca4 3@@ -480,6 +480,12 @@
5d26edcf 4 eval "datarootdir=$datarootdir"
c2c7a750 5 eval "bindir=$bindir"
5d26edcf 6 eval "localstatedir=$localstatedir"
69e1f9b1
AA
7+eval "datadir=$datadir"
8+
c2c7a750 9+AC_ARG_WITH(certsdir, [ --with-certsdir Directory where certs are created ],
69e1f9b1 10+certsdir="$withval", certsdir=$datadir)
c2c7a750
AA
11+
12+AC_SUBST(certsdir)
69e1f9b1 13
c2c7a750
AA
14 MAILDROP="$bindir/maildrop"
15 AC_SUBST(MAILDROP)
9754ea44
JB
16--- courier-0.78.2.orig/courier/imapd-ssl.rc.in 2010-05-08 23:30:54.599915374 +0200
17+++ courier-0.78.2/courier/imapd-ssl.rc.in 2010-05-08 23:31:10.355976183 +0200
c2c7a750
AA
18@@ -28,6 +28,11 @@
19
20 case $1 in
21 start)
33c18667
AA
22+ # If we do not have a certificate, make one up.
23+ if [ ! -f @certsdir@/imapd.pem ]; then
24+ @sbindir@/mkimapdcert
25+ fi
c2c7a750 26+
33c18667
AA
27 umask $IMAP_UMASK
28 @ULIMIT@ $IMAP_ULIMITD
29 @SETENV@ -i @SHELL@ -c " set -a ;
9754ea44
JB
30--- courier-0.78.2.orig/courier/module.esmtp/configure.ac 2008-07-12 22:17:24.000000000 +0200
31+++ courier-0.78.2/courier/module.esmtp/configure.ac 2010-05-08 23:31:10.355976183 +0200
d17b8ca4 32@@ -287,6 +287,11 @@
5d26edcf 33 AC_SUBST(mydatadir) # Quell automake warning
34
c2c7a750
AA
35
36+AC_ARG_WITH(certsdir, [ --with-certsdir Directory where certs are created ],
b3795f4c 37+certsdir="$withval", certsdir=$datadir)
c2c7a750
AA
38+
39+AC_SUBST(certsdir)
40+
41 dnl
42 dnl Check what libraries are available
43 dnl
9754ea44
JB
44--- courier-0.78.2.orig/courier/module.esmtp/esmtpd.dist.in 2010-02-02 23:30:00.000000000 +0100
45+++ courier-0.78.2/courier/module.esmtp/esmtpd.dist.in 2010-05-08 23:31:10.355976183 +0200
d17b8ca4 46@@ -242,7 +242,7 @@
3d35ebab 47 #
5d26edcf 48 # This is an experimental feature.
49
50-TLS_CERTFILE=@mydatadir@/esmtpd.pem
3d35ebab
AA
51+TLS_CERTFILE=@certsdir@/esmtpd.pem
52
d17b8ca4 53 ##NAME: TLS_TRUSTCERTS:0
3d35ebab 54 #
9754ea44
JB
55--- courier-0.78.2.orig/courier/module.esmtp/esmtpd-ssl.dist.in 2010-02-02 23:30:00.000000000 +0100
56+++ courier-0.78.2/courier/module.esmtp/esmtpd-ssl.dist.in 2010-05-08 23:31:10.355976183 +0200
d17b8ca4 57@@ -269,7 +269,7 @@
c2c7a750 58 #
5d26edcf 59 # This is an experimental feature.
60
61-TLS_CERTFILE=@mydatadir@/esmtpd.pem
c2c7a750
AA
62+TLS_CERTFILE=@certsdir@/esmtpd.pem
63
64 ##NAME: TLS_TRUSTCERTS:0
65 #
9754ea44
JB
66--- courier-0.78.2.orig/courier/module.esmtp/esmtpd-ssl.in 2010-05-08 23:30:54.612778263 +0200
67+++ courier-0.78.2/courier/module.esmtp/esmtpd-ssl.in 2010-05-08 23:31:10.355976183 +0200
c2c7a750
AA
68@@ -25,6 +25,10 @@
69
70 case $1 in
71 start)
72+ # If we do not have a certificate, make one up.
73+ if [ ! -f @certsdir@/esmtpd.pem ]; then
74+ @sbindir@/mkesmtpdcert
75+ fi
76 ;;
77 stop)
78 ${sbindir}/couriertcpd -pid=$SSLPIDFILE -stop
9754ea44
JB
79--- courier-0.78.2/courier/module.esmtp/mkesmtpdcert.in.orig 2018-03-25 10:15:59.986631408 +0200
80+++ courier-0.78.2/courier/module.esmtp/mkesmtpdcert.in 2018-03-25 11:27:37.983248999 +0200
81@@ -11,7 +11,7 @@
82 PEMFILE="$1"
83
84 if [ -z "$PEMFILE" ]; then
85- PEMFILE=@mydatadir@/esmtpd.pem
86+ PEMFILE=@certsdir@/esmtpd.pem
5d26edcf 87 fi
69e1f9b1 88
9754ea44
JB
89 if test "@ssllib@" = "openssl"
90@@ -35,7 +35,7 @@
69e1f9b1
AA
91 exit 1
92 }
93
5d26edcf 94-cd @mydatadir@
95+cd @certsdir@
9754ea44
JB
96 umask 077
97 BITS="$BITS"
98 set -e
99@@ -50,7 +50,7 @@
100 -config @sysconfdir@/esmtpd.cnf -out "$PEMFILE" -keyout "$PEMFILE" || cleanup
101 @OPENSSL@ dhparam -2 -rand "$PEMFILE".rand 512 >>"$PEMFILE" || cleanup
102 @OPENSSL@ x509 -subject -dates -fingerprint -noout -in "$PEMFILE" || cleanup
5d26edcf 103- rm -f @mydatadir@/esmtpd.rand
5d26edcf 104+ rm -f @certsdir@/esmtpd.rand
105 else
9754ea44
JB
106 if test "$BITS" = ""
107 then
108--- courier-0.78.2.orig/courier/pop3d-ssl.in 2010-05-08 23:30:54.612778263 +0200
109+++ courier-0.78.2/courier/pop3d-ssl.in 2010-05-08 23:31:10.355976183 +0200
c2c7a750
AA
110@@ -29,6 +29,11 @@
111
112 case $1 in
113 start)
33c18667
AA
114+ # If we do not have a certificate, make one up.
115+ if [ ! -f @certsdir@/pop3d.pem ]; then
116+ @sbindir@/mkpop3dcert
117+ fi
c2c7a750 118+
33c18667
AA
119 exec @SETENV@ -i PATH="$PATH" SHELL="$SHELL" \
120 @SHELL@ -c " set -a ; \
121 prefix=@prefix@ ; \
9754ea44
JB
122--- courier-0.78.2.orig/courier.sysvinit.in 2010-05-08 23:30:54.612778263 +0200
123+++ courier-0.78.2/courier.sysvinit.in 2010-05-08 23:31:10.355976183 +0200
5d26edcf 124@@ -18,7 +18,7 @@
c2c7a750
AA
125 sbindir="@sbindir@"
126 bindir="@bindir@"
127 libexecdir="@libexecdir@"
128-datadir="@datadir@"
129+certsdir="@certsdir@"
130
131 if test ! -f ${sysconfdir}/esmtpd
132 then
5d26edcf 133@@ -85,7 +85,7 @@
c2c7a750
AA
134 then
135 # If we do not have a certificate, make one up.
136
137- if test ! -f ${datadir}/esmtpd.pem
138+ if test ! -f ${certsdir}/esmtpd.pem
139 then
140 if test -x $COURIERTLS
141 then
5d26edcf 142@@ -152,7 +152,7 @@
c2c7a750
AA
143 then
144 # If we do not have a certificate, make one up.
145
146- if test ! -f ${datadir}/pop3d.pem
147+ if test ! -f ${certsdir}/pop3d.pem
148 then
149 echo -n " generating-POP3-SSL-certificate..."
150
5d26edcf 151@@ -182,7 +182,7 @@
c2c7a750
AA
152 then
153 # If we do not have a certificate, make one up.
154
155- if test ! -f ${datadir}/imapd.pem
156+ if test ! -f ${certsdir}/imapd.pem
157 then
158 echo -n " generating-IMAP-SSL-certificate..."
159
This page took 0.061737 seconds and 4 git commands to generate.