Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] CodqQL Issues #3177

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ private bool VerifyTokenSignature(string attestationToken, string tokenIssuerUrl
RequireExpirationTime = true,
ValidateLifetime = true,
ValidateIssuer = true,
ValidateAudience = false,
ValidateAudience = true,
RequireSignedTokens = true,
ValidIssuers = GenerateListOfIssuers(tokenIssuerUrl),
IssuerSigningKeys = issuerSigningKeys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ private byte[] RSAEncrypt(byte[] plainText, X509Certificate2 certificate)
Debug.Assert(certificate.HasPrivateKey, "Attempting to encrypt with cert without privatekey");

RSA rsa = certificate.GetRSAPublicKey();
return rsa.Encrypt(plainText, RSAEncryptionPadding.OaepSHA1);
return rsa.Encrypt(plainText, RSAEncryptionPadding.OaepSHA256);
}

/// <summary>
Expand All @@ -490,7 +490,7 @@ private byte[] RSADecrypt(byte[] cipherText, X509Certificate2 certificate)
Debug.Assert(certificate.HasPrivateKey, "Attempting to decrypt with cert without privatekey");

RSA rsa = certificate.GetRSAPrivateKey();
return rsa.Decrypt(cipherText, RSAEncryptionPadding.OaepSHA1);
return rsa.Decrypt(cipherText, RSAEncryptionPadding.OaepSHA256);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private byte[] RSAEncrypt(RSACng rsaCngProvider, byte[] columnEncryptionKey)
Debug.Assert(columnEncryptionKey != null);
Debug.Assert(rsaCngProvider != null);

return rsaCngProvider.Encrypt(columnEncryptionKey, RSAEncryptionPadding.OaepSHA1);
return rsaCngProvider.Encrypt(columnEncryptionKey, RSAEncryptionPadding.OaepSHA256);
}

/// <summary>
Expand All @@ -287,7 +287,7 @@ private byte[] RSADecrypt(RSACng rsaCngProvider, byte[] encryptedColumnEncryptio
Debug.Assert((encryptedColumnEncryptionKey != null) && (encryptedColumnEncryptionKey.Length != 0));
Debug.Assert(rsaCngProvider != null);

return rsaCngProvider.Decrypt(encryptedColumnEncryptionKey, RSAEncryptionPadding.OaepSHA1);
return rsaCngProvider.Decrypt(encryptedColumnEncryptionKey, RSAEncryptionPadding.OaepSHA256);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void SerializationTest()

var settings = new JsonSerializerSettings()
{
TypeNameHandling = TypeNameHandling.All,
TypeNameHandling = TypeNameHandling.None,
};

// TODO: Deserialization fails on Unix with "Member 'ClassName' was not found."
Expand All @@ -36,7 +36,7 @@ public void SerializationTest()
#if NETFRAMEWORK
[Fact]
[ActiveIssue("12161", TestPlatforms.AnyUnix)]
public static void SqlExcpetionSerializationTest()
public static void SqlExceptionSerializationTest()
{
var formatter = new BinaryFormatter();
SqlException e = CreateException();
Expand Down Expand Up @@ -83,7 +83,7 @@ public void JSONSerializationTest()

var settings = new JsonSerializerSettings()
{
TypeNameHandling = TypeNameHandling.All,
TypeNameHandling = TypeNameHandling.None,
};

var sqlEx = JsonConvert.DeserializeObject<SqlException>(json, settings);
Expand Down
Loading