今天最新的代码,在wireshark里可以抓到tls成功的包,供大家参考
先执行apps/gmca/里的test.sh生成ca,然后执行下面的命令启动server/client
-verify参数是是否验证对方的证书
-cipher指定加密套件算法
GmSSL/apps$./gmssl s_server -accept 4333 -CAfile gmca/.ca/cacert.pem -cert gmca/.ca/certs/01.pem -key gmca/.ca/keys/alice@pku.edu.cn.key -tls1_2 -debug -msg -verify 1 -cipher ECDHE-SM2-WITH-SMS4-SM3
GmSSL/apps$ ./gmssl s_client -connect localhost:4333 -CAfile gmca/.ca/cacert.pem -cert gmca/.ca/certs/02.pem -key gmca/.ca/keys/bob@pku.edu.cn.key -tls1_2 -showcerts -msg -debug -verify 1
网友评论