diff options
Diffstat (limited to 'Makefile-cert.mk')
| -rw-r--r-- | Makefile-cert.mk | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile-cert.mk b/Makefile-cert.mk new file mode 100644 index 0000000..d869999 --- /dev/null +++ b/Makefile-cert.mk | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | cert-req: req.pem | ||
| 2 | cert cert-req: QMAIL/control/clientcert.pem | ||
| 3 | @: | ||
| 4 | |||
| 5 | QMAIL/control/clientcert.pem: QMAIL/control/servercert.pem | ||
| 6 | ln -s $< $@ | ||
| 7 | |||
| 8 | QMAIL/control/servercert.pem: | ||
| 9 | PATH=$$PATH:/usr/local/ssl/bin \ | ||
| 10 | openssl req -new -x509 -nodes -days 366 -out $@ -keyout $@ | ||
| 11 | chmod 640 $@ | ||
| 12 | chown `head -2 conf-users | tail -1`:`head -1 conf-groups` $@ | ||
| 13 | |||
| 14 | req.pem: | ||
| 15 | PATH=$$PATH:/usr/local/ssl/bin openssl req \ | ||
| 16 | -new -nodes -out $@ -keyout QMAIL/control/servercert.pem | ||
| 17 | chmod 640 QMAIL/control/servercert.pem | ||
| 18 | chown `head -2 conf-users | tail -1`:`head -1 conf-groups` QMAIL/control/servercert.pem | ||
| 19 | @echo | ||
| 20 | @echo "Send req.pem to your CA to obtain signed_req.pem, and do:" | ||
| 21 | @echo "cat signed_req.pem >> QMAIL/control/servercert.pem" | ||
