How do I fix “ssl handshake failed” with ApacheBench?

后端 未结 3 409
陌清茗
陌清茗 2021-01-01 11:16

When I use ApacheBench to test https, the error is returned, \"ssl handshake failed\".

How can I use ApacheBench to test https?

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-01 11:26

    ApacheBench doesn't seem to be capable of ignoring certificate problems (at least some of them) so I wrote this script:

    #!/bin/bash
    K=200;    
    HTTPSA='https://192.168.1.103:443/'    
    date +%M-%S-%N>wgetres.txt
    for (( c=1; c<=$K; c++ ))
    do
        wget --no-check-certificate --secure-protocol=SSLv3 --spider $HTTPSA
    done
    date +%M-%S-%N>>wgetres.txt
    

    It's not as precise as AB, but gives the idea. Does well in comparison tests.

提交回复
热议问题