@@ -241,13 +241,20 @@ int main(int argc, char** argv)
241241
242242 if (st_ServiceCfg.st_XCert .bDLEnable )
243243 {
244- xhDLSsl = OPenSsl_Server_InitEx (st_ServiceCfg.st_XCert .tszCertChain , NULL , st_ServiceCfg.st_XCert .tszCertKey , false , false , (ENUM_XENGINE_OPENSSL_PROTOCOL)st_ServiceCfg.st_XCert .nSslType );
244+ if (_tcsxlen (st_ServiceCfg.st_XCert .tszCertServer ) > 0 )
245+ {
246+ xhDLSsl = OPenSsl_Server_InitEx (st_ServiceCfg.st_XCert .tszCertChain , st_ServiceCfg.st_XCert .tszCertServer , st_ServiceCfg.st_XCert .tszCertKey , false , false , XENGINE_OPENSSL_PROTOCOL_TLS_SERVER);
247+ }
248+ else
249+ {
250+ xhDLSsl = OPenSsl_Server_InitEx (st_ServiceCfg.st_XCert .tszCertChain , NULL , st_ServiceCfg.st_XCert .tszCertKey , false , false , XENGINE_OPENSSL_PROTOCOL_TLS_SERVER);
251+ }
245252 if (NULL == xhDLSsl)
246253 {
247254 XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X (" 启动服务中,启动下载SSL服务失败,错误:%lX" ), Session_GetLastError ());
248255 goto XENGINE_EXITAPP;
249256 }
250- XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X (" 启动服务中,启动下载SSL服务成功,证书链:%s,证书Key:%s,验证模式:%d " ), st_ServiceCfg.st_XCert .tszCertChain , st_ServiceCfg.st_XCert .tszCertKey , st_ServiceCfg. st_XCert . nSslType );
257+ XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X (" 启动服务中,启动下载SSL服务成功,证书链:%s,证书Key:%s" ), st_ServiceCfg.st_XCert .tszCertChain , st_ServiceCfg.st_XCert .tszCertKey );
251258 }
252259 else
253260 {
@@ -301,13 +308,20 @@ int main(int argc, char** argv)
301308
302309 if (st_ServiceCfg.st_XCert .bUPEnable )
303310 {
304- xhUPSsl = OPenSsl_Server_InitEx (st_ServiceCfg.st_XCert .tszCertChain , NULL , st_ServiceCfg.st_XCert .tszCertKey , false , false , (ENUM_XENGINE_OPENSSL_PROTOCOL)st_ServiceCfg.st_XCert .nSslType );
311+ if (_tcsxlen (st_ServiceCfg.st_XCert .tszCertServer ) > 0 )
312+ {
313+ xhUPSsl = OPenSsl_Server_InitEx (st_ServiceCfg.st_XCert .tszCertChain , st_ServiceCfg.st_XCert .tszCertServer , st_ServiceCfg.st_XCert .tszCertKey , false , false , XENGINE_OPENSSL_PROTOCOL_TLS_SERVER);
314+ }
315+ else
316+ {
317+ xhUPSsl = OPenSsl_Server_InitEx (st_ServiceCfg.st_XCert .tszCertChain , NULL , st_ServiceCfg.st_XCert .tszCertKey , false , false , XENGINE_OPENSSL_PROTOCOL_TLS_SERVER);
318+ }
305319 if (NULL == xhUPSsl)
306320 {
307321 XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X (" 启动服务中,启动上传SSL服务失败,错误:%lX" ), Session_GetLastError ());
308322 goto XENGINE_EXITAPP;
309323 }
310- XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X (" 启动服务中,启动上传SSL服务成功,证书链:%s,证书Key:%s,验证模式:%d " ), st_ServiceCfg.st_XCert .tszCertChain , st_ServiceCfg.st_XCert .tszCertKey , st_ServiceCfg. st_XCert . nSslType );
324+ XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X (" 启动服务中,启动上传SSL服务成功,证书链:%s,证书Key:%s" ), st_ServiceCfg.st_XCert .tszCertChain , st_ServiceCfg.st_XCert .tszCertKey );
311325 }
312326 else
313327 {
@@ -354,13 +368,20 @@ int main(int argc, char** argv)
354368
355369 if (st_ServiceCfg.st_XCert .bCHEnable )
356370 {
357- xhCHSsl = OPenSsl_Server_InitEx (st_ServiceCfg.st_XCert .tszCertChain , NULL , st_ServiceCfg.st_XCert .tszCertKey , false , false , (ENUM_XENGINE_OPENSSL_PROTOCOL)st_ServiceCfg.st_XCert .nSslType );
371+ if (_tcsxlen (st_ServiceCfg.st_XCert .tszCertServer ) > 0 )
372+ {
373+ xhCHSsl = OPenSsl_Server_InitEx (st_ServiceCfg.st_XCert .tszCertChain , st_ServiceCfg.st_XCert .tszCertServer , st_ServiceCfg.st_XCert .tszCertKey , false , false , XENGINE_OPENSSL_PROTOCOL_TLS_SERVER);
374+ }
375+ else
376+ {
377+ xhCHSsl = OPenSsl_Server_InitEx (st_ServiceCfg.st_XCert .tszCertChain , NULL , st_ServiceCfg.st_XCert .tszCertKey , false , false , XENGINE_OPENSSL_PROTOCOL_TLS_SERVER);
378+ }
358379 if (NULL == xhCHSsl)
359380 {
360381 XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X (" 启动服务中,启动业务SSL服务失败,错误:%lX" ), Session_GetLastError ());
361382 goto XENGINE_EXITAPP;
362383 }
363- XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X (" 启动服务中,启动业务SSL服务成功,证书链:%s,证书Key:%s,验证模式:%d " ), st_ServiceCfg.st_XCert .tszCertChain , st_ServiceCfg.st_XCert .tszCertKey , st_ServiceCfg. st_XCert . nSslType );
384+ XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X (" 启动服务中,启动业务SSL服务成功,证书链:%s,证书Key:%s" ), st_ServiceCfg.st_XCert .tszCertChain , st_ServiceCfg.st_XCert .tszCertKey );
364385 }
365386 else
366387 {
0 commit comments