Loading CHANGES +16 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,22 @@ Changes between 0.9.5a and 0.9.6 [xx XXX 2000] *) On VMS, stdout may very well lead to a file that is written to in a record-oriented fashion. That means that every write() will write a separate record, which will be read separately by the programs trying to read from it. This can be very confusing. The solution is to put a BIO filter in the way that will buffer text until a linefeed is reached, and then write everything a line at a time, so every record written will be an actual line, not chunks of lines and not (usually doesn't happen, but I've seen it once) several lines in one record. BIO_f_linebuffer() is the answer. Currently, it's a VMS-only method, because that's where it has been tested well enough. [Richard Levitte] *) Remove 'optimized' squaring variant in BN_mod_mul_montgomery, it can return incorrect results. (Note: The buggy variant was not enabled in OpenSSL 0.9.5a, Loading apps/asn1pars.c +7 −1 Original line number Diff line number Diff line Loading @@ -206,6 +206,12 @@ bad: goto end; } BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); } #endif if (oidfile != NULL) { Loading Loading @@ -315,7 +321,7 @@ bad: end: BIO_free(derout); if (in != NULL) BIO_free(in); if (out != NULL) BIO_free(out); if (out != NULL) BIO_free_all(out); if (b64 != NULL) BIO_free(b64); if (ret != 0) ERR_print_errors(bio_err); Loading apps/ca.c +19 −5 Original line number Diff line number Diff line Loading @@ -717,6 +717,12 @@ bad: if (verbose) { BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */ #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); } #endif TXT_DB_write(out,db); BIO_printf(bio_err,"%d entries loaded from the database\n", db->data->num); Loading Loading @@ -751,7 +757,15 @@ bad: } } else { BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); Sout = BIO_push(tmpbio, Sout); } #endif } } if (req) Loading Loading @@ -1047,7 +1061,7 @@ bad: #endif BIO_free(in); BIO_free(out); BIO_free_all(out); in=NULL; out=NULL; if (rename(serialfile,buf[2]) < 0) Loading Loading @@ -1264,9 +1278,9 @@ bad: ret=0; err: BIO_free(hex); BIO_free(Cout); BIO_free(Sout); BIO_free(out); BIO_free_all(Cout); BIO_free_all(Sout); BIO_free_all(out); BIO_free(in); sk_X509_pop_free(cert_sk,X509_free); Loading Loading @@ -1381,7 +1395,7 @@ static int save_serial(char *serialfile, BIGNUM *serial) BIO_puts(out,"\n"); ret=1; err: if (out != NULL) BIO_free(out); if (out != NULL) BIO_free_all(out); if (ai != NULL) ASN1_INTEGER_free(ai); return(ret); } Loading apps/ciphers.c +7 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,12 @@ int MAIN(int argc, char **argv) if (bio_err == NULL) bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); STDout=BIO_new_fp(stdout,BIO_NOCLOSE); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); STDout = BIO_push(tmpbio, STDout); } #endif argc--; argv++; Loading Loading @@ -195,7 +201,7 @@ err: end: if (ctx != NULL) SSL_CTX_free(ctx); if (ssl != NULL) SSL_free(ssl); if (STDout != NULL) BIO_free(STDout); if (STDout != NULL) BIO_free_all(STDout); EXIT(ret); } apps/crl.c +18 −2 Original line number Diff line number Diff line Loading @@ -122,7 +122,15 @@ int MAIN(int argc, char **argv) if (bio_out == NULL) if ((bio_out=BIO_new(BIO_s_file())) != NULL) { BIO_set_fp(bio_out,stdout,BIO_NOCLOSE); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); bio_out = BIO_push(tmpbio, bio_out); } #endif } informat=FORMAT_PEM; outformat=FORMAT_PEM; Loading Loading @@ -314,7 +322,15 @@ bad: } if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); } #endif } else { if (BIO_write_filename(out,outfile) <= 0) Loading @@ -340,8 +356,8 @@ bad: if (!i) { BIO_printf(bio_err,"unable to write CRL\n"); goto end; } ret=0; end: BIO_free(out); BIO_free(bio_out); BIO_free_all(out); BIO_free_all(bio_out); bio_out=NULL; X509_CRL_free(x); if(store) { Loading Loading
CHANGES +16 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,22 @@ Changes between 0.9.5a and 0.9.6 [xx XXX 2000] *) On VMS, stdout may very well lead to a file that is written to in a record-oriented fashion. That means that every write() will write a separate record, which will be read separately by the programs trying to read from it. This can be very confusing. The solution is to put a BIO filter in the way that will buffer text until a linefeed is reached, and then write everything a line at a time, so every record written will be an actual line, not chunks of lines and not (usually doesn't happen, but I've seen it once) several lines in one record. BIO_f_linebuffer() is the answer. Currently, it's a VMS-only method, because that's where it has been tested well enough. [Richard Levitte] *) Remove 'optimized' squaring variant in BN_mod_mul_montgomery, it can return incorrect results. (Note: The buggy variant was not enabled in OpenSSL 0.9.5a, Loading
apps/asn1pars.c +7 −1 Original line number Diff line number Diff line Loading @@ -206,6 +206,12 @@ bad: goto end; } BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); } #endif if (oidfile != NULL) { Loading Loading @@ -315,7 +321,7 @@ bad: end: BIO_free(derout); if (in != NULL) BIO_free(in); if (out != NULL) BIO_free(out); if (out != NULL) BIO_free_all(out); if (b64 != NULL) BIO_free(b64); if (ret != 0) ERR_print_errors(bio_err); Loading
apps/ca.c +19 −5 Original line number Diff line number Diff line Loading @@ -717,6 +717,12 @@ bad: if (verbose) { BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */ #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); } #endif TXT_DB_write(out,db); BIO_printf(bio_err,"%d entries loaded from the database\n", db->data->num); Loading Loading @@ -751,7 +757,15 @@ bad: } } else { BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); Sout = BIO_push(tmpbio, Sout); } #endif } } if (req) Loading Loading @@ -1047,7 +1061,7 @@ bad: #endif BIO_free(in); BIO_free(out); BIO_free_all(out); in=NULL; out=NULL; if (rename(serialfile,buf[2]) < 0) Loading Loading @@ -1264,9 +1278,9 @@ bad: ret=0; err: BIO_free(hex); BIO_free(Cout); BIO_free(Sout); BIO_free(out); BIO_free_all(Cout); BIO_free_all(Sout); BIO_free_all(out); BIO_free(in); sk_X509_pop_free(cert_sk,X509_free); Loading Loading @@ -1381,7 +1395,7 @@ static int save_serial(char *serialfile, BIGNUM *serial) BIO_puts(out,"\n"); ret=1; err: if (out != NULL) BIO_free(out); if (out != NULL) BIO_free_all(out); if (ai != NULL) ASN1_INTEGER_free(ai); return(ret); } Loading
apps/ciphers.c +7 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,12 @@ int MAIN(int argc, char **argv) if (bio_err == NULL) bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); STDout=BIO_new_fp(stdout,BIO_NOCLOSE); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); STDout = BIO_push(tmpbio, STDout); } #endif argc--; argv++; Loading Loading @@ -195,7 +201,7 @@ err: end: if (ctx != NULL) SSL_CTX_free(ctx); if (ssl != NULL) SSL_free(ssl); if (STDout != NULL) BIO_free(STDout); if (STDout != NULL) BIO_free_all(STDout); EXIT(ret); }
apps/crl.c +18 −2 Original line number Diff line number Diff line Loading @@ -122,7 +122,15 @@ int MAIN(int argc, char **argv) if (bio_out == NULL) if ((bio_out=BIO_new(BIO_s_file())) != NULL) { BIO_set_fp(bio_out,stdout,BIO_NOCLOSE); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); bio_out = BIO_push(tmpbio, bio_out); } #endif } informat=FORMAT_PEM; outformat=FORMAT_PEM; Loading Loading @@ -314,7 +322,15 @@ bad: } if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); #ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); } #endif } else { if (BIO_write_filename(out,outfile) <= 0) Loading @@ -340,8 +356,8 @@ bad: if (!i) { BIO_printf(bio_err,"unable to write CRL\n"); goto end; } ret=0; end: BIO_free(out); BIO_free(bio_out); BIO_free_all(out); BIO_free_all(bio_out); bio_out=NULL; X509_CRL_free(x); if(store) { Loading