| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | #nullable enable |
| | | 4 | | |
| | | 5 | | using System.Security.Cryptography.X509Certificates; |
| | | 6 | | |
| | | 7 | | namespace Ice.SSL; |
| | | 8 | | |
| | | 9 | | /// <summary> |
| | | 10 | | /// Provides access to the connection details of an SSL connection. |
| | | 11 | | /// </summary> |
| | | 12 | | public sealed class ConnectionInfo : Ice.ConnectionInfo |
| | | 13 | | { |
| | | 14 | | /// <summary> |
| | | 15 | | /// The negotiated cipher suite. |
| | | 16 | | /// </summary> |
| | | 17 | | public readonly string cipher; |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// The peer's certificate, in a single-element array; empty when the peer did not provide a certificate. |
| | | 21 | | /// </summary> |
| | | 22 | | public readonly X509Certificate2[] certs; |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// The certificate verification status. This field is always <see langword="true" />: a connection whose |
| | | 26 | | /// certificate verification fails is aborted during the SSL handshake. |
| | | 27 | | /// </summary> |
| | | 28 | | public readonly bool verified; |
| | | 29 | | |
| | | 30 | | internal ConnectionInfo(Ice.ConnectionInfo underlying, string cipher, X509Certificate2[] certs, bool verified) |
| | 1 | 31 | | : base(underlying) |
| | | 32 | | { |
| | 1 | 33 | | this.cipher = cipher; |
| | 1 | 34 | | this.certs = certs; |
| | 1 | 35 | | this.verified = verified; |
| | 1 | 36 | | } |
| | | 37 | | } |