@@ -124,12 +124,15 @@ private class SymmetricSink extends InsufficientKeySizeSink {
124
124
125
125
// ********************** SINKS HELPER CLASSES & PREDICATES **********************
126
126
/** A call to a method that initializes a key generator. */
127
- abstract class KeyGenInitMethodAccess extends MethodAccess {
127
+ abstract private class KeyGenInitMethodAccess extends MethodAccess {
128
128
/** Gets the `keysize` argument of this call. */
129
129
Argument getKeySizeArg ( ) { result = this .getArgument ( 0 ) }
130
130
}
131
131
132
- /** A call to the `initialize` method declared in `java.security.KeyPairGenerator`. */
132
+ /**
133
+ * A call to the `initialize` method declared in `java.security.KeyPairGenerator`
134
+ * or to the `init` method declared in `java.security.AlgorithmParameterGenerator`.
135
+ */
133
136
private class AsymmetricInitMethodAccess extends KeyGenInitMethodAccess {
134
137
AsymmetricInitMethodAccess ( ) {
135
138
this .getMethod ( ) instanceof KeyPairGeneratorInitMethod or
@@ -143,11 +146,14 @@ private class SymmetricInitMethodAccess extends KeyGenInitMethodAccess {
143
146
}
144
147
145
148
/** An instance of a key generator. */
146
- abstract class KeyGeneratorObject extends CryptoAlgoSpec {
149
+ abstract private class KeyGeneratorObject extends CryptoAlgoSpec {
147
150
string getAlgoName ( ) { result = this .getAlgoSpec ( ) .( StringLiteral ) .getValue ( ) .toUpperCase ( ) }
148
151
}
149
152
150
- /** An instance of a `java.security.KeyPairGenerator`. */
153
+ /**
154
+ * An instance of a `java.security.KeyPairGenerator`
155
+ * or of a `java.security.AlgorithmParameterGenerator`.
156
+ */
151
157
private class AsymmetricKeyGenerator extends KeyGeneratorObject {
152
158
AsymmetricKeyGenerator ( ) {
153
159
this instanceof JavaSecurityKeyPairGenerator or
@@ -165,7 +171,7 @@ private class SymmetricKeyGenerator extends KeyGeneratorObject {
165
171
}
166
172
167
173
/** An instance of an algorithm specification. */
168
- abstract class AlgoSpec extends ClassInstanceExpr {
174
+ abstract private class AlgoSpec extends ClassInstanceExpr {
169
175
Argument getKeySizeArg ( ) { result = this .getArgument ( 0 ) }
170
176
}
171
177
0 commit comments