Skip to content

Commit 8bc0a64

Browse files
Jami CogswellJami Cogswell
authored andcommitted
remove KeyGenInitMethodAccess class
1 parent eb69b98 commit 8bc0a64

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,26 +119,26 @@ private class SymmetricSink extends InsufficientKeySizeSink {
119119
override predicate hasState(DataFlow::FlowState state) { state = getMinSymKeySize().toString() }
120120
}
121121

122-
/** A call to a method that initializes a key generator. */
123-
abstract private class KeyGenInitMethodAccess extends MethodAccess {
124-
/** Gets the `keysize` argument of this call. */
125-
Argument getKeySizeArg() { result = this.getArgument(0) }
126-
}
127-
128122
/**
129123
* A call to the `initialize` method declared in `java.security.KeyPairGenerator`
130124
* or to the `init` method declared in `java.security.AlgorithmParameterGenerator`.
131125
*/
132-
private class AsymmetricInitMethodAccess extends KeyGenInitMethodAccess {
126+
private class AsymmetricInitMethodAccess extends MethodAccess {
133127
AsymmetricInitMethodAccess() {
134128
this.getMethod() instanceof KeyPairGeneratorInitMethod or
135129
this.getMethod() instanceof AlgoParamGeneratorInitMethod
136130
}
131+
132+
/** Gets the `keysize` argument of this call. */
133+
Argument getKeySizeArg() { result = this.getArgument(0) }
137134
}
138135

139136
/** A call to the `init` method declared in `javax.crypto.KeyGenerator`. */
140-
private class SymmetricInitMethodAccess extends KeyGenInitMethodAccess {
137+
private class SymmetricInitMethodAccess extends MethodAccess {
141138
SymmetricInitMethodAccess() { this.getMethod() instanceof KeyGeneratorInitMethod }
139+
140+
/** Gets the `keysize` argument of this call. */
141+
Argument getKeySizeArg() { result = this.getArgument(0) }
142142
}
143143

144144
/** An instance of a generator that specifies an encryption algorithm. */

0 commit comments

Comments
 (0)