Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mono/mono
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: omerdun/mono
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Dec 5, 2014

  1. Add default behavior to certificate selection callback.

    The current state:
    In case of creation of an SslStream object using the constructor with 3
    parameters (without explicitly providing the
    LocalCertificateSelectionClassbackDelegate) no certificate is ever
    selected.
    A problomatic scenario:
    1. Server and Client are using SslStream class in order to perform 2-way
    ssl. The client calls AutheticateAsClient with exactly one client
    certificate in the X509CertificateCollection.
    2. The client initialize the SslStream class using the constructor with
    3 parameters.
    The operation will be failed for sure.
    
    In fact the problem is not that easy to detect\debug - because in case
    the certificate selection callback is null there is no "Fail-First"
    exception - and simply the client returns a certificate with 0 bytes to
    the server; then the server hit an exception.
    
    The fix is quite simple - just add a defualt behavior of certificate
    selection method (which simply selects the first certificate in the
    collection).
    
    I also tested it in .Net enviornment and it also provide a similar
    default behavior.
    omerdun committed Dec 5, 2014
    Configuration menu
    Copy the full SHA
    6700bb1 View commit details
    Browse the repository at this point in the history
Loading