@@ -76,6 +76,15 @@ class KnownOpenSSLEllipticCurveAlgorithmConstant extends KnownOpenSSLAlgorithmCo
76
76
}
77
77
}
78
78
79
+ class KnownOpenSSLSignatureAlgorithmConstant extends KnownOpenSSLAlgorithmConstant {
80
+ string algType ;
81
+
82
+ KnownOpenSSLSignatureAlgorithmConstant ( ) {
83
+ resolveAlgorithmFromExpr ( this , _, algType ) and
84
+ algType .matches ( "SIGNATURE" )
85
+ }
86
+ }
87
+
79
88
/**
80
89
* Resolves a call to a 'direct algorithm getter', e.g., EVP_MD5()
81
90
* This approach to fetching algorithms was used in OpenSSL 1.0.2.
@@ -263,8 +272,12 @@ predicate knownOpenSSLAlgorithmLiteral(string name, int nid, string normalized,
263
272
or
264
273
name = "ed25519" and nid = 1087 and normalized = "ED25519" and algType = "ELLIPTIC_CURVE"
265
274
or
275
+ name = "ed25519" and nid = 1087 and normalized = "ED25519" and algType = "SIGNATURE"
276
+ or
266
277
name = "ed448" and nid = 1088 and normalized = "ED448" and algType = "ELLIPTIC_CURVE"
267
278
or
279
+ name = "ed448" and nid = 1088 and normalized = "ED448" and algType = "SIGNATURE"
280
+ or
268
281
name = "md2" and nid = 3 and normalized = "MD2" and algType = "HASH"
269
282
or
270
283
name = "sha" and nid = 41 and normalized = "SHA" and algType = "HASH"
@@ -1684,8 +1697,12 @@ predicate knownOpenSSLAlgorithmLiteral(string name, int nid, string normalized,
1684
1697
or
1685
1698
name = "x448" and nid = 1035 and normalized = "X448" and algType = "ELLIPTIC_CURVE"
1686
1699
or
1700
+ name = "x448" and nid = 1035 and normalized = "X448" and algType = "KEY_EXCHANGE"
1701
+ or
1687
1702
name = "x25519" and nid = 1034 and normalized = "X25519" and algType = "ELLIPTIC_CURVE"
1688
1703
or
1704
+ name = "x25519" and nid = 1034 and normalized = "X25519" and algType = "KEY_EXCHANGE"
1705
+ or
1689
1706
name = "authecdsa" and nid = 1047 and normalized = "ECDSA" and algType = "SIGNATURE"
1690
1707
or
1691
1708
name = "authgost01" and nid = 1050 and normalized = "GOST" and algType = "SYMMETRIC_ENCRYPTION"
0 commit comments