Class ServerName
- Namespace
- Org.BouncyCastle.Tls
- Assembly
- BouncyCastle.Cryptography.dll
RFC 6066 3. Server Name Indication
public sealed class ServerName
- Inheritance
-
ServerName
- Inherited Members
Remarks
Current implementation uses this guidance: "For backward compatibility, all future data structures associated with new NameTypes MUST begin with a 16-bit length field. TLS MAY treat provided server names as opaque data and pass the names and types to the application.". RFC 6066 specifies ASCII encoding for host_name (possibly using A-labels for IDNs), but note that the previous version (RFC 4366) specified UTF-8 encoding (see RFC 6066 Appendix A). For maximum compatibility, it is recommended that client code tolerate receiving UTF-8 from the peer, but only generate ASCII itself.
Constructors
ServerName(short, byte[])
public ServerName(short nameType, byte[] nameData)
Parameters
Properties
NameData
public byte[] NameData { get; }
Property Value
- byte[]
NameType
public short NameType { get; }
Property Value
Methods
Encode(Stream)
Encode this ServerName to a Stream.
public void Encode(Stream output)
Parameters
Exceptions
Parse(Stream)
Parse a ServerName from a Stream.
public static ServerName Parse(Stream input)
Parameters
Returns
- ServerName
a ServerName object.