tests/test-https.t
changeset 33381 3bdbbadddecc
parent 32273 2e455cbeac50
child 33422 ba971f555cb0
equal deleted inserted replaced
33380:892d255ec2a1 33381:3bdbbadddecc
   590 
   590 
   591   $ killdaemons.py hg0.pid
   591   $ killdaemons.py hg0.pid
   592 
   592 
   593 #if sslcontext
   593 #if sslcontext
   594 
   594 
       
   595   $ cd test
       
   596 
       
   597 Missing certificate file(s) are detected
       
   598 
       
   599   $ hg serve -p $HGPORT --certificate=/missing/certificate \
       
   600   > --config devel.servercafile=$PRIV --config devel.serverrequirecert=true
       
   601   abort: referenced certificate file (/missing/certificate) does not exist
       
   602   [255]
       
   603 
       
   604   $ hg serve -p $HGPORT --certificate=$PRIV \
       
   605   > --config devel.servercafile=/missing/cafile --config devel.serverrequirecert=true
       
   606   abort: referenced certificate file (/missing/cafile) does not exist
       
   607   [255]
       
   608 
   595 Start hgweb that requires client certificates:
   609 Start hgweb that requires client certificates:
   596 
   610 
   597   $ cd test
       
   598   $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV \
   611   $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV \
   599   > --config devel.servercafile=$PRIV --config devel.serverrequirecert=true
   612   > --config devel.servercafile=$PRIV --config devel.serverrequirecert=true
   600   $ cat ../hg0.pid >> $DAEMON_PIDS
   613   $ cat ../hg0.pid >> $DAEMON_PIDS
   601   $ cd ..
   614   $ cd ..
   602 
   615 
   629   $ env P="$CERTSDIR" hg id https://localhost:$HGPORT/
   642   $ env P="$CERTSDIR" hg id https://localhost:$HGPORT/
   630   warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
   643   warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
   631   abort: error: * (glob)
   644   abort: error: * (glob)
   632   [255]
   645   [255]
   633 
   646 
   634 #endif
   647 Missing certficate and key files result in error
       
   648 
       
   649   $ hg id https://localhost:$HGPORT/ --config auth.l.cert=/missing/cert
       
   650   abort: certificate file (/missing/cert) does not exist; cannot connect to localhost
       
   651   (restore missing file or fix references in Mercurial config)
       
   652   [255]
       
   653 
       
   654   $ hg id https://localhost:$HGPORT/ --config auth.l.key=/missing/key
       
   655   abort: certificate file (/missing/key) does not exist; cannot connect to localhost
       
   656   (restore missing file or fix references in Mercurial config)
       
   657   [255]
       
   658 
       
   659 #endif