mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-01 07:22:23 +08:00
更新ZLToolKit(完善ssl相关)
This commit is contained in:
@@ -113,7 +113,12 @@ int main(int argc,char *argv[]){
|
||||
loadIniConfig();
|
||||
|
||||
//加载证书,证书包含公钥和私钥
|
||||
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);
|
||||
|
||||
|
||||
//开启http服务器
|
||||
TcpServer::Ptr httpSrv(new TcpServer());
|
||||
|
||||
Reference in New Issue
Block a user