PLCnext API Documentation 25.0.2.69
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Arp::System::Commons::Security::Asn1Time Class Reference

Helper class to handle ASN1Time objects in x.509 Certificates More...

#include <Asn1Time.hpp>

Public Member Functions

 Asn1Time (void)
 Constructs an empty Asn1Time instance.
 
 Asn1Time (const Asn1Time &arg)
 Copy constructor.
 
 Asn1Time (const ASN1_TIME *arg)
 Copy constructur.
 
 ~Asn1Time (void)
 Destructs this instance and frees all resources.
 
Asn1Timeoperator= (const Asn1Time &arg)
 Assignment operator.
 
Asn1Timeoperator= (const ASN1_TIME *arg)
 Assignment operator.
 
 operator ASN1_TIME * () const
 
 operator DateTime () const
 
String GetTypeAsString (void) const
 Return the type of the Internal ASN1_TIME object as String More...
 
bool Set (const DateTime &time)
 Sets this Ans1Time from a DateTime More...
 
DateTime ToDateTime (void) const
 Converts this object to DataTime DateTime More...
 
String ToString (void) const
 Converts this object to String DateTime More...
 
String ToIso8601String (void) const
 Converts this object to an ISO8601 formated String DateTime More...
 

Static Public Member Functions

static DateTime Asn1TimeToDateTime (const ASN1_TIME *pTime)
 Converst an OpenSSL ASN1_TIME object to DataTime DateTime More...
 
static bool TryAsn1TimeToDateTime (const ASN1_TIME *pTime, DateTime &result)
 Tries to convert an OpenSSL ASN1_TIME object to DataTime DateTime More...
 
static String Asn1TimeToIso8601String (const ASN1_TIME *pTime)
 Converst an OpenSSL ASN1_TIME object to an ISO8601 formated String DateTime More...
 

Protected Attributes

ASN1_TIME * internalAsn1Time
 

Detailed Description

Helper class to handle ASN1Time objects in x.509 Certificates

Member Function Documentation

◆ Asn1TimeToDateTime()

DateTime Arp::System::Commons::Security::Asn1Time::Asn1TimeToDateTime ( const ASN1_TIME *  pTime)
static

Converst an OpenSSL ASN1_TIME object to DataTime DateTime

Parameters
pTimePointer to an ASN_TIME object from OpenSSL
Returns
The converted DateTime object

◆ Asn1TimeToIso8601String()

String Arp::System::Commons::Security::Asn1Time::Asn1TimeToIso8601String ( const ASN1_TIME *  t)
static

Converst an OpenSSL ASN1_TIME object to an ISO8601 formated String DateTime

Parameters
pTimePointer to an ASN_TIME object from OpenSSL
Returns
The converted String in ISO8601 format

◆ GetTypeAsString()

String Arp::System::Commons::Security::Asn1Time::GetTypeAsString ( void  ) const

Return the type of the Internal ASN1_TIME object as String

Returns
"UtcTime" or "GeneralizedTime" return "" if internal ASN1_TIME object is NULL

◆ Set()

bool Arp::System::Commons::Security::Asn1Time::Set ( const DateTime time)

Sets this Ans1Time from a DateTime

Parameters
timeReference to the DateTime object were the time is taken from

◆ ToDateTime()

DateTime Arp::System::Commons::Security::Asn1Time::ToDateTime ( void  ) const

Converts this object to DataTime DateTime

Returns
DateTime object with the time of this object

◆ ToIso8601String()

String Arp::System::Commons::Security::Asn1Time::ToIso8601String ( void  ) const

Converts this object to an ISO8601 formated String DateTime

Returns
Iso8601 foamrted String with the time of this object

◆ ToString()

String Arp::System::Commons::Security::Asn1Time::ToString ( void  ) const

Converts this object to String DateTime

Returns
Type and internal data of openssl ASN1_TIME object as String

◆ TryAsn1TimeToDateTime()

bool Arp::System::Commons::Security::Asn1Time::TryAsn1TimeToDateTime ( const ASN1_TIME *  pTime,
DateTime result 
)
static

Tries to convert an OpenSSL ASN1_TIME object to DataTime DateTime

Parameters
pTimePointer to an ASN_TIME object from OpenSSL
resultThe result of the conversion.
Returns
True if the time could be converted.

The documentation for this class was generated from the following files: