tests/test-https.t
branchstable
changeset 13192 4d03707916d3
parent 13163 2fa2e6444645
child 13231 b335882c2f21
equal deleted inserted replaced
13188:6c9345f9edca 13192:4d03707916d3
   124   $ echo bar > bar
   124   $ echo bar > bar
   125   $ hg commit -A -d '1 0' -m 2
   125   $ hg commit -A -d '1 0' -m 2
   126   adding bar
   126   adding bar
   127   $ cd ..
   127   $ cd ..
   128 
   128 
   129 pull
   129 pull without cacert
   130 
   130 
   131   $ cd copy-pull
   131   $ cd copy-pull
   132   $ echo '[hooks]' >> .hg/hgrc
   132   $ echo '[hooks]' >> .hg/hgrc
   133   $ echo "changegroup = python '$TESTDIR'/printenv.py changegroup" >> .hg/hgrc
   133   $ echo "changegroup = python '$TESTDIR'/printenv.py changegroup" >> .hg/hgrc
   134   $ hg pull
   134   $ hg pull
   141   adding file changes
   141   adding file changes
   142   added 1 changesets with 1 changes to 1 files
   142   added 1 changesets with 1 changes to 1 files
   143   (run 'hg update' to get a working copy)
   143   (run 'hg update' to get a working copy)
   144   $ cd ..
   144   $ cd ..
   145 
   145 
   146 cacert
   146 cacert configured in local repo
   147 
   147 
   148   $ hg -R copy-pull pull --config web.cacerts=pub.pem
   148   $ cp copy-pull/.hg/hgrc copy-pull/.hg/hgrc.bu
       
   149   $ echo "[web]" >> copy-pull/.hg/hgrc
       
   150   $ echo "cacerts=`pwd`/pub.pem" >> copy-pull/.hg/hgrc
       
   151   $ hg -R copy-pull pull --traceback
   149   pulling from https://localhost:$HGPORT/
   152   pulling from https://localhost:$HGPORT/
   150   searching for changes
   153   searching for changes
   151   no changes found
   154   no changes found
       
   155   $ mv copy-pull/.hg/hgrc.bu copy-pull/.hg/hgrc
       
   156 
       
   157 cacert configured globally
       
   158 
       
   159   $ echo "[web]" >> $HGRCPATH
       
   160   $ echo "cacerts=`pwd`/pub.pem" >> $HGRCPATH
       
   161   $ hg -R copy-pull pull
       
   162   pulling from https://localhost:$HGPORT/
       
   163   searching for changes
       
   164   no changes found
       
   165 
       
   166 cacert mismatch
       
   167 
   152   $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/
   168   $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/
   153   abort: 127.0.0.1 certificate error: certificate is for localhost
   169   abort: 127.0.0.1 certificate error: certificate is for localhost
   154   [255]
   170   [255]
   155   $ hg -R copy-pull pull --config web.cacerts=pub-other.pem
   171   $ hg -R copy-pull pull --config web.cacerts=pub-other.pem
   156   abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
   172   abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)