@@ -15,7 +15,6 @@ abstract class InsufficientKeySizeSink extends DataFlow::Node {
15
15
predicate hasState ( DataFlow:: FlowState state ) { state instanceof DataFlow:: FlowStateEmpty }
16
16
}
17
17
18
- // *********************************** SOURCES ***********************************
19
18
/** A source for an insufficient key size used in RSA, DSA, and DH algorithms. */
20
19
private class AsymmetricNonEcSource extends InsufficientKeySizeSource {
21
20
AsymmetricNonEcSource ( ) { getNodeIntValue ( this ) < getMinAsymNonEcKeySize ( ) }
@@ -46,7 +45,6 @@ private class SymmetricSource extends InsufficientKeySizeSource {
46
45
override predicate hasState ( DataFlow:: FlowState state ) { state = getMinSymKeySize ( ) .toString ( ) }
47
46
}
48
47
49
- // ************************** SOURCES HELPER PREDICATES **************************
50
48
/** Returns the minimum recommended key size for RSA, DSA, and DH algorithms. */
51
49
private int getMinAsymNonEcKeySize ( ) { result = 2048 }
52
50
@@ -74,7 +72,6 @@ private int getEcKeySize(string algorithm) {
74
72
result = algorithm .regexpCapture ( ".*[a-zA-Z](\\d+)[a-zA-Z].*" , 1 ) .toInt ( )
75
73
}
76
74
77
- // ************************************ SINKS ************************************
78
75
/** A sink for an insufficient key size used in RSA, DSA, and DH algorithms. */
79
76
private class AsymmetricNonEcSink extends InsufficientKeySizeSink {
80
77
AsymmetricNonEcSink ( ) {
@@ -122,7 +119,6 @@ private class SymmetricSink extends InsufficientKeySizeSink {
122
119
override predicate hasState ( DataFlow:: FlowState state ) { state = getMinSymKeySize ( ) .toString ( ) }
123
120
}
124
121
125
- // ********************** SINKS HELPER CLASSES & PREDICATES **********************
126
122
/** A call to a method that initializes a key generator. */
127
123
abstract private class KeyGenInitMethodAccess extends MethodAccess {
128
124
/** Gets the `keysize` argument of this call. */
0 commit comments