diff tests/test-https.t @ 23048:ee5f834077be stable

merge default into stable for 3.2 freeze
author Matt Mackall <mpm@selenic.com>
date Sat, 18 Oct 2014 18:04:31 -0500
parents 2cd3fa4412dc
children bd72e75f09e7
line wrap: on
line diff
--- a/tests/test-https.t	Fri Oct 10 11:38:00 2014 -0500
+++ b/tests/test-https.t	Sat Oct 18 18:04:31 2014 -0500
@@ -1,6 +1,6 @@
-Proper https client requires the built-in ssl from Python 2.6.
+#require serve ssl
 
-  $ "$TESTDIR/hghave" serve ssl || exit 80
+Proper https client requires the built-in ssl from Python 2.6.
 
 Certificates created with:
  printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \
@@ -115,9 +115,21 @@
 #endif
   $ cd ..
 
+OS X has a dummy CA cert that enables use of the system CA store when using
+Apple's OpenSSL. This trick do not work with plain OpenSSL.
+
+  $ DISABLEOSXDUMMYCERT=
+#if osx
+  $ hg clone https://localhost:$HGPORT/ copy-pull
+  abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
+  [255]
+
+  $ DISABLEOSXDUMMYCERT="--config=web.cacerts="
+#endif
+
 clone via pull
 
-  $ hg clone https://localhost:$HGPORT/ copy-pull
+  $ hg clone https://localhost:$HGPORT/ copy-pull $DISABLEOSXDUMMYCERT
   warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
   requesting all changes
   adding changesets
@@ -143,7 +155,7 @@
   $ cd copy-pull
   $ echo '[hooks]' >> .hg/hgrc
   $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
-  $ hg pull
+  $ hg pull $DISABLEOSXDUMMYCERT
   warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
   pulling from https://localhost:$HGPORT/
   searching for changes