I fixed the problem, but in a different way: I changed 't->length+2' to 't->length+3'.
Please test the snapshot with name 'openssl-0.9.7-stable-SNAP-20030101.tar.gz' whenever it appears. This ticket is now resolved. [[EMAIL PROTECTED] - Tue Dec 31 18:01:25 2002]: > The ASN1_TIME_to_generalizedtime() function in openssl-0.9.7 > generates a \0-terminated string instead of Z-terminated. > > Problem becomes apparent when making an openssl > ocsp server and client communicate. The client > gives a OCSP_R_ERROR_IN_THISUPDATE_FIELD error. > > > Frederik > > > diff -ur openssl-0.9.7-orig/crypto/asn1/a_time.c openssl- > 0.9.7/crypto/asn1/a_time.c > --- openssl-0.9.7-orig/crypto/asn1/a_time.c Tue Nov 12 13:21:22 2002 > +++ openssl-0.9.7/crypto/asn1/a_time.c Tue Dec 31 15:13:48 2002 > @@ -149,10 +149,10 @@ > return NULL; > str = (char *)ret->data; > /* Work out the century and prepend */ > if (t->data[0] >= '5') strcpy(str, "19"); > else strcpy(str, "20"); > > - BUF_strlcat(str, (char *)t->data, t->length+2); > + strncpy(str+2, (char *)t->data, t->length); > > return ret; > } > -- Richard Levitte ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
