Skip to content

Expose the cipher suite and SslStream #46442

@xiaoyangwang-geotab

Description

@xiaoyangwang-geotab

Hello .NET Core Team,

I hope this message finds you well. I am reaching out to request assistance in retrieving the cipher suite of each connection in my application.

I understand that this information is important for ensuring the security of the connection and I would like to know the steps to retrieve it using .NET Core.

I tried to use ITlsHandshakeFeature retrieved from HttpContext, but I could only get the CipherAlgorithm, and both HashAlgorithm and KeyExchangeAlgorithm get None. Also, when I debug, I found a private field _sslSream in the ITlsHandshakeFeature which gave me the cipher suite value from its property NegotiatedCipherSuite. But unfortunately, I couldn't find a way to access the sslStream.

If there are any classes, methods or resources that you can recommend or provide, I would be grateful. I would also appreciate any additional information or guidance that you can offer on this matter.

Thank you for your time and assistance. I look forward to your response.

Best regards,
Xiaoyang

Metadata

Metadata

Assignees

Labels

area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions