@@ -106,14 +106,14 @@ class EvpCtxSetHashInitializer extends OperationStep {
106106 override DataFlow:: Node getInput ( IOType type ) {
107107 result .asIndirectExpr ( ) = this .getArgument ( 0 ) and type = ContextIO ( )
108108 or
109- result .asExpr ( ) = this .getArgument ( 1 ) and
109+ result .asIndirectExpr ( ) = this .getArgument ( 1 ) and
110110 type = HashAlgorithmIO ( ) and
111111 isOaep = false and
112112 isMgf1 = false
113113 or
114- result .asExpr ( ) = this .getArgument ( 1 ) and type = HashAlgorithmOaepIO ( ) and isOaep = true
114+ result .asIndirectExpr ( ) = this .getArgument ( 1 ) and type = HashAlgorithmOaepIO ( ) and isOaep = true
115115 or
116- result .asExpr ( ) = this .getArgument ( 1 ) and type = HashAlgorithmMgf1IO ( ) and isMgf1 = true
116+ result .asIndirectExpr ( ) = this .getArgument ( 1 ) and type = HashAlgorithmMgf1IO ( ) and isMgf1 = true
117117 }
118118
119119 override DataFlow:: Node getOutput ( IOType type ) {
@@ -157,7 +157,7 @@ class EvpCtxSetMacKeyInitializer extends OperationStep {
157157 result .asExpr ( ) = this .getArgument ( 2 ) and type = KeySizeIO ( )
158158 or
159159 // the raw key that is configured into the output key
160- result .asExpr ( ) = this .getArgument ( 1 ) and type = KeyIO ( )
160+ result .asIndirectExpr ( ) = this .getArgument ( 1 ) and type = KeyIO ( )
161161 }
162162
163163 override DataFlow:: Node getOutput ( IOType type ) {
@@ -175,6 +175,7 @@ class EvpCtxSetPaddingInitializer extends OperationStep {
175175 override DataFlow:: Node getInput ( IOType type ) {
176176 result .asIndirectExpr ( ) = this .getArgument ( 0 ) and type = ContextIO ( )
177177 or
178+ // The algorithm is an int: use asExpr
178179 result .asExpr ( ) = this .getArgument ( 1 ) and type = PaddingAlgorithmIO ( )
179180 }
180181
@@ -211,11 +212,13 @@ class EvpCtxSetSaltLengthInitializer extends OperationStep {
211212class EvpPkeyGet1RsaOrDsa extends OperationStep {
212213 EvpPkeyGet1RsaOrDsa ( ) { this .getTarget ( ) .getName ( ) = [ "EVP_PKEY_get1_RSA" , "EVP_PKEY_get1_DSA" ] }
213214
214- override DataFlow:: Node getOutput ( IOType type ) { result .asExpr ( ) = this and type = KeyIO ( ) }
215+ override DataFlow:: Node getOutput ( IOType type ) {
216+ result .asIndirectExpr ( ) = this and type = KeyIO ( )
217+ }
215218
216219 override DataFlow:: Node getInput ( IOType type ) {
217220 // Key being loaded or created from another location
218- result .asExpr ( ) = this .getArgument ( 0 ) and type = KeyIO ( )
221+ result .asIndirectExpr ( ) = this .getArgument ( 0 ) and type = KeyIO ( )
219222 }
220223
221224 /**
0 commit comments