OPC Studio User's Guide and Reference
MaximumExpirationDate Property (_CertificateGenerationParameters)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security.ComTypes Namespace > _CertificateGenerationParameters Interface : MaximumExpirationDate Property
Maximum expiration date of the generated certificate.
Syntax
'Declaration
 
Property MaximumExpirationDate As Date
'Usage
 
Dim instance As _CertificateGenerationParameters
Dim value As Date
 
instance.MaximumExpirationDate = value
 
value = instance.MaximumExpirationDate
DateTime MaximumExpirationDate {get; set;}
property DateTime MaximumExpirationDate {
   DateTime get();
   void set (    DateTime value);
}
Exceptions
ExceptionDescription

One of the arguments provided to a method is not valid.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

Use this property is you want to limit the certificate validity by end absolute date in the future.

The resulting lifetime of the certificate is dictated by the earlier of dates implied by MaximumExpirationDate and ValidityPeriodInMonths. Since the default value of ValidityPeriodInMonths is relatively low, if you want to prevent the MaximumExpirationDate from being reduced by the ValidityPeriodInMonths, you may have increase the ValidityPeriodInMonths to a very large value.

The resulting certificate lifetime might be up to 1 month later than what is implied by MaximumExpirationDate, due to the limitations of the underlying certificate generation mechanism.

Use this property with caution. Setting an absolute maximum expiration date influences how the certificate is generated, but it also means that unless this date is changed, after some point in the future, it will not be possible to generate a valid certificate with this setting.

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also