eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/insecureSslTls.py

changeset 8222
5994b80b8760
parent 7923
91e843545d9a
child 8259
2bbec88047dd
equal deleted inserted replaced
8221:0572a215bd2f 8222:5994b80b8760
136 @param context security context object 136 @param context security context object
137 @type SecurityContext 137 @type SecurityContext
138 @param config dictionary with configuration data 138 @param config dictionary with configuration data
139 @type dict 139 @type dict
140 """ 140 """
141 if context.callFunctionNameQual == 'ssl.wrap_socket': 141 if (
142 if context.checkCallArgValue('ssl_version') is None: 142 context.callFunctionNameQual == 'ssl.wrap_socket' and
143 # checkCallArgValue() returns False if the argument is found 143 context.checkCallArgValue('ssl_version') is None
144 # but does not match the supplied value (or the default None). 144 ):
145 # It returns None if the argument passed doesn't exist. This 145 # checkCallArgValue() returns False if the argument is found
146 # tests for that (ssl_version is not specified). 146 # but does not match the supplied value (or the default None).
147 reportError( 147 # It returns None if the argument passed doesn't exist. This
148 context.node.lineno - 1, 148 # tests for that (ssl_version is not specified).
149 context.node.col_offset, 149 reportError(
150 "S504", 150 context.node.lineno - 1,
151 "L", 151 context.node.col_offset,
152 "M", 152 "S504",
153 ) 153 "L",
154 "M",
155 )

eric ide

mercurial