Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ASN1_TIME_PARSE(3)	 BSD Library Functions Manual	    ASN1_TIME_PARSE(3)

NAME
     ASN1_time_parse, ASN1_time_tm_cmp -- LibreSSL utilities for ASN.1 time
     types

SYNOPSIS
     #include <openssl/asn1.h>

     int
     ASN1_time_parse(const char	*bytes,	size_t len, struct tm *tm, int mode);

     int
     ASN1_time_tm_cmp(struct tm	*tm1, struct tm	*tm2);

DESCRIPTION
     The ASN1_time_parse() function parses an ASN.1 time string	of len bytes
     starting at bytes.	 The resulting time is stored in tm if tm is not NULL.

     The mode parameter	must be	one of

	 +o   0 to parse	a time as specified in RFC 5280	for an X509 object,
	     which may be either a UTC time or a Generalized time.

	 +o   V_ASN1_UTCTIME to parse an	RFC 5280 format	UTC time.

	 +o   V_ASN1_GENERALIZEDTIME to parse an	RFC 5280 format	Generalized
	     time.

     The ASN1_time_tm_cmp() function compares two times	in tm1 and tm2.

RETURN VALUES
     ASN1_parse_time() returns

	 +o   -1	if the string was invalid for the mode specified.

	 +o   V_ASN1_UTCTIME if the string parsed as a valid UTC	time.

	 +o   V_ASN1_GENERALIZEDTIME if the string parsed as a valid General-
	     ized time.

     ASN1_time_tm_cmp()	returns

	 +o   -1	if tm1 is less than tm2.

	 +o   1 if tm1 is greater than tm2.

	 +o   0 if tm1 is the same as tm2.

BSD			       November	5, 2016				   BSD

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=ASN1_time_parse&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help