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



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security Namespace > CertificateGenerationParameters Class : MaximumExpirationDate Property
Maximum expiration date of the generated certificate.
Syntax
'Declaration
 
<DataMemberAttribute()>
Public Property MaximumExpirationDate As Date
'Usage
 
Dim instance As CertificateGenerationParameters
Dim value As Date
 
instance.MaximumExpirationDate = value
 
value = instance.MaximumExpirationDate
[DataMember()]
public DateTime MaximumExpirationDate {get; set;}
[DataMember()]
public:
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.

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