Skip to content

Commit c742a09

Browse files
Jami CogswellJami Cogswell
authored andcommitted
remove AlgoSpec class
1 parent d569f93 commit c742a09

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

java/ql/lib/semmle/code/java/security/InsufficientKeySize.qll

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,21 +171,22 @@ private class SymmetricKeyGenerator extends AlgoGeneratorObject instanceof Javax
171171
override Expr getAlgoSpec() { result = JavaxCryptoKeyGenerator.super.getAlgoSpec() }
172172
}
173173

174-
/** An instance of an algorithm specification. */
175-
abstract private class AlgoSpec extends ClassInstanceExpr {
176-
Argument getKeySizeArg() { result = this.getArgument(0) }
177-
}
178-
179174
/** An instance of an RSA, DSA, or DH algorithm specification. */
180-
private class AsymmetricNonEcSpec extends AlgoSpec {
175+
private class AsymmetricNonEcSpec extends ClassInstanceExpr {
181176
AsymmetricNonEcSpec() {
182177
this.getConstructedType() instanceof RsaKeyGenParameterSpec or
183178
this.getConstructedType() instanceof DsaGenParameterSpec or
184179
this.getConstructedType() instanceof DhGenParameterSpec
185180
}
181+
182+
/** Gets the `keysize` argument of this instance. */
183+
Argument getKeySizeArg() { result = this.getArgument(0) }
186184
}
187185

188186
/** An instance of an elliptic curve (EC) algorithm specification. */
189-
private class AsymmetricEcSpec extends AlgoSpec {
187+
private class AsymmetricEcSpec extends ClassInstanceExpr {
190188
AsymmetricEcSpec() { this.getConstructedType() instanceof EcGenParameterSpec }
189+
190+
/** Gets the `keysize` argument of this instance. */
191+
Argument getKeySizeArg() { result = this.getArgument(0) }
191192
}

0 commit comments

Comments
 (0)