Click or drag to resize
MimeKit

BouncyCastleCertificateExtensionsGetSubjectDnsNames Method

Get the subject domain names of the certificate.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.10.0
Syntax
C#
public static string[] GetSubjectDnsNames(
	this X509Certificate certificate,
	bool idnEncode = false
)

Parameters

certificate  X509Certificate
The certificate.
idnEncode  Boolean  (Optional)
If set to , international domain names will be IDN encoded.

Return Value

String
The subject DNS names.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type X509Certificate. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptioncertificate is .
Remarks

Gets the subject DNS names of the certificate.

Some S/MIME certificates are domain-bound instead of being bound to a particular email address.

See Also