File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -607,6 +607,10 @@ TlsSetServerName (
607607 TlsConn = (TLS_CONNECTION * )Tls ;
608608 Ctx = (SSL_CTX * )SslCtx ;
609609
610+ if (TlsConn == NULL ) {
611+ return EFI_INVALID_PARAMETER ;
612+ }
613+
610614 TlsExtCtx = AllocateZeroPool (sizeof (TLS_EXT_CTX ));
611615 if (TlsExtCtx == NULL ) {
612616 return EFI_OUT_OF_RESOURCES ;
@@ -1254,7 +1258,9 @@ TlsGetVersion (
12541258
12551259 TlsConn = (TLS_CONNECTION * )Tls ;
12561260
1257- ASSERT (TlsConn != NULL );
1261+ if (TlsConn == NULL ) {
1262+ return 0 ;
1263+ }
12581264
12591265 return (UINT16 )(SSL_version (TlsConn -> Ssl ));
12601266}
@@ -1282,7 +1288,9 @@ TlsGetConnectionEnd (
12821288
12831289 TlsConn = (TLS_CONNECTION * )Tls ;
12841290
1285- ASSERT (TlsConn != NULL );
1291+ if (TlsConn == NULL ) {
1292+ return 0 ;
1293+ }
12861294
12871295 return (UINT8 )SSL_is_server (TlsConn -> Ssl );
12881296}
@@ -1377,7 +1385,9 @@ TlsGetVerify (
13771385
13781386 TlsConn = (TLS_CONNECTION * )Tls ;
13791387
1380- ASSERT (TlsConn != NULL );
1388+ if (TlsConn == NULL ) {
1389+ return 0 ;
1390+ }
13811391
13821392 return SSL_get_verify_mode (TlsConn -> Ssl );
13831393}
You can’t perform that action at this time.
0 commit comments