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

will try and see #1

Open
wants to merge 5,375 commits into
base: master
Choose a base branch
from
Open

will try and see #1

wants to merge 5,375 commits into from

Conversation

prasad-adslot
Copy link

No description provided.

eerhardt and others added 30 commits October 21, 2015 00:42
1st shims for the LibSsl library.
…onse stream

Discovered during testing with DEBUG version of CoreCLR running internal ToF tests. The design of the WinHttpRequestState is such that it stays alive due to a GCHandle.Alloc(this) in its constructor. This keeps the object alive during any of the native WinHTTP callbacks. However, the object was being prematurely disposed during the Dispose() of the WinHttpResponseStream. Instead, it should have been explicitly disposed during the final HANDLE_CLOSING callback from WinHTTP when the request handle was disposed. The early disposing of the WinHttpRequestState object was doing a GCHandle.Free() of the state object. This later caused an Assert() in the DEBUG version of the CoreCLR when doing GCHandle.FromIntPtr() indicating that the handle was already deallocated.
When using standard input redirection on Unix with System.Diagnostics.Process, the code would emit a BOM. This screws up many unix tools which don't understand the BOM.
Address PR feedback for System.Net.Sockets.
There are a number of clean up tasks that came out of the first 2 rounds of libssl shim work.

1. Add some Debug.Asserts when reading/writing to buffers.
2. Split the SSL extern methods into a separate class from the Interop.Crypto class. This allows the minimum amount of intialization to occur as needed. It also better keeps libssl separate from libcrypto shims.
3. Use a configure.cmake and #cmakedefine01 feature in our CMake file to create defines. This is consistent with CoreCLR and the other of CoreFX shims.
Clean up current libssl shim work.
Fix assert and leak of WinHttpRequestState object
Stop emitting a BOM into stdin when using System.Diagnostics.Process
Enabling the interpreter in all builds.
Made Encode methods virtual to make it easier to write mocks
Fixing interpreter for NullReferenceException behavior in Unbox.
If it does not exist, `typedef in_addr in_pktinfo`.
I also moved the SSL SafeHandle classes out of the Interop class to be
better aligned with the rest of the SafeHandles.
Instead of having managed code duplicate the SSL_CIPHER struct, moving all the code that uses the cipher struct into a native shim method.

That also pulled a lot of algorithm constants to be defined in native instead of managed.
When calculating generations I wasn't considering transient
dependencies.  I was assuming that if a dependency wasn't
tracked by generations it wouldn't impact the generation
of the depender.  That was incorrect since every assembly
effectively has a generation.  This updates the algorithm to
walk the entire dependency graph when calculating the generation

I also wasn't validating support for targeting generations: PCLs
consuming the packages.  I was only testing for specific
platforms.   I added validation for generation monikers and
derived the support matrix for these from the specific platforms.

This uncovered a handful of bugs which I have fixed.

[tfs-changeset: 1540300]
Add mvid and metadata token API to S.R.TypeExtensions
bartonjs and others added 30 commits October 27, 2015 20:16
OpenSSL doesn't have a direct encoder for KeyUsage.  Utilizing its encoder would require one of
* calling ASN1_BIT_STRING_set_bit for each bit
* Presuming its data encoding and building it directly
    * The complicated part is setting the "number of unused bits" value
* Making a native function which does the bit-testing and calls ASN1_BIT_STRING_set_bit itself
    * But what order should the bits be assigned in?

So, instead just add support for encoding a "NamedBitList" bit string to the fledgling DerEncoder.
Adding a native shim for curl_version_info and removing the managed constants that are no longer needed.
This removes all direct dependencies from managed code
to native libc functions.

Fix #4106
…to getdomainname and looking for a warning.

Fixing unused parameters build error on OSX.

Update for PR feedback.
- Collapse the 3 HAVE_INOTIFY defines into a single define.
…s and fail on errors, instead of checking for -Wshorten in the build output.
Add shim for libcurl version info.
Adding Compile(bool) overload to ref file for System.Linq.Expressions.
Make RuntimeInformation work on Net 4.5
Add shims for the rest of the libc native calls.
Make Unix HttpClient use X509Chain instead of the default chain validator
System.Net.WebHeaderCollection already had a SubstringTrim helper that's used instead of Substring(...).Trim() to avoid first creating the substring and then trimming it, instead just offsetting the startIndex and length appropriately to do the Substring once.

I've factored this helper out into Common, added unit tests, cleaned it up a bit, and used it in several more places in System.Net.
Support Correct exception for windows authentication failure on Xplat
Implement EncodeX509KeyUsageExtension for Unix
Replace Substring(...).Trim() with SubstringTrim(...)
Today on Windows if no debugger is attached, Debug.Assert fail fasts, which makes diagnosing difficult in a continuous integration environment; it also causes any other tests in the same process to be abandoned.

This commit changes Assert to instead write to stderr and throw an exception in such situations.  The exception helps to ensure that code containing the assert is alerted to the failure, and the stderr output helps to ensure that it's noticed even if the exception is eaten.
…dding

a leg to the PR builds that will fail the leg if the native code violates
our code style; also, running the formatting script
…ements

Cross plat dev workflow improvements.
Change Debug.Assert on Windows when no debugger attached
The lack of these statements was breaking the TFS build.

Fixes #4143.
If you pipe from a managed app to another app that ends (or doesn't exist to begin with), attempting to write to it via Console will throw an exception due to the pipe getting broken.

This commit just changes Console's Write to ignore EPIPE (broken pipe) errors.  For now I still have it throw an other failures, but we could choose to add additional ignored errno values to the list, or simply not throw for anything.
…derr

Revert "Change Debug.Assert on Windows when no debugger attached"
Add some missing using statements.
Ignore EPIPE errors on Unix when writing to Console
Adding a PR leg to run our style check and bringing native code into style compliance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.