Fix various memory leaks in SSL, apps and DSA
[openssl.git] / CHANGES
1
2  OpenSSL CHANGES
3  _______________
4
5
6  Changes between 0.9.1c and 0.9.2
7
8   *) Run extensive memory leak checks on SSL apps. Fixed *lots* of memory
9      leaks in ssl/ relating to new X509_get_pubkey() behaviour. Also fixes
10      in apps/ and an unrellated leak in crypto/dsa/dsa_vrf.c
11      [Steve Henson]
12
13   *) Support for RAW extensions where an arbitrary extension can be
14      created by including its DER encoding. See apps/openssl.cnf for
15      an example.
16      [Steve Henson]
17
18   *) Make sure latest Perl versions don't interpret some generated C array
19      code as Perl array code in the crypto/err/err_genc.pl script.
20      [Lars Weber <3weber@informatik.uni-hamburg.de>]
21
22   *) Modify ms/do_ms.bat to not generate assembly language makefiles since
23      not many people have the assembler. Various Win32 compilation fixes and
24      update to the INSTALL.W32 file with (hopefully) more accurate Win32
25      build instructions.
26      [Steve Henson]
27
28   *) Modify configure script 'Configure' to automatically create crypto/date.h
29      file under Win32 and also build pem.h from pem.org. New script
30      util/mkfiles.pl to create the MINFO file on environments that can't do a
31      'make files': perl util/mkfiles.pl >MINFO should work.
32      [Steve Henson]
33
34   *) Major rework of DES function declarations, in the pursuit of correctness
35      and purity. As a result, many evil casts evaporated, and some weirdness,
36      too. You may find this causes warnings in your code. Zapping your evil
37      casts will probably fix them. Mostly.
38      [Ben Laurie]
39
40   *) Fix for a typo in asn1.h. Bug fix to object creation script
41      obj_dat.pl. It considered a zero in an object definition to mean
42      "end of object": none of the objects in objects.h have any zeros
43      so it wasn't spotted.
44      [Steve Henson, reported by Erwann ABALEA <eabalea@certplus.com>]
45
46   *) Add support for Triple DES Cipher Block Chaining with Output Feedback
47      Masking (CBCM). In the absence of test vectors, the best I have been able
48      to do is check that the decrypt undoes the encrypt, so far. Send me test
49      vectors if you have them.
50      [Ben Laurie]
51
52   *) Correct caclulation of key length for export ciphers (too much space was
53      allocated for null ciphers). This has not been tested!
54      [Ben Laurie]
55
56   *) Modifications to the mkdef.pl for Win32 DEF file creation. The usage
57      message is now correct (it understands "crypto" and "ssl" on its
58      command line). There is also now an "update" option. This will update
59      the util/ssleay.num and util/libeay.num files with any new functions.
60      If you do a: 
61      perl util/mkdef.pl crypto ssl update
62      it will update them.
63      [Steve Henson]
64
65   *) Overhauled the Perl interface (perl/*):
66      - ported BN stuff to OpenSSL's different BN library
67      - made the perl/ source tree CVS-aware
68      - renamed the package from SSLeay to OpenSSL (the files still contain
69        their history because I've copied them in the repository)
70      - removed obsolete files (the test scripts will be replaced
71        by better Test::Harness variants in the future)
72      [Ralf S. Engelschall]
73
74   *) First cut for a very conservative source tree cleanup:
75      1. merge various obsolete readme texts into doc/ssleay.txt
76      where we collect the old documents and readme texts.
77      2. remove the first part of files where I'm already sure that we no
78      longer need them because of three reasons: either they are just temporary
79      files which were left by Eric or they are preserved original files where
80      I've verified that the diff is also available in the CVS via "cvs diff
81      -rSSLeay_0_8_1b" or they were renamed (as it was definitely the case for
82      the crypto/md/ stuff).
83      [Ralf S. Engelschall]
84
85   *) More extension code. Incomplete support for subject and issuer alt
86      name, issuer and authority key id. Change the i2v function parameters
87      and add an extra 'crl' parameter in the X509V3_CTX structure: guess
88      what that's for :-) Fix to ASN1 macro which messed up
89      IMPLICIT tag and add f_enum.c which adds a2i, i2a for ENUMERATED.
90      [Steve Henson]
91
92   *) Preliminary support for ENUMERATED type. This is largely copied from the
93      INTEGER code.
94      [Steve Henson]
95
96   *) Add new function, EVP_MD_CTX_copy() to replace frequent use of memcpy.
97      [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)]
98
99   *) Make sure `make rehash' target really finds the `openssl' program.
100      [Ralf S. Engelschall, Matthias Loepfe <Matthias.Loepfe@adnovum.ch>]
101
102   *) Squeeze another 7% of speed out of MD5 assembler, at least on a P2. I'd
103      like to hear about it if this slows down other processors.
104      [Ben Laurie]
105
106   *) Add CygWin32 platform information to Configure script.
107      [Alan Batie <batie@aahz.jf.intel.com>]
108
109   *) Fixed ms/32all.bat script: `no_asm' -> `no-asm'
110      [Rainer W. Gerling <gerling@mpg-gv.mpg.de>]
111   
112   *) New program nseq to manipulate netscape certificate sequences
113      [Steve Henson]
114
115   *) Modify crl2pkcs7 so it supports multiple -certfile arguments. Fix a
116      few typos.
117      [Steve Henson]
118
119   *) Fixes to BN code.  Previously the default was to define BN_RECURSION
120      but the BN code had some problems that would cause failures when
121      doing certificate verification and some other functions.
122      [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)]
123
124   *) Add ASN1 and PEM code to support netscape certificate sequences.
125      [Steve Henson]
126
127   *) Add ASN1 and PEM code to support netscape certificate sequences.
128      [Steve Henson]
129
130   *) Add several PKIX and private extended key usage OIDs.
131      [Steve Henson]
132
133   *) Modify the 'ca' program to handle the new extension code. Modify
134      openssl.cnf for new extension format, add comments.
135      [Steve Henson]
136
137   *) More X509 V3 changes. Fix typo in v3_bitstr.c. Add support to 'req'
138      and add a sample to openssl.cnf so req -x509 now adds appropriate
139      CA extensions.
140      [Steve Henson]
141
142   *) Continued X509 V3 changes. Add to other makefiles, integrate with the
143      error code, add initial support to X509_print() and x509 application.
144      [Steve Henson]
145
146   *) Takes a deep breath and start addding X509 V3 extension support code. Add
147      files in crypto/x509v3. Move original stuff to crypto/x509v3/old. All this
148      stuff is currently isolated and isn't even compiled yet.
149      [Steve Henson]
150
151   *) Continuing patches for GeneralizedTime. Fix up certificate and CRL
152      ASN1 to use ASN1_TIME and modify print routines to use ASN1_TIME_print.
153      Removed the versions check from X509 routines when loading extensions:
154      this allows certain broken certificates that don't set the version
155      properly to be processed.
156      [Steve Henson]
157
158   *) Deal with irritating shit to do with dependencies, in YAAHW (Yet Another
159      Ad Hoc Way) - Makefile.ssls now all contain local dependencies, which
160      can still be regenerated with "make depend".
161      [Ben Laurie]
162
163   *) Spelling mistake in C version of CAST-128.
164      [Ben Laurie, reported by Jeremy Hylton <jeremy@cnri.reston.va.us>]
165
166   *) Changes to the error generation code. The perl script err-code.pl 
167      now reads in the old error codes and retains the old numbers, only
168      adding new ones if necessary. It also only changes the .err files if new
169      codes are added. The makefiles have been modified to only insert errors
170      when needed (to avoid needlessly modifying header files). This is done
171      by only inserting errors if the .err file is newer than the auto generated
172      C file. To rebuild all the error codes from scratch (the old behaviour)
173      either modify crypto/Makefile.ssl to pass the -regen flag to err_code.pl
174      or delete all the .err files.
175      [Steve Henson]
176
177   *) CAST-128 was incorrectly implemented for short keys. The C version has
178      been fixed, but is untested. The assembler versions are also fixed, but
179      new assembler HAS NOT BEEN GENERATED FOR WIN32 - the Makefile needs fixing
180      to regenerate it if needed.
181      [Ben Laurie, reported (with fix for C version) by Jun-ichiro itojun
182       Hagino <itojun@kame.net>]
183
184   *) File was opened incorrectly in randfile.c.
185      [Ulf Möller <ulf@fitug.de>]
186
187   *) Beginning of support for GeneralizedTime. d2i, i2d, check and print
188      functions. Also ASN1_TIME suite which is a CHOICE of UTCTime or
189      GeneralizedTime. ASN1_TIME is the proper type used in certificates et
190      al: it's just almost always a UTCTime. Note this patch adds new error
191      codes so do a "make errors" if there are problems.
192      [Steve Henson]
193
194   *) Correct Linux 1 recognition in config.
195      [Ulf Möller <ulf@fitug.de>]
196
197   *) Remove pointless MD5 hash when using DSA keys in ca.
198      [Anonymous <nobody@replay.com>]
199
200   *) Generate an error if given an empty string as a cert directory. Also
201      generate an error if handed NULL (previously returned 0 to indicate an
202      error, but didn't set one).
203      [Ben Laurie, reported by Anonymous <nobody@replay.com>]
204
205   *) Add prototypes to SSL methods. Make SSL_write's buffer const, at last.
206      [Ben Laurie]
207
208   *) Fix the dummy function BN_ref_mod_exp() in rsaref.c to have the correct
209      parameters. This was causing a warning which killed off the Win32 compile.
210      [Steve Henson]
211
212   *) Remove C++ style comments from crypto/bn/bn_local.h.
213      [Neil Costigan <neil.costigan@celocom.com>]
214
215   *) The function OBJ_txt2nid was broken. It was supposed to return a nid
216      based on a text string, looking up short and long names and finally
217      "dot" format. The "dot" format stuff didn't work. Added new function
218      OBJ_txt2obj to do the same but return an ASN1_OBJECT and rewrote 
219      OBJ_txt2nid to use it. OBJ_txt2obj can also return objects even if the
220      OID is not part of the table.
221      [Steve Henson]
222
223   *) Add prototypes to X509 lookup/verify methods, fixing a bug in
224      X509_LOOKUP_by_alias().
225      [Ben Laurie]
226
227   *) Sort openssl functions by name.
228      [Ben Laurie]
229
230   *) Get the gendsa program working (hopefully) and add it to app list. Remove
231      encryption from sample DSA keys (in case anyone is interested the password
232      was "1234").
233      [Steve Henson]
234
235   *) Make _all_ *_free functions accept a NULL pointer.
236      [Frans Heymans <fheymans@isaserver.be>]
237
238   *) If a DH key is generated in s3_srvr.c, don't blow it by trying to use
239      NULL pointers.
240      [Anonymous <nobody@replay.com>]
241
242   *) s_server should send the CAfile as acceptable CAs, not its own cert.
243      [Bodo Moeller <3moeller@informatik.uni-hamburg.de>]
244
245   *) Don't blow it for numeric -newkey arguments to apps/req.
246      [Bodo Moeller <3moeller@informatik.uni-hamburg.de>]
247
248   *) Temp key "for export" tests were wrong in s3_srvr.c.
249      [Anonymous <nobody@replay.com>]
250
251   *) Add prototype for temp key callback functions
252      SSL_CTX_set_tmp_{rsa,dh}_callback().
253      [Ben Laurie]
254
255   *) Make DH_free() tolerate being passed a NULL pointer (like RSA_free() and
256      DSA_free()). Make X509_PUBKEY_set() check for errors in d2i_PublicKey().
257      [Steve Henson]
258
259   *) X509_name_add_entry() freed the wrong thing after an error.
260      [Arne Ansper <arne@ats.cyber.ee>]
261
262   *) rsa_eay.c would attempt to free a NULL context.
263      [Arne Ansper <arne@ats.cyber.ee>]
264
265   *) BIO_s_socket() had a broken should_retry() on Windoze.
266      [Arne Ansper <arne@ats.cyber.ee>]
267
268   *) BIO_f_buffer() didn't pass on BIO_CTRL_FLUSH.
269      [Arne Ansper <arne@ats.cyber.ee>]
270
271   *) Make sure the already existing X509_STORE->depth variable is initialized
272      in X509_STORE_new(), but document the fact that this variable is still
273      unused in the certificate verification process.
274      [Ralf S. Engelschall]
275
276   *) Fix the various library and apps files to free up pkeys obtained from
277      X509_PUBKEY_get() et al. Also allow x509.c to handle netscape extensions.
278      [Steve Henson]
279
280   *) Fix reference counting in X509_PUBKEY_get(). This makes
281      demos/maurice/example2.c work, amongst others, probably.
282      [Steve Henson and Ben Laurie]
283
284   *) First cut of a cleanup for apps/. First the `ssleay' program is now named
285      `openssl' and second, the shortcut symlinks for the `openssl <command>'
286      are no longer created. This way we have a single and consistent command
287      line interface `openssl <command>', similar to `cvs <command>'.
288      [Ralf S. Engelschall, Paul Sutton and Ben Laurie]
289
290   *) ca.c: move test for DSA keys inside #ifndef NO_DSA. Make pubkey
291      BIT STRING wrapper always have zero unused bits.
292      [Steve Henson]
293
294   *) Add CA.pl, perl version of CA.sh, add extended key usage OID.
295      [Steve Henson]
296
297   *) Make the top-level INSTALL documentation easier to understand.
298      [Paul Sutton]
299
300   *) Makefiles updated to exit if an error occurs in a sub-directory
301      make (including if user presses ^C) [Paul Sutton]
302
303   *) Make Montgomery context stuff explicit in RSA data structure.
304      [Ben Laurie]
305
306   *) Fix build order of pem and err to allow for generated pem.h.
307      [Ben Laurie]
308
309   *) Fix renumbering bug in X509_NAME_delete_entry().
310      [Ben Laurie]
311
312   *) Enhanced the err-ins.pl script so it makes the error library number 
313      global and can add a library name. This is needed for external ASN1 and
314      other error libraries.
315      [Steve Henson]
316
317   *) Fixed sk_insert which never worked properly.
318      [Steve Henson]
319
320   *) Fix ASN1 macros so they can handle indefinite length construted 
321      EXPLICIT tags. Some non standard certificates use these: they can now
322      be read in.
323      [Steve Henson]
324
325   *) Merged the various old/obsolete SSLeay documentation files (doc/xxx.doc)
326      into a single doc/ssleay.txt bundle. This way the information is still
327      preserved but no longer messes up this directory. Now it's new room for
328      the new set of documenation files.
329      [Ralf S. Engelschall]
330
331   *) SETs were incorrectly DER encoded. This was a major pain, because they
332      shared code with SEQUENCEs, which aren't coded the same. This means that
333      almost everything to do with SETs or SEQUENCEs has either changed name or
334      number of arguments.
335      [Ben Laurie, based on a partial fix by GP Jayan <gp@nsj.co.jp>]
336
337   *) Fix test data to work with the above.
338      [Ben Laurie]
339
340   *) Fix the RSA header declarations that hid a bug I fixed in 0.9.0b but
341      was already fixed by Eric for 0.9.1 it seems.
342      [Ben Laurie - pointed out by Ulf Möller <ulf@fitug.de>]
343
344   *) Autodetect FreeBSD3.
345      [Ben Laurie]
346
347   *) Fix various bugs in Configure. This affects the following platforms:
348      nextstep
349      ncr-scde
350      unixware-2.0
351      unixware-2.0-pentium
352      sco5-cc.
353      [Ben Laurie]
354
355   *) Eliminate generated files from CVS. Reorder tests to regenerate files
356      before they are needed.
357      [Ben Laurie]
358
359   *) Generate Makefile.ssl from Makefile.org (to keep CVS happy).
360      [Ben Laurie]
361
362  Changes between 0.9.1b and 0.9.1c
363
364   *) Added OPENSSL_VERSION_NUMBER to crypto/crypto.h and 
365      changed SSLeay to OpenSSL in version strings.
366      [Ralf S. Engelschall]
367   
368   *) Some fixups to the top-level documents.
369      [Paul Sutton]
370
371   *) Fixed the nasty bug where rsaref.h was not found under compile-time
372      because the symlink to include/ was missing.
373      [Ralf S. Engelschall]
374
375   *) Incorporated the popular no-RSA/DSA-only patches 
376      which allow to compile a RSA-free SSLeay.
377      [Andrew Cooke / Interrader Ldt., Ralf S. Engelschall]
378
379   *) Fixed nasty rehash problem under `make -f Makefile.ssl links'
380      when "ssleay" is still not found.
381      [Ralf S. Engelschall]
382
383   *) Added more platforms to Configure: Cray T3E, HPUX 11, 
384      [Ralf S. Engelschall, Beckmann <beckman@acl.lanl.gov>]
385
386   *) Updated the README file.
387      [Ralf S. Engelschall]
388
389   *) Added various .cvsignore files in the CVS repository subdirs
390      to make a "cvs update" really silent.
391      [Ralf S. Engelschall]
392
393   *) Recompiled the error-definition header files and added
394      missing symbols to the Win32 linker tables.
395      [Ralf S. Engelschall]
396
397   *) Cleaned up the top-level documents;
398      o new files: CHANGES and LICENSE
399      o merged VERSION, HISTORY* and README* files a CHANGES.SSLeay 
400      o merged COPYRIGHT into LICENSE
401      o removed obsolete TODO file
402      o renamed MICROSOFT to INSTALL.W32
403      [Ralf S. Engelschall]
404
405   *) Removed dummy files from the 0.9.1b source tree: 
406      crypto/asn1/x crypto/bio/cd crypto/bio/fg crypto/bio/grep crypto/bio/vi
407      crypto/bn/asm/......add.c crypto/bn/asm/a.out crypto/dsa/f crypto/md5/f
408      crypto/pem/gmon.out crypto/perlasm/f crypto/pkcs7/build crypto/rsa/f
409      crypto/sha/asm/f crypto/threads/f ms/zzz ssl/f ssl/f.mak test/f
410      util/f.mak util/pl/f util/pl/f.mak crypto/bf/bf_locl.old apps/f
411      [Ralf S. Engelschall]
412
413   *) Added various platform portability fixes.
414      [Mark J. Cox]
415
416   *) The Genesis of the OpenSSL rpject:
417      We start with the latest (unreleased) SSLeay version 0.9.1b which Eric A.
418      Young and Tim J. Hudson created while they were working for C2Net until
419      summer 1998.
420      [The OpenSSL Project]
421  
422  Changes between 0.9.0b and 0.9.1b
423
424   *) Updated a few CA certificates under certs/
425      [Eric A. Young]
426
427   *) Changed some BIGNUM api stuff.
428      [Eric A. Young]
429
430   *) Various platform ports: OpenBSD, Ultrix, IRIX 64bit, NetBSD, 
431      DGUX x86, Linux Alpha, etc.
432      [Eric A. Young]
433
434   *) New COMP library [crypto/comp/] for SSL Record Layer Compression: 
435      RLE (dummy implemented) and ZLIB (really implemented when ZLIB is
436      available).
437      [Eric A. Young]
438
439   *) Add -strparse option to asn1pars program which parses nested 
440      binary structures 
441      [Dr Stephen Henson <shenson@bigfoot.com>]
442
443   *) Added "oid_file" to ssleay.cnf for "ca" and "req" programs.
444      [Eric A. Young]
445
446   *) DSA fix for "ca" program.
447      [Eric A. Young]
448
449   *) Added "-genkey" option to "dsaparam" program.
450      [Eric A. Young]
451
452   *) Added RIPE MD160 (rmd160) message digest.
453      [Eric A. Young]
454
455   *) Added -a (all) option to "ssleay version" command.
456      [Eric A. Young]
457
458   *) Added PLATFORM define which is the id given to Configure.
459      [Eric A. Young]
460
461   *) Added MemCheck_XXXX functions to crypto/mem.c for memory checking.
462      [Eric A. Young]
463
464   *) Extended the ASN.1 parser routines.
465      [Eric A. Young]
466
467   *) Extended BIO routines to support REUSEADDR, seek, tell, etc.
468      [Eric A. Young]
469
470   *) Added a BN_CTX to the BN library.
471      [Eric A. Young]
472
473   *) Fixed the weak key values in DES library
474      [Eric A. Young]
475
476   *) Changed API in EVP library for cipher aliases.
477      [Eric A. Young]
478
479   *) Added support for RC2/64bit cipher.
480      [Eric A. Young]
481
482   *) Converted the lhash library to the crypto/mem.c functions.
483      [Eric A. Young]
484
485   *) Added more recognized ASN.1 object ids.
486      [Eric A. Young]
487
488   *) Added more RSA padding checks for SSL/TLS.
489      [Eric A. Young]
490
491   *) Added BIO proxy/filter functionality.
492      [Eric A. Young]
493
494   *) Added extra_certs to SSL_CTX which can be used
495      send extra CA certificates to the client in the CA cert chain sending
496      process. It can be configured with SSL_CTX_add_extra_chain_cert().
497      [Eric A. Young]
498
499   *) Now Fortezza is denied in the authentication phase because
500      this is key exchange mechanism is not supported by SSLeay at all.
501      [Eric A. Young]
502
503   *) Additional PKCS1 checks.
504      [Eric A. Young]
505
506   *) Support the string "TLSv1" for all TLS v1 ciphers.
507      [Eric A. Young]
508
509   *) Added function SSL_get_ex_data_X509_STORE_CTX_idx() which gives the
510      ex_data index of the SSL context in the X509_STORE_CTX ex_data.
511      [Eric A. Young]
512
513   *) Fixed a few memory leaks.
514      [Eric A. Young]
515
516   *) Fixed various code and comment typos.
517      [Eric A. Young]
518
519   *) A minor bug in ssl/s3_clnt.c where there would always be 4 0 
520      bytes sent in the client random.
521      [Edward Bishop <ebishop@spyglass.com>]
522