SSLStream and OpenSSL

Anonymous
2024-07-26T00:22:31+00:00

This is what CoPilot tells me about SSLStream and OpenSSL 

What if I want to use a SSLStream/OpenSSL for Windows (not Schannel) is there a way to have SSLStream explicitly use OpenSSL?

Windows for business Windows Server Directory services Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes
Accepted answer
  1. Anonymous
    2024-07-26T06:58:39+00:00

    Hi John TicehurstEB,

    Thank you for posting in the Microsoft Community Forums.

    In the .NET framework (including newer versions of .NET Core and .NET 5/6/7), the SSLStream class is a high-level abstraction for providing a cryptographic communication stream, which typically relies on underlying cryptographic libraries to implement SSL/TLS functionality. On Windows platforms, SSLStream will typically use Windows' own cryptographic service providers (such as Schannel), while on non-Windows platforms (such as Linux and macOS) it may use OpenSSL.

    However, if you wish to explicitly use OpenSSL instead of Schannel on Windows platforms, the standard .NET libraries do not directly support this choice.

    You can try using a custom cryptographic layer.

    In your application, you can implement an OpenSSL-based cryptographic layer yourself, and then encapsulate this layer into an interface similar to SSLStream. This involves using OpenSSL's C/C++ API or other high-level encapsulation (such as the C API provided by libssl) to manage SSL/TLS connections. You can then call these native methods in your .NET code via P/Invoke or other mechanisms.

    Best regards

    Neuvi Jiang

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful