国密客户端Client与服务器Server交互

本文详细探讨了国密GMSSL技术在客户端与服务器之间的交互过程,包括安全认证、密钥协商等关键步骤,旨在提升网络安全和数据保护能力。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


$ gmssl.exe s_client -debug -status -security_debug  -config ./openssl.cnf -port "9999" -CAfile "Root.crt" -cert "Client.crt"  -key "Client.key"
客户端证书可以不设置

$ gmssl.exe s_server -debug -status_verbose -security_debug  -config ./openssl.cnf -port "9999" -servername "gmservername" -CAfile "Root.crt" -cert "Server.crt"  -key "Server.key" -cert2 "Server1.crt" -key2 "Server1.key"
第二个证书cert2和第二个私钥key2可以不设置,如果要让第二个证书和私钥起作用需要设置-servername "随便设置一个名字",不过设置了 -servername参数后,有一个堆栈溢出的BUG,需要修改一下,具体修改内容如下:
static int security_callback_debug(const SSL *s, const SSL_CTX *ctx,
                                   int op, int bits, int nid,
                                   void *other, void *ex)
{
    security_debug_ex *sdb = ex;
    int rv = 1, show_bits = 1, cert_md = 0;//rv赋值1
    const char *nm;
    //rv = sdb->old_cb(s, ctx, op, b
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

langeldep

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值