更新ZLToolKit(完善ssl相关)

This commit is contained in:
xiongziliang
2019-04-16 17:25:19 +08:00
parent a266123365
commit bc1a79038c
7 changed files with 20 additions and 34 deletions

View File

@@ -262,7 +262,11 @@ int main(int argc,char *argv[]) {
" rtmp地址 : rtmp://127.0.0.1/live/0";
//加载证书,证书包含公钥和私钥
SSL_Initor::Instance().loadServerPem((exeDir() + "ssl.pem").data());
SSL_Initor::Instance().loadCertificate((exeDir() + "ssl.p12").data());
//信任某个自签名证书
SSL_Initor::Instance().trustCertificate((exeDir() + "ssl.p12").data());
//不忽略无效证书证书(例如自签名或过期证书)
SSL_Initor::Instance().ignoreInvalidCertificate(false);
uint16_t shellPort = mINI::Instance()[Shell::kPort];
uint16_t rtspPort = mINI::Instance()[Rtsp::kPort];