Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Jahoda <aik.jahoda@post.cz>2021-03-15 21:23:03 +0300
committerGitHub <noreply@github.com>2021-03-15 21:23:03 +0300
commit5b4edb9b0a721aed60c9c8ddeed441bdd7451e42 (patch)
treeb2998a50f465be2181a200cdd9324b48fea89a9c
parente0777f1249f7007593a29487169373e67f2b29b3 (diff)
Credscan second round (#404)
-rw-r--r--src/Common/tests/System/Net/Configuration.Certificates.cs4
-rw-r--r--src/System.Data.Common/tests/System/Data/Common/DbConnectionStringBuilderTest.cs58
-rw-r--r--src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TDSServerArguments.cs2
-rw-r--r--src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TdsServerCertificate.pfxbin1854 -> 1661 bytes
-rw-r--r--src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs6
-rw-r--r--src/System.Private.Uri/tests/FunctionalTests/UriBuilderRefreshTest.cs2
-rw-r--r--src/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs2
-rw-r--r--src/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs22
-rw-r--r--src/System.Runtime/tests/System/Uri.CreateStringTests.cs2
-rw-r--r--src/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs22
-rw-r--r--src/System.Security.Cryptography.X509Certificates/tests/ExportTests.cs6
-rw-r--r--src/System.Security.Cryptography.Xml/tests/EncryptedXmlTest.cs6
-rw-r--r--src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs162
-rw-r--r--src/System.Security.Cryptography.Xml/tests/TestHelpers.cs4
14 files changed, 94 insertions, 204 deletions
diff --git a/src/Common/tests/System/Net/Configuration.Certificates.cs b/src/Common/tests/System/Net/Configuration.Certificates.cs
index 3407926342..dbe69c51d2 100644
--- a/src/Common/tests/System/Net/Configuration.Certificates.cs
+++ b/src/Common/tests/System/Net/Configuration.Certificates.cs
@@ -16,8 +16,8 @@ namespace System.Net.Test.Common
{
public static partial class Certificates
{
- private const string CertificatePassword = "testcertificate";
- private const string TestDataFolder = "TestData";
+ private const string CertificatePassword = "PLACEHOLDER";
+ private const string TestDataFolder = "TestDataCertificates";
private static readonly Mutex m;
private const int MutexTimeout = 120 * 1000;
diff --git a/src/System.Data.Common/tests/System/Data/Common/DbConnectionStringBuilderTest.cs b/src/System.Data.Common/tests/System/Data/Common/DbConnectionStringBuilderTest.cs
index a703b498eb..717a122452 100644
--- a/src/System.Data.Common/tests/System/Data/Common/DbConnectionStringBuilderTest.cs
+++ b/src/System.Data.Common/tests/System/Data/Common/DbConnectionStringBuilderTest.cs
@@ -1867,12 +1867,12 @@ namespace System.Data.Tests.Common
sb["Data Source"] = "testdb";
sb["User ID"] = "someuser";
- sb["Password"] = "abcdef";
- Assert.Equal("Data Source=testdb;User ID=someuser;Password=abcdef",
+ sb["Password"] = "PLACEHOLDER";
+ Assert.Equal("Data Source=testdb;User ID=someuser;Password=PLACEHOLDER",
sb.ConnectionString);
- sb["Password"] = "abcdef#";
- Assert.Equal("Data Source=testdb;User ID=someuser;Password=abcdef#",
+ sb["Password"] = "PLACEHOLDER#";
+ Assert.Equal("Data Source=testdb;User ID=someuser;Password=PLACEHOLDER#",
sb.ConnectionString);
// an embedded single-quote value will result in the value being delimieted with double quotes
@@ -1893,39 +1893,39 @@ namespace System.Data.Tests.Common
sb.ConnectionString);
sb = new DbConnectionStringBuilder();
- sb["PASSWORD"] = "abcdef1";
+ sb["PASSWORD"] = "PLACEHOLDERabcdef1";
sb["user id"] = "someuser";
sb["Data Source"] = "testdb";
- Assert.Equal("PASSWORD=abcdef1;user id=someuser;Data Source=testdb",
+ Assert.Equal("PASSWORD=PLACEHOLDERabcdef1;user id=someuser;Data Source=testdb",
sb.ConnectionString);
// case is preserved for a keyword that was added the first time
sb = new DbConnectionStringBuilder();
- sb["PassWord"] = "abcdef2";
+ sb["PassWord"] = "PLACEHOLDERabcdef2";
sb["uSER iD"] = "someuser";
sb["DaTa SoUrCe"] = "testdb";
- Assert.Equal("PassWord=abcdef2;uSER iD=someuser;DaTa SoUrCe=testdb",
+ Assert.Equal("PassWord=PLACEHOLDERabcdef2;uSER iD=someuser;DaTa SoUrCe=testdb",
sb.ConnectionString);
- sb["passWORD"] = "abc123";
- Assert.Equal("PassWord=abc123;uSER iD=someuser;DaTa SoUrCe=testdb",
+ sb["passWORD"] = "PLACEHOLDERabc123";
+ Assert.Equal("PassWord=PLACEHOLDERabc123;uSER iD=someuser;DaTa SoUrCe=testdb",
sb.ConnectionString);
// embedded equal sign in the value will cause the value to be
// delimited with double-quotes
sb = new DbConnectionStringBuilder();
- sb["Password"] = "abc=def";
+ sb["Password"] = "PLACEHOLDER=def";
sb["Data Source"] = "testdb";
sb["User ID"] = "someuser";
- Assert.Equal("Password=\"abc=def\";Data Source=testdb;User ID=someuser",
+ Assert.Equal("Password=\"PLACEHOLDER=def\";Data Source=testdb;User ID=someuser",
sb.ConnectionString);
// embedded semicolon in the value will cause the value to be
// delimited with double-quotes
sb = new DbConnectionStringBuilder();
- sb["Password"] = "abc;def";
+ sb["Password"] = "PLACEHOLDER;def";
sb["Data Source"] = "testdb";
sb["User ID"] = "someuser";
- Assert.Equal("Password=\"abc;def\";Data Source=testdb;User ID=someuser",
+ Assert.Equal("Password=\"PLACEHOLDER;def\";Data Source=testdb;User ID=someuser",
sb.ConnectionString);
// more right parentheses then left parentheses - happily takes it
@@ -2042,32 +2042,32 @@ namespace System.Data.Tests.Common
DbConnectionStringBuilder sb;
sb = new DbConnectionStringBuilder();
- sb.ConnectionString = "User ID=SCOTT;Password=TiGeR;Data Source=" + dataSource;
+ sb.ConnectionString = "User ID=SCOTT;Password=PLACEHOLDER;Data Source=" + dataSource;
Assert.Equal(dataSource, sb["Data Source"]);
Assert.Equal("SCOTT", sb["User ID"]);
- Assert.Equal("TiGeR", sb["Password"]);
+ Assert.Equal("PLACEHOLDER", sb["Password"]);
Assert.Equal(
- "user id=SCOTT;password=TiGeR;data source=\"(DESCRIPTION=(ADDRESS=(PROTOCOL=" +
+ "user id=SCOTT;password=PLACEHOLDER;data source=\"(DESCRIPTION=(ADDRESS=(PROTOCOL=" +
"TCP)(HOST=192.168.1.101)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)" +
"(SERVICE_NAME=TESTDB)))\"", sb.ConnectionString);
sb = new DbConnectionStringBuilder(false);
- sb.ConnectionString = "User ID=SCOTT;Password=TiGeR;Data Source=" + dataSource;
+ sb.ConnectionString = "User ID=SCOTT;Password=PLACEHOLDER;Data Source=" + dataSource;
Assert.Equal(dataSource, sb["Data Source"]);
Assert.Equal("SCOTT", sb["User ID"]);
- Assert.Equal("TiGeR", sb["Password"]);
+ Assert.Equal("PLACEHOLDER", sb["Password"]);
Assert.Equal(
- "user id=SCOTT;password=TiGeR;data source=\"(DESCRIPTION=(ADDRESS=(PROTOCOL=" +
+ "user id=SCOTT;password=PLACEHOLDER;data source=\"(DESCRIPTION=(ADDRESS=(PROTOCOL=" +
"TCP)(HOST=192.168.1.101)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)" +
"(SERVICE_NAME=TESTDB)))\"", sb.ConnectionString);
sb = new DbConnectionStringBuilder(true);
- sb.ConnectionString = "User ID=SCOTT;Password=TiGeR;Data Source=" + dataSource;
+ sb.ConnectionString = "User ID=SCOTT;Password=PLACEHOLDER;Data Source=" + dataSource;
Assert.Equal(dataSource, sb["Data Source"]);
Assert.Equal("SCOTT", sb["User ID"]);
- Assert.Equal("TiGeR", sb["Password"]);
+ Assert.Equal("PLACEHOLDER", sb["Password"]);
Assert.Equal(
- "user id=SCOTT;password=TiGeR;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=" +
+ "user id=SCOTT;password=PLACEHOLDER;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=" +
"TCP)(HOST=192.168.1.101)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)" +
"(SERVICE_NAME=TESTDB)))", sb.ConnectionString);
}
@@ -2078,24 +2078,24 @@ namespace System.Data.Tests.Common
DbConnectionStringBuilder sb;
sb = new DbConnectionStringBuilder();
- sb.ConnectionString = "PassWord=abcdef2;uSER iD=someuser;DaTa SoUrCe=testdb";
+ sb.ConnectionString = "PassWord=PLACEHOLDER;uSER iD=someuser;DaTa SoUrCe=testdb";
sb["Integrated Security"] = "False";
Assert.Equal(
- "password=abcdef2;user id=someuser;data source=testdb;Integrated Security=False",
+ "password=PLACEHOLDER;user id=someuser;data source=testdb;Integrated Security=False",
sb.ConnectionString);
sb = new DbConnectionStringBuilder(false);
- sb.ConnectionString = "PassWord=abcdef2;uSER iD=someuser;DaTa SoUrCe=testdb";
+ sb.ConnectionString = "PassWord=PLACEHOLDER;uSER iD=someuser;DaTa SoUrCe=testdb";
sb["Integrated Security"] = "False";
Assert.Equal(
- "password=abcdef2;user id=someuser;data source=testdb;Integrated Security=False",
+ "password=PLACEHOLDER;user id=someuser;data source=testdb;Integrated Security=False",
sb.ConnectionString);
sb = new DbConnectionStringBuilder(true);
- sb.ConnectionString = "PassWord=abcdef2;uSER iD=someuser;DaTa SoUrCe=testdb";
+ sb.ConnectionString = "PassWord=PLACEHOLDER;uSER iD=someuser;DaTa SoUrCe=testdb";
sb["Integrated Security"] = "False";
Assert.Equal(
- "password=abcdef2;user id=someuser;data source=testdb;Integrated Security=False",
+ "password=PLACEHOLDER;user id=someuser;data source=testdb;Integrated Security=False",
sb.ConnectionString);
}
diff --git a/src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TDSServerArguments.cs b/src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TDSServerArguments.cs
index d47f45a8ee..25fb64576c 100644
--- a/src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TDSServerArguments.cs
+++ b/src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TDSServerArguments.cs
@@ -88,7 +88,7 @@ namespace Microsoft.SqlServer.TDS.Servers
// By Default SQL authentication will be used.
FedAuthRequiredPreLoginOption = TdsPreLoginFedAuthRequiredOption.FedAuthNotRequired;
- EncryptionCertificate = new X509Certificate2("TdsServerCertificate.pfx", "SecretPassword123456");
+ EncryptionCertificate = new X509Certificate2("TdsServerCertificate.pfx", "PLACEHOLDER");
ServerPrincipalName = AzureADServicePrincipalName;
StsUrl = AzureADProductionTokenEndpoint;
diff --git a/src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TdsServerCertificate.pfx b/src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TdsServerCertificate.pfx
index a5c48e2aee..8d4afef7d2 100644
--- a/src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TdsServerCertificate.pfx
+++ b/src/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TdsServerCertificate.pfx
Binary files differ
diff --git a/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs b/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs
index e567669bdf..58d7ff2aed 100644
--- a/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs
+++ b/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs
@@ -159,7 +159,7 @@ namespace System.Net.Http.Tests
{
IWebProxy p;
- Environment.SetEnvironmentVariable("all_proxy", "http://foo:bar@1.1.1.1:3000");
+ Environment.SetEnvironmentVariable("all_proxy", "http://foo:PLACEHOLDER@1.1.1.1:3000");
Assert.True(HttpEnvironmentProxy.TryCreate(out p));
Assert.NotNull(p);
Assert.NotNull(p.Credentials);
@@ -171,7 +171,7 @@ namespace System.Net.Http.Tests
Assert.NotNull(p.Credentials);
// Use different user for http and https
- Environment.SetEnvironmentVariable("https_proxy", "http://foo1:bar1@1.1.1.1:3000");
+ Environment.SetEnvironmentVariable("https_proxy", "http://foo1:PLACEHOLDER@1.1.1.1:3000");
Assert.True(HttpEnvironmentProxy.TryCreate(out p));
Assert.NotNull(p);
Uri u = p.GetProxy(fooHttp);
@@ -194,7 +194,7 @@ namespace System.Net.Http.Tests
IWebProxy p;
Environment.SetEnvironmentVariable("no_proxy", ".test.com,, foo.com");
- Environment.SetEnvironmentVariable("all_proxy", "http://foo:bar@1.1.1.1:3000");
+ Environment.SetEnvironmentVariable("all_proxy", "http://foo:PLACEHOLDER@1.1.1.1:3000");
Assert.True(HttpEnvironmentProxy.TryCreate(out p));
Assert.NotNull(p);
diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriBuilderRefreshTest.cs b/src/System.Private.Uri/tests/FunctionalTests/UriBuilderRefreshTest.cs
index 5297577ff3..684f03286c 100644
--- a/src/System.Private.Uri/tests/FunctionalTests/UriBuilderRefreshTest.cs
+++ b/src/System.Private.Uri/tests/FunctionalTests/UriBuilderRefreshTest.cs
@@ -8,7 +8,7 @@ namespace System.PrivateUri.Tests
{
public class UriBuilderRefreshTest
{
- private static Uri s_starterUri = new Uri("http://user:psw@host:9090/path/file.txt?query#fragment");
+ private static Uri s_starterUri = new Uri("http://user:PLACEHOLDER@host:9090/path/file.txt?query#fragment");
[Fact]
public void UriBuilder_ChangeScheme_Refreshed()
diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs b/src/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs
index 31835a6602..510900f4fc 100644
--- a/src/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs
+++ b/src/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs
@@ -217,7 +217,7 @@ namespace System.PrivateUri.Tests
[InlineData(null, "")]
public void Password_Get_Set(string value, string expected)
{
- var uriBuilder = new UriBuilder("http://userinfo1:userinfo2@domain/path?query#fragment");
+ var uriBuilder = new UriBuilder("http://userinfo1:PLACEHOLDER@domain/path?query#fragment");
uriBuilder.Password = value;
Assert.Equal(expected, uriBuilder.Password);
diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs b/src/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs
index 12a9b2ac3f..c8bd2a2722 100644
--- a/src/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs
+++ b/src/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs
@@ -17,10 +17,10 @@ namespace System.PrivateUri.Tests
{
// See RFC 3986 Section 5.2.2 and 5.4 http://www.ietf.org/rfc/rfc3986.txt
- private readonly Uri _fullBaseUri = new Uri("http://user:psw@host:9090/path1/path2/path3/fileA?query#fragment");
- private const string FullBaseUriGetLeftPart_Path = "http://user:psw@host:9090/path1/path2/path3/fileA";
- private const string FullBaseUriGetLeftPart_Authority = "http://user:psw@host:9090";
- private const string FullBaseUriGetLeftPart_Query = "http://user:psw@host:9090/path1/path2/path3/fileA?query";
+ private readonly Uri _fullBaseUri = new Uri("http://user:PLACEHOLDER@host:9090/path1/path2/path3/fileA?query#fragment");
+ private const string FullBaseUriGetLeftPart_Path = "http://user:PLACEHOLDER@host:9090/path1/path2/path3/fileA";
+ private const string FullBaseUriGetLeftPart_Authority = "http://user:PLACEHOLDER@host:9090";
+ private const string FullBaseUriGetLeftPart_Query = "http://user:PLACEHOLDER@host:9090/path1/path2/path3/fileA?query";
[Fact]
public void Uri_Relative_BaseVsAbsolute_ReturnsFullAbsolute()
@@ -535,7 +535,7 @@ namespace System.PrivateUri.Tests
[Fact]
public void Uri_Relative_BaseMadeRelativeToSamePath_ReturnsQueryAndFragment()
{
- Uri compareUri = new Uri("http://user:psw@host:9090/path1/path2/path3/fileA?AQuery#AFragment");
+ Uri compareUri = new Uri("http://user:PLACEHOLDER@host:9090/path1/path2/path3/fileA?AQuery#AFragment");
Uri relative = _fullBaseUri.MakeRelativeUri(compareUri);
String expectedResult = "?AQuery#AFragment"; // compareUri.GetParts(UriComponents.Query | UriComponents.Fragment,UriFormat.Unescaped);
@@ -545,7 +545,7 @@ namespace System.PrivateUri.Tests
[Fact]
public void Uri_Relative_BaseMadeRelativeToLastSlash_ReturnsDotSlashPlusQueryAndFragment()
{
- Uri compareUri = new Uri("http://user:psw@host:9090/path1/path2/path3/?AQuery#AFragment");
+ Uri compareUri = new Uri("http://user:PLACEHOLDER@host:9090/path1/path2/path3/?AQuery#AFragment");
Uri relative = _fullBaseUri.MakeRelativeUri(compareUri);
Uri reassembled = new Uri(_fullBaseUri, relative); // Symetric
@@ -558,7 +558,7 @@ namespace System.PrivateUri.Tests
[Fact]
public void Uri_Relative_BaseMadeRelativeToLastSlash_ReturnsDotSlash()
{
- Uri compareUri = new Uri("http://user:psw@host:9090/path1/path2/path3/");
+ Uri compareUri = new Uri("http://user:PLACEHOLDER@host:9090/path1/path2/path3/");
Uri relative = _fullBaseUri.MakeRelativeUri(compareUri);
Uri reassembled = new Uri(_fullBaseUri, relative); // Symetric
@@ -570,7 +570,7 @@ namespace System.PrivateUri.Tests
[Fact]
public void Uri_Relative_BaseMadeRelativeToLastSlashWithExtra_ReturnsDotSlashPlusQueryAndFragment()
{
- Uri compareUri = new Uri("http://user:psw@host:9090/path1/path2/path3/Path4/fileb?AQuery#AFragment");
+ Uri compareUri = new Uri("http://user:PLACEHOLDER@host:9090/path1/path2/path3/Path4/fileb?AQuery#AFragment");
Uri relative = _fullBaseUri.MakeRelativeUri(compareUri);
Uri reassembled = new Uri(_fullBaseUri, relative); // Symetric
@@ -582,7 +582,7 @@ namespace System.PrivateUri.Tests
[Fact]
public void Uri_Relative_BaseMadeRelativeToSecondToLastSlash_ReturnsDoubleDotSlashPlusQueryAndFragment()
{
- Uri compareUri = new Uri("http://user:psw@host:9090/path1/path2/?AQuery#AFragment");
+ Uri compareUri = new Uri("http://user:PLACEHOLDER@host:9090/path1/path2/?AQuery#AFragment");
Uri relative = _fullBaseUri.MakeRelativeUri(compareUri);
Uri reassembled = new Uri(_fullBaseUri, relative); // Symetric
@@ -594,7 +594,7 @@ namespace System.PrivateUri.Tests
[Fact]
public void Uri_Relative_BaseMadeRelativeToThirdToLastSlash_ReturnsDoubleDoubleDotSlashPlusQueryAndFragment()
{
- Uri compareUri = new Uri("http://user:psw@host:9090/path1/?AQuery#AFragment");
+ Uri compareUri = new Uri("http://user:PLACEHOLDER@host:9090/path1/?AQuery#AFragment");
Uri relative = _fullBaseUri.MakeRelativeUri(compareUri);
Uri reassembled = new Uri(_fullBaseUri, relative); // Symetric
@@ -606,7 +606,7 @@ namespace System.PrivateUri.Tests
[Fact]
public void Uri_Relative_BaseMadeRelativeToEmptyPath_ReturnsTrippleDoubleDotSlashPlusQueryAndFragment()
{
- Uri compareUri = new Uri("http://user:psw@host:9090/?AQuery#AFragment");
+ Uri compareUri = new Uri("http://user:PLACEHOLDER@host:9090/?AQuery#AFragment");
Uri relative = _fullBaseUri.MakeRelativeUri(compareUri);
Uri reassembled = new Uri(_fullBaseUri, relative); // Symetric
diff --git a/src/System.Runtime/tests/System/Uri.CreateStringTests.cs b/src/System.Runtime/tests/System/Uri.CreateStringTests.cs
index bdc34d1e9e..aba3ce9db6 100644
--- a/src/System.Runtime/tests/System/Uri.CreateStringTests.cs
+++ b/src/System.Runtime/tests/System/Uri.CreateStringTests.cs
@@ -424,7 +424,7 @@ namespace System.Tests
yield return new object[] { "http://abc\u1234\u2345\u3456@host/", "http", "abc%E1%88%B4%E2%8D%85%E3%91%96", "host", UriHostNameType.Dns, 80, true, false };
yield return new object[] { "http://\u1234abc\u2345\u3456@host/", "http", "%E1%88%B4abc%E2%8D%85%E3%91%96", "host", UriHostNameType.Dns, 80, true, false };
yield return new object[] { "http://\u1234\u2345\u3456abc@host/", "http", "%E1%88%B4%E2%8D%85%E3%91%96abc", "host", UriHostNameType.Dns, 80, true, false };
- yield return new object[] { "http://userinfo!~+-_*()[]:;&$=123USERINFO@host/", "http", "userinfo!~+-_*()[]:;&$=123USERINFO", "host", UriHostNameType.Dns, 80, true, false };
+ yield return new object[] { "http://userinfo!~+-_*()[]:;&$=123PLACEHOLDER@host/", "http", "userinfo!~+-_*()[]:;&$=123PLACEHOLDER", "host", UriHostNameType.Dns, 80, true, false };
yield return new object[] { "http://%68%65%6C%6C%6F@host/", "http", "hello", "host", UriHostNameType.Dns, 80, true, false };
yield return new object[] { @"http://£@host/", "http", "%C2%A3", "host", UriHostNameType.Dns, 80, true, false };
yield return new object[] { "http://\u1234@host/", "http", "%E1%88%B4", "host", UriHostNameType.Dns, 80, true, false };
diff --git a/src/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs b/src/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs
index 1b240bf994..e3d85bed01 100644
--- a/src/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs
+++ b/src/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs
@@ -458,44 +458,44 @@ namespace System.Security.Cryptography.DeriveBytesTests
{
CaseName = "SHA256 alternate",
HashAlgorithmName = "SHA256",
- Password = "abcdefghij",
+ Password = "PLACEHOLDER",
Salt = ascii.GetBytes("abcdefghij"),
IterationCount = 1,
AnswerHex = (
// T-Block 1
- "9545B9CCBF915299F09BC4E8922B34B042F32689C072539FAEA739FCA4E782" +
+ "9352784113E5E6DC21FC82ADA3A321D64962F760DF6EAA8E46CEEF4FAF6C6E" +
// T-Block 2
- "27B792394D6C13DB121CD16683CD738CB1717C69B34EF2B29E32306D24FCDF"),
+ "EE6DB97E5852FC4C15FA7C52FACDEDE89B916BCC864028084A2CF0889F7F76"),
};
yield return new KnownValuesTestCase
{
CaseName = "SHA384 alternate",
HashAlgorithmName = "SHA384",
- Password = "abcdefghij",
+ Password = "PLACEHOLDER",
Salt = ascii.GetBytes("abcdefghij"),
IterationCount = 1,
AnswerHex = (
// T-Block 1
- "BB8CCC844224775A66E038E59B74B232232AE27C4BF9625BBF3E50317EDD9217BE7B7E07AA5697AF7D2617" +
+ "B9A10C6C82F36482D76C0C38C982C05F8BB21211ACBE1D1104B4F647DDEAEE179B92ACB0E00A304B791FD0" +
// T-Block 2
- "AC02F63AA2B0EC9697B1801E70BD10A6B58CE5DE83DD18F4FFD2E8D9289716510AA0A170EF1D145F4B3247"),
+ "3C6A08364D0A47CD1F15E0E314800FF3AC9CF2E93B3F81A5EB67FE9F2FE6E86B0430B59902CCB5FD190E67"),
};
yield return new KnownValuesTestCase
{
CaseName = "SHA512 alternate",
HashAlgorithmName = "SHA512",
- Password = "abcdefghij",
+ Password = "PLACEHOLDER",
Salt = ascii.GetBytes("abcdefghij"),
IterationCount = 1,
AnswerHex = (
// T-Block 1
- "9D6E96B14A53207C759DBB456B2F038170AF03389096E6EEB2161B3868D3E5" +
- "1265A25EF7D7433BF8718DB14F934B6054ACCEA283528AD11A669C7C85196F" +
+ "AD8CE08CFA8F932CF9FEDDCDB6E4BC6417D61F0465D408C0BFE9656E2C1C47" +
+ "1424537ADB2D9EBE4E4232F474EFEE2AF347F21A804F64CBC05474A6DCE0A5" +
// T-Block 2
- "B5DFAA2185446D6218EBC2D4030A83A4353B302E698C8521B6B69F7D5612EF" +
- "AF060798DF40183FE6B71F2D35C60FBE27DFE963EFEE52A5756323BA1A41F6"),
+ "078100F813C1F8388EC233C1397D5E18C6509B5483141EF836C15A34D6DC67" +
+ "A3C46A45798A2839CFD239749219E9F2EDAD3249EC8221AFB17C0028A4A0A5"),
};
}
diff --git a/src/System.Security.Cryptography.X509Certificates/tests/ExportTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/ExportTests.cs
index 24dfa156c5..49da45a565 100644
--- a/src/System.Security.Cryptography.X509Certificates/tests/ExportTests.cs
+++ b/src/System.Security.Cryptography.X509Certificates/tests/ExportTests.cs
@@ -68,7 +68,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests
[ActiveIssue(16705, TestPlatforms.OSX)]
public static void ExportAsPfxWithPassword()
{
- const string password = "Cotton";
+ const string password = "PLACEHOLDER";
using (X509Certificate2 c1 = new X509Certificate2(TestData.MsCertificate))
{
@@ -87,7 +87,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests
[ActiveIssue(16705, TestPlatforms.OSX)]
public static void ExportAsPfxVerifyPassword()
{
- const string password = "Cotton";
+ const string password = "PLACEHOLDER";
using (X509Certificate2 c1 = new X509Certificate2(TestData.MsCertificate))
{
@@ -103,7 +103,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests
{
Assert.True(cert.HasPrivateKey, "cert.HasPrivateKey");
- const string password = "Cotton";
+ const string password = "PLACEHOLDER";
byte[] pfx = cert.Export(X509ContentType.Pkcs12, password);
diff --git a/src/System.Security.Cryptography.Xml/tests/EncryptedXmlTest.cs b/src/System.Security.Cryptography.Xml/tests/EncryptedXmlTest.cs
index b004fcd5e6..e38c8d132f 100644
--- a/src/System.Security.Cryptography.Xml/tests/EncryptedXmlTest.cs
+++ b/src/System.Security.Cryptography.Xml/tests/EncryptedXmlTest.cs
@@ -143,9 +143,10 @@ namespace System.Security.Cryptography.Xml.Tests
{
using (Aes aes = Aes.Create())
{
+ byte[] keydata = Convert.FromBase64String("o/ilseZu+keLBBWGGPlUHweqxIPc4gzZEFWr2nBt640=");
aes.Mode = CipherMode.CBC;
aes.KeySize = 256;
- aes.Key = Convert.FromBase64String("o/ilseZu+keLBBWGGPlUHweqxIPc4gzZEFWr2nBt640=");
+ aes.Key = keydata;
aes.Padding = PaddingMode.Zeros;
XmlDocument doc = new XmlDocument();
@@ -174,10 +175,11 @@ namespace System.Security.Cryptography.Xml.Tests
using (Aes aes = Aes.Create())
{
+ byte[] keydata = Convert.FromBase64String("o/ilseZu+keLBBWGGPlUHweqxIPc4gzZEFWr2nBt640=");
aes.Mode = CipherMode.CBC;
aes.KeySize = 256;
aes.IV = Convert.FromBase64String("pBUM5P03rZ6AE4ZK5EyBrw==");
- aes.Key = Convert.FromBase64String("o/ilseZu+keLBBWGGPlUHweqxIPc4gzZEFWr2nBt640=");
+ aes.Key = keydata;
aes.Padding = PaddingMode.Zeros;
EncryptedXml exml = new EncryptedXml();
diff --git a/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs b/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs
index d18ed6baf6..e06545dfd8 100644
--- a/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs
+++ b/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs
@@ -662,7 +662,7 @@ namespace System.Security.Cryptography.Xml.Tests
Assert.Equal("IKbfdK2/DMfXyezCf5QggVCXfk8=", Convert.ToBase64String(digest));
- X509Certificate2 cert = new X509Certificate2(_pkcs12, "mono");
+ X509Certificate2 cert = new X509Certificate2(_pkcs12, "PLACEHOLDER");
SignedXml signedXml = new SignedXml(doc);
signedXml.SigningKey = cert.PrivateKey;
signedXml.SignedInfo.CanonicalizationMethod = SignedXml.XmlDsigExcC14NTransformUrl;
@@ -721,7 +721,7 @@ namespace System.Security.Cryptography.Xml.Tests
Assert.Equal("e3dsi1xK8FAx1vsug7J203JbEAU=", Convert.ToBase64String(digest));
- X509Certificate2 cert = new X509Certificate2(_pkcs12, "mono");
+ X509Certificate2 cert = new X509Certificate2(_pkcs12, "PLACEHOLDER");
SignedXml signedXml = new SignedXml(doc);
signedXml.SigningKey = cert.PrivateKey;
signedXml.SignedInfo.SignatureMethod = SignedXml.XmlDsigRSASHA1Url;
@@ -763,7 +763,7 @@ namespace System.Security.Cryptography.Xml.Tests
[Fact]
public void SignedXML_CRLF_Invalid()
{
- X509Certificate2 cert = new X509Certificate2(_pkcs12, "mono");
+ X509Certificate2 cert = new X509Certificate2(_pkcs12, "PLACEHOLDER");
XmlDocument doc = new XmlDocument();
doc.LoadXml(string.Format(CultureInfo.InvariantCulture,
@@ -826,7 +826,7 @@ namespace System.Security.Cryptography.Xml.Tests
[Fact]
public void SignedXML_CRLF_Valid()
{
- X509Certificate2 cert = new X509Certificate2(_pkcs12, "mono");
+ X509Certificate2 cert = new X509Certificate2(_pkcs12, "PLACEHOLDER");
XmlDocument doc = CreateSignedXml(cert, SignedXml.XmlDsigExcC14NTransformUrl, "\r\n");
Assert.Equal(string.Format(CultureInfo.InvariantCulture, "<person>{0}" +
@@ -883,7 +883,7 @@ namespace System.Security.Cryptography.Xml.Tests
[Fact]
public void SignedXML_LF_Valid()
{
- X509Certificate2 cert = new X509Certificate2(_pkcs12, "mono");
+ X509Certificate2 cert = new X509Certificate2(_pkcs12, "PLACEHOLDER");
XmlDocument doc = CreateSignedXml(cert, SignedXml.XmlDsigExcC14NTransformUrl, "\n");
Assert.Equal(string.Format(CultureInfo.InvariantCulture, "<person>{0}" +
@@ -941,7 +941,7 @@ namespace System.Security.Cryptography.Xml.Tests
public void MultipleX509Certificates()
{
XmlDocument doc = null;
- X509Certificate2 cert = new X509Certificate2(_pkcs12, "mono");
+ X509Certificate2 cert = new X509Certificate2(_pkcs12, "PLACEHOLDER");
doc = CreateSignedXml(cert, SignedXml.XmlDsigExcC14NTransformUrl, "\n");
Assert.True(VerifySignedXml(doc), "#1");
@@ -1068,137 +1068,25 @@ namespace System.Security.Cryptography.Xml.Tests
0x4c, 0xb9, 0x7d, 0x87, 0xc6, 0x2b, 0xf0, 0x41, 0xee, 0x6c, 0xba,
0x08, 0xcf, 0x69, 0x31, 0x18 };
- private static byte[] _pkcs12 = new byte[] {
- 0x30, 0x82, 0x05, 0x8d, 0x02, 0x01, 0x03, 0x30, 0x82, 0x05, 0x47,
- 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01,
- 0xa0, 0x82, 0x05, 0x38, 0x04, 0x82, 0x05, 0x34, 0x30, 0x82, 0x05,
- 0x30, 0x30, 0x82, 0x02, 0x3f, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
- 0xf7, 0x0d, 0x01, 0x07, 0x06, 0xa0, 0x82, 0x02, 0x30, 0x30, 0x82,
- 0x02, 0x2c, 0x02, 0x01, 0x00, 0x30, 0x82, 0x02, 0x25, 0x06, 0x09,
- 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0x30, 0x1c,
- 0x06, 0x0a, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x0c, 0x01,
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0x07,
- 0x01, 0xa0, 0x82, 0x02, 0xda, 0x04, 0x82, 0x02, 0xd6, 0x30, 0x82,
- 0x02, 0xd2, 0x30, 0x82, 0x02, 0xce, 0x06, 0x0b, 0x2a, 0x86, 0x48,
- 0x86, 0xf7, 0x0d, 0x01, 0x0c, 0x0a, 0x01, 0x02, 0xa0, 0x82, 0x02,
- 0xa6, 0x30, 0x82, 0x02, 0xa2, 0x30, 0x1c, 0x06, 0x0a, 0x2a, 0x86,
- 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x0c, 0x01, 0x03, 0x30, 0x0e, 0x04,
- 0x08, 0xe0, 0x21, 0x4f, 0x90, 0x7d, 0x86, 0x72, 0xc7, 0x02, 0x02,
- 0x07, 0xd0, 0x04, 0x82, 0x02, 0x80, 0x92, 0xac, 0xe8, 0x52, 0xa6,
- 0x3e, 0xed, 0x3d, 0xbc, 0x28, 0x5f, 0xb9, 0x45, 0x76, 0x27, 0x95,
- 0xf8, 0x6a, 0xc5, 0x17, 0x97, 0x46, 0x58, 0xe9, 0x15, 0x7c, 0x68,
- 0x62, 0x67, 0xb5, 0x2f, 0x1b, 0x64, 0x27, 0x9d, 0xfd, 0x67, 0x66,
- 0x42, 0x21, 0x5c, 0xf4, 0x64, 0x37, 0xcc, 0xc0, 0x04, 0x01, 0x91,
- 0x6c, 0x6b, 0x84, 0x96, 0xae, 0x04, 0xfe, 0xcc, 0x88, 0x6a, 0x84,
- 0xd7, 0x59, 0x28, 0x78, 0xc9, 0xb4, 0xf6, 0x4d, 0x86, 0x8d, 0x59,
- 0xc6, 0x74, 0x30, 0xca, 0x2f, 0x0a, 0xa7, 0x66, 0x99, 0xf4, 0x8f,
- 0x44, 0x6d, 0x97, 0x3c, 0xd6, 0xdb, 0xd6, 0x31, 0x8c, 0xf7, 0x75,
- 0xd9, 0x0b, 0xf5, 0xd2, 0x27, 0x80, 0x81, 0x28, 0x0f, 0x6b, 0x8b,
- 0x45, 0x11, 0x08, 0x1d, 0x06, 0x31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 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09,
- 0x15, 0x31, 0x06, 0x04, 0x04, 0x01, 0x00, 0x00, 0x00, 0x30, 0x3d,
- 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a,
- 0x05, 0x00, 0x04, 0x14, 0x32, 0x55, 0x07, 0xa2, 0x67, 0xf3, 0x76,
- 0x4d, 0x0b, 0x6f, 0xa4, 0xa0, 0x7b, 0xce, 0x2f, 0xc5, 0xff, 0xbe,
- 0x3e, 0x38, 0x04, 0x14, 0x52, 0xf8, 0xb3, 0xeb, 0xc3, 0xda, 0x79,
- 0xfa, 0x75, 0x89, 0x67, 0x33, 0x01, 0xd0, 0xb0, 0x13, 0xfa, 0x11,
- 0x94, 0xac, 0x02, 0x02, 0x07, 0xd0 };
+ private static byte[] _pkcs12 = Convert.FromBase64String(@"
+MIIFoQIBAzCCBWcGCSqGSIb3DQEHAaCCBVgEggVUMIIFUDCCAk8GCSqGSIb3DQEHBqCCAkAwggI8AgEAMIICNQYJKoZIhvcNAQcBMBwGCiqGSIb3
+DQEMAQYwDgQI5L3Ub8odcrcCAggAgIICCD+js0jgpI2kndrNEpsVW2hjtms//GtjAd0cdMemEHjGwCWycMGFjA9pwJQ6KCadmq9z5gaiOmp7RHCh
+rXDTZEQ9ox0FEuHb2e37jheuWN84Av0Z+DX/leSv1g+du5YXW1tEoAXOy1qRle+ccSVsWe9MXf/aEfSGmMnV5mj+v2twjSFcD3bFAx5XmeP6sGjR
+doGDdIWGkTr94XczdoK1rJPF5BrVzdjcNh5+8yLh0aWixAxjkSQlc95d2TK464YzwQcJKm21H+43Wn4GI4cV4ifZ607/64uPnTPDFT2KI7+rTsJd
++Qo+rz65wVe7T6zsqUyC5o0S41ezBlWHW+EBP+Jupji3JF4aAzOAwkeX/zF9oNveXGTyKc7M73p9M9SIrS9AnFS78NBlBF5DFj1QvGpeawB/RBIY
+nGVbdfHPxgLyZC+RoM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jCgJFhzpPup0tlxGkP2lsixaqwR90CPX+tfuDGVAISVW
+ihC2/gKdZEMZmU+93ef/qakzP4ITwQ/1KNt2ue9twV8CD4SFSryHwQoKVy2Oz3wiABcYlxpxjTir5OlBz84AoGNHa8HnYXwLHd6kSnBx+R8UOi9u
+bvWmYaCaPfgfxpcxJTAjBgkqhkiG9w0BCRUxFgQUC9DfoAITl/oaT3u9jmeopQju2ikwMTAhMAkGBSsOAwIaBQAEFOh2zDdsYqMQ8vNLzWnDogeJ
+4KthBAjYc6FBEeyGYgICCAA=");
public SignedXml SignHMAC(string uri, KeyedHashAlgorithm mac, bool expectedToVerify)
{
diff --git a/src/System.Security.Cryptography.Xml/tests/TestHelpers.cs b/src/System.Security.Cryptography.Xml/tests/TestHelpers.cs
index 6dfdb6aff5..ed57bc330e 100644
--- a/src/System.Security.Cryptography.Xml/tests/TestHelpers.cs
+++ b/src/System.Security.Cryptography.Xml/tests/TestHelpers.cs
@@ -186,11 +186,11 @@ namespace System.Security.Cryptography.Xml.Tests
}
private static readonly byte[] SamplePfx = Convert.FromBase64String(
- @"MIIFpQIBAzCCBV8GCSqGSIb3DQEHAaCCBVAEggVMMIIFSDCCAl8GCSqGSIb3DQEHBqCCAlAwggJMAgEAMIICRQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIGTfVa4+vR1UCAgfQgIICGJuFE9alFWJFkaoeewKDIEnVwRxXfMsi8dcySYnp7jljEUQBfW/GIbOf7Lg2nHd0qxvxYI2YL4Zs+d0jWbqfNHamGFCMPe1dK957Z2PsKXR183vMSgnmlLAHktsIN+Gor7q1GbQ4ljfZkGqZ/rkgUsgsSYZSnJevP/uH0VnvxemljVJ7N7gKMYO0aqrca4qJ0O4YxBYyaerPFUOYunQlvk6DOF3SQXza5oFKcPGrSpE/9eQrnmm64BtbdnUE6qqEjfZfNa6MOD3vOnapLUBsel2TtVCu8tEl7I8FGxozTLXVTXOBkL3k7xLRS52ZtpbcU2JIhlDGpxeFXmjK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DUQNVaqM/5wrCR5M6LeAcyn0v/O1eYiVrSMe3UiqQO7U7Q8B1P2usS7Z2nuq6/PTHIUxJTAjBgkqhkiG9w0BCRUxFgQU7pIhWsIBVCkxlqGvRxgIM0O2LcUwMTAhMAkGBSsOAwIaBQAEFD14Ryp7yXCPNFqqsG1CTrb5l12uBAhGCzGln9YWkgICCAA=");
public static X509Certificate2 GetSampleX509Certificate()
{
- return new X509Certificate2(SamplePfx, "mono");
+ return new X509Certificate2(SamplePfx, "PLACEHOLDER");
}
public static Stream LoadResourceStream(string resourceName)