X500DistinguishedNameBuilder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Facilitates building a distinguished name for an X.509 certificate.
public ref class X500DistinguishedNameBuilder sealed
public sealed class X500DistinguishedNameBuilder
type X500DistinguishedNameBuilder = class
Public NotInheritable Class X500DistinguishedNameBuilder
- Inheritance
-
X500DistinguishedNameBuilder
Remarks
When constructing the SEQUENCE OF
Relative Distinguished Names
, this builder constructs the SEQUENCE OF
in the opposite order which they were added to the builder. For example:
builder.AddCommonName("Contoso");
builder.AddCountryOrRegion("US");
Will produce a SEQUENCE OF
with the country or region first, and the common name second. Because X500DistinguishedName follows RFC 4514
when converting a Distinguished Name
to a string, it starts with the last Relative Distinguished Name
component, moving backward toward the first.
Because the builder creates the SEQUENCE OF
in reverse, and X500DistinguishedName is also in reverse, it gives the appearance of the added attributes and the string representation of the Distinguished Name
in the same order.
Constructors
X500DistinguishedNameBuilder() |
Initializes a new instance of the X500DistinguishedNameBuilder class. |
Methods
Add(Oid, String, Nullable<UniversalTagNumber>) |
Adds a |
Add(String, String, Nullable<UniversalTagNumber>) |
Adds a |
AddCommonName(String) |
Adds a common name attribute. |
AddCountryOrRegion(String) |
Adds a country or region attribute. |
AddDomainComponent(String) |
Adds a domain component attribute. |
AddEmailAddress(String) |
Adds an email address attribute. |
AddLocalityName(String) |
Adds a locality name attribute. |
AddOrganizationalUnitName(String) |
Adds an organizational unit name attribute. |
AddOrganizationName(String) |
Adds an organization name attribute. |
AddStateOrProvinceName(String) |
Adds a state or province name attribute. |
Build() |
Builds an X500DistinguishedName that represents the encoded attributes. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |