mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Crypto: Updating JCA to use new key size predicate returning int for elliptic curve.
This commit is contained in:
@@ -1606,13 +1606,8 @@ module JCAModel {
|
|||||||
else result = Crypto::OtherEllipticCurveType()
|
else result = Crypto::OtherEllipticCurveType()
|
||||||
}
|
}
|
||||||
|
|
||||||
override string getKeySize() {
|
override int getKeySize() {
|
||||||
exists(int keySize |
|
Crypto::ellipticCurveNameToKeySizeAndFamilyMapping(this.getRawEllipticCurveName(), result, _)
|
||||||
Crypto::ellipticCurveNameToKeySizeAndFamilyMapping(this.getRawEllipticCurveName(), keySize,
|
|
||||||
_)
|
|
||||||
|
|
|
||||||
result = keySize.toString()
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EllipticCurveAlgorithmValueConsumer getConsumer() { result = consumer }
|
EllipticCurveAlgorithmValueConsumer getConsumer() { result = consumer }
|
||||||
|
|||||||
@@ -972,7 +972,7 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
|
|||||||
|
|
||||||
abstract TEllipticCurveType getEllipticCurveType();
|
abstract TEllipticCurveType getEllipticCurveType();
|
||||||
|
|
||||||
abstract string getKeySize();
|
abstract int getKeySize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The 'parsed' curve name, e.g., "P-256" or "secp256r1"
|
* The 'parsed' curve name, e.g., "P-256" or "secp256r1"
|
||||||
@@ -2613,7 +2613,7 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
|
|||||||
or
|
or
|
||||||
// [ONLY_KNOWN]
|
// [ONLY_KNOWN]
|
||||||
key = "KeySize" and
|
key = "KeySize" and
|
||||||
value = instance.asAlg().getKeySize() and
|
value = instance.asAlg().getKeySize().toString() and
|
||||||
location = this.getLocation()
|
location = this.getLocation()
|
||||||
or
|
or
|
||||||
// [KNOWN_OR_UNKNOWN]
|
// [KNOWN_OR_UNKNOWN]
|
||||||
|
|||||||
Reference in New Issue
Block a user