@@ -22,11 +22,9 @@ class ExistsAnyFlowConfig extends DataFlow::Configuration {
2222
2323bindingset [ flag]
2424predicate isOptionSet ( ConstructorCall cc , int flag , FunctionCall fcSetOptions ) {
25- exists (
26- BoostorgAsio:: SslContextFlowsToSetOptionConfig config , ExistsAnyFlowConfig anyFlowConfig ,
27- Expr optionsSink
25+ exists ( BoostorgAsio:: SslContextClass c , ExistsAnyFlowConfig anyFlowConfig
2826 |
29- config . hasFlow ( DataFlow :: exprNode ( cc ) , DataFlow :: exprNode ( optionsSink ) ) and
27+ c . getAContructorCall ( ) = cc and
3028 exists ( VariableAccess contextSetOptions |
3129 anyFlowConfig .hasFlow ( DataFlow:: exprNode ( cc ) , DataFlow:: exprNode ( contextSetOptions ) ) and
3230 exists ( BoostorgAsio:: SslSetOptionsFunction f | f .getACallToThisFunction ( ) = fcSetOptions |
@@ -55,15 +53,14 @@ predicate isOptionNotSet(ConstructorCall cc, int flag) {
5553
5654from
5755 BoostorgAsio:: SslContextCallTlsProtocolConfig configConstructor ,
58- BoostorgAsio :: SslContextFlowsToSetOptionConfig config , Expr protocolSource , Expr protocolSink ,
59- ConstructorCall cc , Expr e , string msg
56+ Expr protocolSource , Expr protocolSink ,
57+ BoostorgAsio :: SslContextClass c , ConstructorCall cc , Expr e , string msg
6058where
6159 configConstructor .hasFlow ( DataFlow:: exprNode ( protocolSource ) , DataFlow:: exprNode ( protocolSink ) ) and
6260 cc .getArgument ( 0 ) = protocolSink and
6361 (
6462 BoostorgAsio:: isExprSslV23BoostProtocol ( protocolSource ) and
65- not exists ( Expr optionsSink |
66- config .hasFlow ( DataFlow:: exprNode ( cc ) , DataFlow:: exprNode ( optionsSink ) ) and
63+ not (
6764 isOptionSet ( cc , BoostorgAsio:: getShiftedSslOptionsNoSsl3 ( ) , _) and
6865 isOptionSet ( cc , BoostorgAsio:: getShiftedSslOptionsNoTls1 ( ) , _) and
6966 isOptionSet ( cc , BoostorgAsio:: getShiftedSslOptionsNoTls1_1 ( ) , _) and
7269 or
7370 BoostorgAsio:: isExprTlsBoostProtocol ( protocolSource ) and
7471 not BoostorgAsio:: isExprSslV23BoostProtocol ( protocolSource ) and
75- not exists ( Expr optionsSink |
76- config .hasFlow ( DataFlow:: exprNode ( cc ) , DataFlow:: exprNode ( optionsSink ) ) and
72+ not (
7773 isOptionSet ( cc , BoostorgAsio:: getShiftedSslOptionsNoTls1 ( ) , _) and
7874 isOptionSet ( cc , BoostorgAsio:: getShiftedSslOptionsNoTls1_1 ( ) , _) and
7975 isOptionNotSet ( cc , BoostorgAsio:: getShiftedSslOptionsNoTls1_2 ( ) )
0 commit comments