Mercurial > hg
view doc/Makefile @ 18888:19d489404d79
smtp: verify the certificate of the SMTP server for STARTTLS/SMTPS
Before this patch, the certificate of the SMTP server for STARTTLS or
SMTPS isn't verified.
This may cause man-in-the-middle security problem (stealing
authentication information), even though SMTP channel itself is
encrypted by SSL.
When "[smtp] tls" is configured as "smtps" or "starttls", this patch:
- uses classes introduced by preceding patches instead of "SMTP" or
"SMTP_SSL" of smtplib, and
- verifies the certificate of the SMTP server, if "[smtp]
verifycert" is configured as other than False
"[smtp] verifycert" can be configured in 3 levels:
- "strict":
This verifies peer certificate, and aborts if:
- peer certification is not valid, or
- no configuration in "[hostfingerprints]" and "[web] cacerts"
This is default value of "[smtp] verifycert" for security.
- "loose":
This verifies peer certificate, and aborts if peer certification is
not valid.
This just shows warning message ("certificate not verified"), if
there is no configuration in "[hostfingerprints]" and "[web]
cacerts".
This is as same as verification for HTTPS connection.
- False(no verification):
Peer certificate is not verified.
This is as same as the behavior before this patch series.
"hg email --insecure" uses "loose" level, and ignores "[web] cacerts"
as same as push/pull/etc... with --insecure.
Ignoring "[web] cacerts" configuration for "hg email --insecure" is
already done in "dispatch._dispatch()" by looking "insecure" up in the
table of command options.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 26 Mar 2013 02:28:10 +0900 |
parents | 323c11dad9c6 |
children | 81fbd4e66ff5 |
line wrap: on
line source
SOURCES=$(wildcard *.[0-9].txt) MAN=$(SOURCES:%.txt=%) HTML=$(SOURCES:%.txt=%.html) GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py \ ../mercurial/help/*.txt ../hgext/*.py ../hgext/*/__init__.py PREFIX=/usr/local MANDIR=$(PREFIX)/share/man INSTALL=install -c -m 644 PYTHON=python RSTARGS= export LANGUAGE=C export LC_ALL=C all: man html man: $(MAN) html: $(HTML) hg.1.txt: hg.1.gendoc.txt touch hg.1.txt hg.1.gendoc.txt: $(GENDOC) ${PYTHON} gendoc.py > $@.tmp mv $@.tmp $@ hgrc.5: ../mercurial/help/config.txt hgrc.5.html: ../mercurial/help/config.txt %: %.txt common.txt $(PYTHON) runrst hgmanpage $(RSTARGS) --halt warning \ --strip-elements-with-class htmlonly $*.txt $* %.html: %.txt common.txt $(PYTHON) runrst html $(RSTARGS) --halt warning \ --link-stylesheet --stylesheet-path style.css $*.txt $*.html MANIFEST: man html # tracked files are already in the main MANIFEST $(RM) $@ for i in $(MAN) $(HTML); do \ echo "doc/$$i" >> $@ ; \ done install: man for i in $(MAN) ; do \ subdir=`echo $$i | sed -n 's/^.*\.\([0-9]\)$$/man\1/p'` ; \ mkdir -p $(DESTDIR)$(MANDIR)/$$subdir ; \ $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \ done clean: $(RM) $(MAN) $(HTML) hg.1.gendoc.txt MANIFEST