OpenSSL Ignore Self-signed certificate error

后端 未结 6 1900
独厮守ぢ
独厮守ぢ 2021-02-19 07:42

I\'m writing a small program with the OpenSSL library that is suppose to establish a connection with an SSLv3 server. This server dispenses a self-signed certificate, which caus

6条回答
  •  悲哀的现实
    2021-02-19 08:38

    Check these OpenSSL Examples: http://www.rtfm.com/openssl-examples/

    The wclient.c connects to any https page, for example:

    wclient -h www.yahoo.com -p 443
    

    If you run that with the default installation, you'll get a certificate error (you can use the -i flag to bypass the certificate check though).

    To verify the certificate, you'll need to download the CA certificates (Verisign, Thawte, Equifax, etc), so google this file cacert.pem, download and rename it to root.pem and you'll be able to connect to a web server and validate its certificate.

提交回复
热议问题