Skip to content

Commit cb063fd

Browse files
committed
Merge pull request dotnet#9 from pgavlin/sn2
Merge corefx/master into sn2.
2 parents a5e8e7f + b7dd56d commit cb063fd

File tree

714 files changed

+105141
-11380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

714 files changed

+105141
-11380
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ indent_size = 2
2222
# Xml config files
2323
[*.{props,targets,config,nuspec}]
2424
indent_size = 2
25+
26+
# Shell scripts
27+
[*.sh]
28+
end_of_line = lf
29+
[*.{cmd, bat}]
30+
end_of_line = crlf

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@
6161
#*.PDF diff=astextplain
6262
#*.rtf diff=astextplain
6363
#*.RTF diff=astextplain
64+
65+
# Force bash scripts to always use lf line endings so that if a repro is accessed
66+
# in Unix via a file share from Windows, the scripts will work.
67+
*.sh text eol=lf

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ csx/
147147
AppPackages/
148148

149149
# Others
150-
sql/
151150
*.Cache
152151
ClientBin/
153152
[Ss]tyle[Cc]op.*

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ More libraries are coming soon (the overall list of items we currently plan to m
9393
|<sub>**System.Linq.Queryable**<br/>[![MyGet Package](https://img.shields.io/myget/dotnet-core/v/System.Linq.Queryable.svg)](https://www.myget.org/gallery/dotnet-core)</sub>|<sub>Provides LINQ standard query operators that operate on objects that implement ```IQueryable<T>```.</sub>|
9494
|<sub>**System.Net.Http**<br/>[![MyGet Package](https://img.shields.io/myget/dotnet-core/v/System.Net.Http.svg)](https://www.myget.org/gallery/dotnet-core)</sub>|<sub>Provides a programming interface for modern HTTP applications, including HTTP client components that allow applications to consume web services over HTTP and HTTP components that can be used by both clients and servers for parsing HTTP headers.</sub>|
9595
|<sub>**System.Net.Http.WinHttpHandler**<br/>[![MyGet Package](https://img.shields.io/myget/dotnet-core/v/System.Net.Http.WinHttpHandler.svg)](https://www.myget.org/gallery/dotnet-core)</sub>|<sub>Provides a message handler for HttpClient based on the WinHTTP interface of Windows. While similar to HttpClientHandler, it provides developers more granular control over the application's HTTP communication than the HttpClientHandler.</sub>|
96+
|<sub>**System.Net.NameResolution**<br/>[![MyGet Package](https://img.shields.io/myget/dotnet-core/v/System.Net.NameResolution.svg)](https://www.myget.org/gallery/dotnet-core)</sub>|<sub>Provides the System.Net.Dns class, which enables developers to perform simple domain name resolution.</sub>|
9697
|<sub>**System.Net.Primitives**<br/>[![MyGet Package](https://img.shields.io/myget/dotnet-core/v/System.Net.Primitives.svg)](https://www.myget.org/gallery/dotnet-core)</sub>|<sub>Provides common types for network-based libraries, including System.Net.IPAddress, System.Net.IPEndPoint, and System.Net.CookieContainer.</sub>|
9798
|<sub>**System.Net.Requests**<br/>[![MyGet Package](https://img.shields.io/myget/dotnet-core/v/System.Net.Requests.svg)](https://www.myget.org/gallery/dotnet-core)</sub>|<sub>Provides older classes (such as HttpWebRequest and HttpWebResponse) for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. _This library is available primarily for compatibility; developers should prefer the classes in the System.Net.Http package._</sub>|
9899
|<sub>**System.Net.WebHeaderCollection**<br/>[![MyGet Package](https://img.shields.io/myget/dotnet-core/v/System.Net.WebHeaderCollection.svg)](https://www.myget.org/gallery/dotnet-core)</sub>|<sub>Contains types that represent HTTP request and response headers. This library is used with classes such as System.Net.HttpWebRequest and System.Net.HttpWebResponse and allows developers to query/edit header names/values.</sub>|

dir.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<!-- Build Tools Versions -->
1212
<PropertyGroup>
13-
<BuildToolsVersion>1.0.25-prerelease-00079</BuildToolsVersion>
13+
<BuildToolsVersion>1.0.25-prerelease-00080</BuildToolsVersion>
1414
<DnxVersion>1.0.0-beta5-12101</DnxVersion>
1515
<DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'!='Unix'">dnx-coreclr-win-x86.$(DnxVersion)</DnxPackageName>
1616
<DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'=='Unix'">dnx-mono.$(DnxVersion)</DnxPackageName>

src/.nuget/packages.Unix.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.DotNet.BuildTools" version="1.0.25-prerelease-00079" />
3+
<package id="Microsoft.DotNet.BuildTools" version="1.0.25-prerelease-00080" />
44
<package id="Microsoft.DotNet.BuildTools.ApiTools" version="1.0.0-prerelease" />
55
<package id="dnx-mono" version="1.0.0-beta5-12101" />
66
<package id="Microsoft.Net.ToolsetCompilers" version="1.0.0-rc3-20150510-01" />
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.DotNet.BuildTools" version="1.0.25-prerelease-00079" />
3+
<package id="Microsoft.DotNet.BuildTools" version="1.0.25-prerelease-00080" />
44
<package id="dnx-coreclr-win-x86" version="1.0.0-beta5-12101" />
55
<package id="Microsoft.DotNet.BuildTools.ApiTools" version="1.0.0-prerelease" />
66
</packages>

src/Common/src/Internal/Cryptography/HashProviderCng.cs

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,33 @@ public HashProviderCng(string hashAlgId, byte[] key)
3333

3434
_hAlgorithm = Interop.BCrypt.BCryptAlgorithmCache.GetCachedBCryptAlgorithmHandle(hashAlgId, dwFlags);
3535

36-
SafeBCryptHashHandle hHash = null;
37-
NTSTATUS ntStatus = Interop.BCrypt.BCryptCreateHash(_hAlgorithm, out hHash, IntPtr.Zero, 0, key, key == null ? 0 : key.Length, BCryptCreateHashFlags.BCRYPT_HASH_REUSABLE_FLAG);
38-
if (ntStatus == NTSTATUS.STATUS_INVALID_PARAMETER)
36+
// Win7 won't set hHash, Win8+ will; and both will set _hHash.
37+
// So keep hHash trapped in this scope to prevent (mis-)use of it.
3938
{
40-
// If we got here, we're running on a downlevel OS (pre-Win8) that doesn't support reusable CNG hash objects. Fall back to creating a
41-
// new HASH object each time.
42-
ResetHashObject();
43-
}
44-
else if (ntStatus != NTSTATUS.STATUS_SUCCESS)
45-
{
46-
throw Interop.BCrypt.CreateCryptographicException(ntStatus);
47-
}
48-
else
49-
{
50-
_hHash = hHash;
51-
_reusable = true;
39+
SafeBCryptHashHandle hHash = null;
40+
NTSTATUS ntStatus = Interop.BCrypt.BCryptCreateHash(_hAlgorithm, out hHash, IntPtr.Zero, 0, key, key == null ? 0 : key.Length, BCryptCreateHashFlags.BCRYPT_HASH_REUSABLE_FLAG);
41+
if (ntStatus == NTSTATUS.STATUS_INVALID_PARAMETER)
42+
{
43+
// If we got here, we're running on a downlevel OS (pre-Win8) that doesn't support reusable CNG hash objects. Fall back to creating a
44+
// new HASH object each time.
45+
ResetHashObject();
46+
}
47+
else if (ntStatus != NTSTATUS.STATUS_SUCCESS)
48+
{
49+
throw Interop.BCrypt.CreateCryptographicException(ntStatus);
50+
}
51+
else
52+
{
53+
_hHash = hHash;
54+
_reusable = true;
55+
}
5256
}
5357

5458
unsafe
5559
{
5660
int cbSizeOfHashSize;
5761
int hashSize;
58-
ntStatus = Interop.BCrypt.BCryptGetProperty(hHash, Interop.BCrypt.BCryptPropertyStrings.BCRYPT_HASH_LENGTH, &hashSize, sizeof(int), out cbSizeOfHashSize, 0);
62+
NTSTATUS ntStatus = Interop.BCrypt.BCryptGetProperty(_hHash, Interop.BCrypt.BCryptPropertyStrings.BCRYPT_HASH_LENGTH, &hashSize, sizeof(int), out cbSizeOfHashSize, 0);
5963
if (ntStatus != NTSTATUS.STATUS_SUCCESS)
6064
throw Interop.BCrypt.CreateCryptographicException(ntStatus);
6165
_hashSize = hashSize;

src/Common/src/Interop/BSD/libc/Interop.readdir.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/Common/src/Interop/FreeBSD/libc/Interop.OpenFlags.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)