89 unsigned char **pp,
long length)
100 #ifdef CHARSET_EBCDIC
111 if ((ret != NULL) && ((a == NULL) || (*a != ret)))
120 static const int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
121 static const int max[9]={99, 99,12,31,23,59,59,12,59};
125 if (d->
type != V_ASN1_GENERALIZEDTIME)
return(0);
133 if (l < 13)
goto err;
136 if ((i == 6) && ((a[o] ==
'Z') ||
137 (a[o] ==
'+') || (a[o] ==
'-')))
139 if ((a[o] <
'0') || (a[o] >
'9'))
goto err;
141 if (++o > l)
goto err;
143 if ((a[o] <
'0') || (a[o] >
'9'))
goto err;
145 if (++o > l)
goto err;
147 if ((n < min[i]) || (n > max[i]))
goto err;
154 if (++o > l)
goto err;
156 while ((a[o] >=
'0') && (a[o] <=
'9') && (o <= l))
159 if (i == o)
goto err;
164 else if ((a[o] ==
'+') || (a[o] ==
'-'))
167 if (o+4 > l)
goto err;
170 if ((a[o] <
'0') || (a[o] >
'9'))
goto err;
173 if ((a[o] <
'0') || (a[o] >
'9'))
goto err;
175 if ((n < min[i]) || (n > max[i]))
goto err;
195 t.
data=(
unsigned char *)str;
201 (
unsigned char *)str,t.
length))
218 time_t
t,
int offset_day,
long offset_sec)
234 if (offset_day || offset_sec)
241 if ((p == NULL) || ((size_t)s->
length < len))
252 s->
data=(
unsigned char *)p;
255 BIO_snprintf(p,len,
"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
256 ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
259 #ifdef CHARSET_EBCDIC_not