Click or drag to resize

Oid2Register Method

Registers object identifier in the OID database, either, local or in Active Directory.

Namespace:  System.Security.Cryptography
Assembly:  SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.0.0)
Syntax
public static Oid2 Register(
	string value,
	string friendlyName,
	OidGroupEnum group,
	bool writeInDirectory,
	CultureInfo localeId,
	string cpsUrl = null
)

Parameters

value
Type: SystemString
An object identifier value to register.
friendlyName
Type: SystemString
A friendly name associated with the object identifier.
group
Type: System.Security.CryptographyOidGroupEnum
Specifies the OID group where specified object identifier should be registered.
writeInDirectory
Type: SystemBoolean
Specifies, whether object is registered locally or in Active Directory.
localeId
Type: System.GlobalizationCultureInfo
Specifies the locale ID. This parameter can be used to provide localized friendly name. This parameter can be used only when writeInDirectory is set to True in other cases it is silently ignored.
cpsUrl (Optional)
Type: SystemString
Specifies the URL to a certificate practice statement (CPS) location.

Return Value

Type: Oid2
Registered object identifier.
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue and/or friendlyName is null or empty.
ArgumentException Specified OID group is not supported. See Remarks section for more details.
InvalidDataExceptionvalue parameter is not object idnetifier value.
NotSupportedException A caller chose OID registration in Active Directory, however, the current computer is not a member of any Active Directory domain.
InvalidOperationException An object identifier is already registered.
Remarks

Permissions: for this method to succeed, the caller must be a member of the local administrators group (if writeInDirectory is set to False) or be a member of Enterprise Admins group or has delegated write permissions on the OID container in Active Directory. OID container location is CN=OID, CN=Public Key Services, CN=Services,CN=Configuration, {Configuration naming context}.

A newly registered OID is not resolvable by an application immediately. You may need to restart an application to allow new OID lookup.

When writeInDirectory is set to True, group parameter is limited only to one of the following value: ApplicationPolicy,IssuancePolicy and CertificateTemplate. Other OID groups are not allowed to be stored in Active Directory.

See Also