X509Certificate.CheckValidity Method
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.
Overloads
CheckValidity() |
Checks that the certificate is currently valid. |
CheckValidity(Date) |
Checks that the given date is within the certificate's validity period. |
CheckValidity()
Checks that the certificate is currently valid.
[Android.Runtime.Register("checkValidity", "()V", "GetCheckValidityHandler")]
public abstract void CheckValidity ();
[<Android.Runtime.Register("checkValidity", "()V", "GetCheckValidityHandler")>]
abstract member CheckValidity : unit -> unit
- Attributes
Exceptions
if the certificate has expired.
if the certificate is not yet valid.
Remarks
Checks that the certificate is currently valid. It is if the current date and time are within the validity period given in the certificate.
The validity period consists of two date/time values: the first and last dates (and times) on which the certificate is valid. It is defined in ASN.1 as:
validity Validity
Validity ::= SEQUENCE {
notBefore CertificateValidityDate,
notAfter CertificateValidityDate }
CertificateValidityDate ::= CHOICE {
utcTime UTCTime,
generalTime GeneralizedTime }
Java documentation for java.security.cert.X509Certificate.checkValidity()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
CheckValidity(Date)
Checks that the given date is within the certificate's validity period.
[Android.Runtime.Register("checkValidity", "(Ljava/util/Date;)V", "GetCheckValidity_Ljava_util_Date_Handler")]
public abstract void CheckValidity (Java.Util.Date? date);
[<Android.Runtime.Register("checkValidity", "(Ljava/util/Date;)V", "GetCheckValidity_Ljava_util_Date_Handler")>]
abstract member CheckValidity : Java.Util.Date -> unit
Parameters
- date
- Date
the Date to check against to see if this certificate is valid at that date/time.
- Attributes
Exceptions
if the certificate has expired.
if the certificate is not yet valid.
Remarks
Checks that the given date is within the certificate's validity period. In other words, this determines whether the certificate would be valid at the given date/time.
Java documentation for java.security.cert.X509Certificate.checkValidity(java.util.Date)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.