File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
python/ql/src/semmle/python Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -545,7 +545,7 @@ module Cryptography {
545
545
/** Gets the name of the cryptographic algorithm (for example `"RSA"` or `"AES"`). */
546
546
string getName ( ) { result = range .getName ( ) }
547
547
548
- /** Gets the argument that specifies size of the key in bits, if available. */
548
+ /** Gets the argument that specifies the size of the key in bits, if available. */
549
549
DataFlow:: Node getKeySizeArg ( ) { result = range .getKeySizeArg ( ) }
550
550
551
551
/**
@@ -600,7 +600,7 @@ module Cryptography {
600
600
/** Gets the name of the cryptographic algorithm (for example `"RSA"`). */
601
601
abstract string getName ( ) ;
602
602
603
- /** Gets the argument that specifies size of the key in bits, if available. */
603
+ /** Gets the argument that specifies the size of the key in bits, if available. */
604
604
abstract DataFlow:: Node getKeySizeArg ( ) ;
605
605
606
606
/**
Original file line number Diff line number Diff line change @@ -77,12 +77,12 @@ private module CryptodomeModel {
77
77
}
78
78
79
79
/** Gets the argument that specifies the curve to use (a string). */
80
- DataFlow:: Node getCurveArg ( ) { result in [ this .getArgByName ( "curve" ) ] }
80
+ DataFlow:: Node getCurveArg ( ) { result = this .getArgByName ( "curve" ) }
81
81
82
82
/** Gets the name of the curve to use, as well as the origin that explains how we obtained this name. */
83
83
string getCurveWithOrigin ( DataFlow:: Node origin ) {
84
84
exists ( StrConst str | origin = DataFlow:: exprNode ( str ) |
85
- origin . ( DataFlow :: LocalSourceNode ) . flowsTo ( this .getCurveArg ( ) ) and
85
+ origin = this .getCurveArg ( ) . getALocalSource ( ) and
86
86
result = str .getText ( )
87
87
)
88
88
}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ private module CryptographyModel {
35
35
|
36
36
// obtained by manually looking at source code in
37
37
// https://github.com/pyca/cryptography/blob/cba69f1922803f4f29a3fde01741890d88b8e217/src/cryptography/hazmat/primitives/asymmetric/ec.py#L208-L300
38
- curveName = "SECT571R1" and keySize = 570
38
+ curveName = "SECT571R1" and keySize = 570 // Indeed the numbers do not match.
39
39
or
40
40
curveName = "SECT409R1" and keySize = 409
41
41
or
You can’t perform that action at this time.
0 commit comments