@@ -19,7 +19,7 @@ import DataFlow::PathGraph
19
19
20
20
/**
21
21
* Models an insecure `X509TrustManager`.
22
- * An `X509TrustManager` is considered insecure if it never throws a `CertificatException ` thereby accepting any certificate as valid.
22
+ * An `X509TrustManager` is considered insecure if it never throws a `CertificateException ` thereby accepting any certificate as valid.
23
23
*/
24
24
class InsecureX509TrustManager extends RefType {
25
25
InsecureX509TrustManager ( ) {
@@ -33,26 +33,26 @@ class InsecureX509TrustManager extends RefType {
33
33
}
34
34
35
35
/** The `java.security.cert.CertificateException` class. */
36
- private class CertificatException extends RefType {
37
- CertificatException ( ) { hasQualifiedName ( "java.security.cert" , "CertificateException" ) }
36
+ private class CertificateException extends RefType {
37
+ CertificateException ( ) { hasQualifiedName ( "java.security.cert" , "CertificateException" ) }
38
38
}
39
39
40
40
/**
41
- *Holds if:
42
- * - `m` may `throw` an `CertificatException `
41
+ * Holds if:
42
+ * - `m` may `throw` a `CertificateException `
43
43
* - `m` calls another method that may throw
44
- * - `m` calls a method that declares to throw an `CertificatExceptio `, but for which no source is available
44
+ * - `m` calls a method declared to throw a `CertificateException `, but for which no source is available
45
45
*/
46
46
private predicate mayThrowCertificateException ( Method m ) {
47
47
exists ( Stmt stmt | m .getBody ( ) .getAChild * ( ) = stmt |
48
- stmt .( ThrowStmt ) .getThrownExceptionType ( ) .getASupertype * ( ) instanceof CertificatException
48
+ stmt .( ThrowStmt ) .getThrownExceptionType ( ) .getASupertype * ( ) instanceof CertificateException
49
49
)
50
50
or
51
51
exists ( Method otherMethod | m .polyCalls ( otherMethod ) |
52
52
mayThrowCertificateException ( otherMethod )
53
53
or
54
54
not otherMethod .fromSource ( ) and
55
- otherMethod .getAnException ( ) .getType ( ) .getASupertype * ( ) instanceof CertificatException
55
+ otherMethod .getAnException ( ) .getType ( ) .getASupertype * ( ) instanceof CertificateException
56
56
)
57
57
}
58
58
0 commit comments