@@ -76,7 +76,7 @@ internal static KeyedHashAlgorithm CreateKeyedHashAlgorithm(byte[] key, string a
76
76
{
77
77
case SecurityAlgorithms . HmacSha1Signature :
78
78
#pragma warning disable CA5350 // Do not use insecure cryptographic algorithm SHA1.
79
- return new HMACSHA1 ( key ) ;
79
+ return new HMACSHA1 ( key ) ; // CodeQL [SM02200] Insecure cryptographic algorithm HMACSHA1 is needed here as a requirement of SOAP protocols
80
80
#pragma warning restore CA5350 // Do not use insecure cryptographic algorithm SHA1.
81
81
case SecurityAlgorithms . HmacSha256Signature :
82
82
return new HMACSHA256 ( key ) ;
@@ -196,7 +196,7 @@ internal static HashAlgorithm CreateHashAlgorithm(string algorithm)
196
196
case SystemSecurityCryptographySha1String :
197
197
case SecurityAlgorithms . Sha1Digest :
198
198
#pragma warning disable CA5350 // Do not use insecure cryptographic algorithm SHA1.
199
- return SHA1 . Create ( ) ;
199
+ return SHA1 . Create ( ) ; // CodeQL [SM02196] Insecure cryptographic algorithm SHA1 is needed here as a requirement of SOAP protocols
200
200
#pragma warning restore CA5350 // Do not use insecure cryptographic algorithm SHA1.
201
201
case SHA256String :
202
202
case SecurityAlgorithms . Sha256Digest :
@@ -223,7 +223,7 @@ private static object GetDefaultAlgorithm(string algorithm)
223
223
// will be inside the delegate dictionary.
224
224
case SecurityAlgorithms . Sha1Digest :
225
225
#pragma warning disable CA5350 // Do not use insecure cryptographic algorithm SHA1.
226
- return SHA1 . Create ( ) ;
226
+ return SHA1 . Create ( ) ; // CodeQL [SM02196] Insecure cryptographic algorithm SHA1 is needed here as a requirement of SOAP protocols
227
227
#pragma warning restore CA5350 // Do not use insecure cryptographic algorithm SHA1.
228
228
case SecurityAlgorithms . ExclusiveC14n :
229
229
throw ExceptionHelper . PlatformNotSupported ( ) ;
@@ -242,11 +242,11 @@ private static object GetDefaultAlgorithm(string algorithm)
242
242
case SecurityAlgorithms . TripleDesEncryption :
243
243
case SecurityAlgorithms . TripleDesKeyWrap :
244
244
#pragma warning disable CA5350 // Do Not Use Weak Cryptographic Algorithms
245
- return TripleDES . Create ( ) ;
245
+ return TripleDES . Create ( ) ; // CodeQL [SM02192] Weak cryptographic algorithm TripleDES is needed here as a requirement of SOAP protocols
246
246
#pragma warning restore CA5350 // Do Not Use Weak Cryptographic Algorithms
247
247
case SecurityAlgorithms . HmacSha1Signature :
248
248
#pragma warning disable CA5350 // Do not use insecure cryptographic algorithm SHA1.
249
- return new HMACSHA1 ( ) ;
249
+ return new HMACSHA1 ( ) ; // CodeQL [SM02200] Insecure cryptographic algorithm HMACSHA1 is needed here as a requirement of SOAP protocols
250
250
#pragma warning restore CA5350 // Do not use insecure cryptographic algorithm SHA1.
251
251
case SecurityAlgorithms . HmacSha256Signature :
252
252
return new HMACSHA256 ( ) ;
@@ -256,7 +256,7 @@ private static object GetDefaultAlgorithm(string algorithm)
256
256
return null ;
257
257
case SecurityAlgorithms . DesEncryption :
258
258
#pragma warning disable CA5351 // Do Not Use Broken Cryptographic Algorithms
259
- return DES . Create ( ) ;
259
+ return DES . Create ( ) ; // CodeQL [SM02192] Broken cryptographic algorithm DES is needed here as a requirement of SOAP protocols
260
260
#pragma warning restore CA5351 // Do Not Use Broken Cryptographic Algorithms
261
261
default :
262
262
return null ;
@@ -340,11 +340,11 @@ internal static object GetAlgorithmFromConfig(string algorithm)
340
340
return SHA256 . Create ( ) ;
341
341
case SecurityAlgorithms . Sha1Digest :
342
342
#pragma warning disable CA5350 // Do not use insecure cryptographic algorithm SHA1.
343
- return SHA1 . Create ( ) ;
343
+ return SHA1 . Create ( ) ; // CodeQL [SM02196] Insecure cryptographic algorithm SHA1 is needed here as a requirement of SOAP protocols
344
344
#pragma warning restore CA5350 // Do not use insecure cryptographic algorithm SHA1.
345
345
case SecurityAlgorithms . HmacSha1Signature :
346
346
#pragma warning disable CA5350 // Do not use insecure cryptographic algorithm SHA1.
347
- return new HMACSHA1 ( ) ;
347
+ return new HMACSHA1 ( ) ; // CodeQL [SM02200] Insecure cryptographic algorithm HMACSHA1 is needed here as a requirement of SOAP protocols
348
348
#pragma warning restore CA5350 // Do not use insecure cryptographic algorithm SHA1.
349
349
default :
350
350
break ;
0 commit comments