DsAiaContainerAddCertificate Method |
Adds CA certificate to AIA entry as CA certificate or cross-certificate. The type is determined by
type
parameter.
Note: 'userCertificate' type is not supported by this method.
Namespace:
SysadminsLV.PKI.Management.ActiveDirectory
Assembly:
SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.0.0)
Syntax public bool AddCertificate(
X509Certificate2 cert,
DsCertificateType type
)
Public Function AddCertificate (
cert As X509Certificate2,
type As DsCertificateType
) As Boolean
public:
bool AddCertificate(
X509Certificate2^ cert,
DsCertificateType type
)
member AddCertificate :
cert : X509Certificate2 *
type : DsCertificateType -> bool
Parameters
- cert
- Type: System.Security.Cryptography.X509CertificatesX509Certificate2
CA certificate to add. - type
- Type: SysadminsLV.PKI.Management.ActiveDirectoryDsCertificateType
Certificate type. Can be either 'CACertificate' or 'CrossCertificate'.
Return Value
Type:
BooleanTrue if this is a new certificate and no duplicates exist. If certificate entry
already exists in internal list, method returns
False.
Exceptions Exception | Condition |
---|
ArgumentException |
specified certificate type is not valid.
|
UninitializedObjectException | cert parameter is not valid X.509 certificate object.
|
ArgumentNullException | cert parameter is null.
|
See Also