CHANGES 278 KB
Newer Older
 OpenSSL CHANGES
Bodo Möller's avatar
Bodo Möller committed
 Changes between 0.9.7 and 0.9.8  [xx XXX 2002]

  *) Add the ASN.1 structures and functions for CertificatePair, which
     is defined as follows (according to X.509_4thEditionDraftV6.pdf):

     CertificatePair ::= SEQUENCE {
	forward		[0]	Certificate OPTIONAL,
	reverse		[1]	Certificate OPTIONAL,
	-- at least one of the pair shall be present -- }

     Also implement the PEM functions to read and write certificate
     pairs, and defined the PEM tag as "CERTIFICATE PAIR".

     This needed to be defined, mostly for the sake of the LDAP
     attribute crossCertificatePair, but may prove useful elsewhere as
     well.
     [Richard Levitte]

  *) Make it possible to inhibit symlinking of shared libraries in
     Makefile.shared, for Cygwin's sake.
     [Richard Levitte]

  *) Extend the BIGNUM API by creating new macros that behave like
     functions

          void BN_set_sign(BIGNUM *a, int neg);
          int BN_get_sign(const BIGNUM *a);

     and avoid the need to access 'a->neg' directly in applications.
     [Nils Larsch  <nla@trustcenter.de>]

  *) Implement fast modular reduction for pseudo-Mersenne primes
     used in NIST curves (crypto/bn/bn_nist.c, crypto/ec/ecp_nist.c).
     EC_GROUP_new_curve_GFp() will now automatically use this
     if applicable.
     [Nils Larsch <nla@trustcenter.de>]

  *) Add new lock type (CRYPTO_LOCK_BN).
     [Bodo Moeller]

  *) Change the ENGINE framework to automatically load engines
     dynamically from specific directories unless they could be
     found to already be built in or loaded.  Move all the
     current engines except for the cryptodev one to a new
     directory engines/.
     The engines in engines/ are built as shared libraries if
     the "shared" options was given to ./Configure or ./config.
     Otherwise, they are inserted in libcrypto.a.
     /usr/local/ssl/engines is the default directory for dynamic
     engines, but that can be overriden at configure time through
     the usual use of --prefix and/or --openssldir, and at run
     time with the environment variable OPENSSL_ENGINES.
     [Geoff Thorpe and Richard Levitte]

  *) Add Makefile.shared, a helper makefile to build shared
     libraries.  Addapt Makefile.org.
     [Richard Levitte]

Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
  *) Add version info to Win32 DLLs.
     [Peter 'Luna' Runestig" <peter@runestig.com>]

Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
  *) Add new 'medium level' PKCS#12 API. Certificates and keys
     can be added using this API to created arbitrary PKCS#12
     files while avoiding the low level API.

     New options to PKCS12_create(), key or cert can be NULL and
     will then be omitted from the output file. The encryption
     algorithm NIDs can be set to -1 for no encryption, the mac
     iteration count can be set to 0 to omit the mac.

     Enhance pkcs12 utility by making the -nokeys and -nocerts
     options work when creating a PKCS#12 file. New option -nomac
     to omit the mac, NONE can be set for an encryption algorithm.
     New code is modified to use the enhanced PKCS12_create()
     instead of the low level API.
     [Steve Henson]

  *) Extend ASN1 encoder to support indefinite length constructed
     encoding. This can output sequences tags and octet strings in
     this form. Modify pk7_asn1.c to support indefinite length
     encoding. This is experimental and needs additional code to
     be useful, such as an ASN1 bio and some enhanced streaming
     PKCS#7 code.

     Extend template encode functionality so that tagging is passed
     down to the template encoder.
     [Steve Henson]

  *) Let 'openssl req' fail if an argument to '-newkey' is not
     recognized instead of using RSA as a default.
     [Bodo Moeller]

Bodo Möller's avatar
Bodo Möller committed
  *) Add support for ECC-based ciphersuites from draft-ietf-tls-ecc-01.txt.
     As these are not official, they are not included in "ALL";
     the "ECCdraft" ciphersuite group alias can be used to select them.
     [Vipul Gupta and Sumit Gupta (Sun Microsystems Laboratories)]

Bodo Möller's avatar
Bodo Möller committed
  *) Add ECDH engine support.
     [Nils Gura and Douglas Stebila (Sun Microsystems Laboratories)]

  *) Add ECDH in new directory crypto/ecdh/.
Bodo Möller's avatar
Bodo Möller committed
TODO: more general interface (return  x  coordinate, not its hash)
TODO: bug: pad  x  with leading zeros if necessary
Bodo Möller's avatar
Bodo Möller committed
     [Douglas Stebila (Sun Microsystems Laboratories)]

  *) Let BN_rand_range() abort with an error after 100 iterations
     without success (which indicates a broken PRNG).
     [Bodo Moeller]

  *) Change BN_mod_sqrt() so that it verifies that the input value
     is really the square of the return value.  (Previously,
     BN_mod_sqrt would show GIGO behaviour.)
     [Bodo Moeller]

  *) Add named elliptic curves over binary fields from X9.62, SECG,
     and WAP/WTLS; add OIDs that were still missing.

     [Sheueling Chang Shantz and Douglas Stebila
     (Sun Microsystems Laboratories)]

  *) Extend the EC library for elliptic curves over binary fields
     (new files ec2_smpl.c, ec2_smpt.c, ec2_mult.c in crypto/ec/).
     New EC_METHOD:

          EC_GF2m_simple_method

     New API functions:

          EC_GROUP_new_curve_GF2m
          EC_GROUP_set_curve_GF2m
          EC_GROUP_get_curve_GF2m
          EC_POINT_set_affine_coordinates_GF2m
          EC_POINT_get_affine_coordinates_GF2m
          EC_POINT_set_compressed_coordinates_GF2m

     Point compression for binary fields is disabled by default for
     patent reasons (compile with OPENSSL_EC_BIN_PT_COMP defined to
     enable it).

     As binary polynomials are represented as BIGNUMs, various members
     of the EC_GROUP and EC_POINT data structures can be shared
     between the implementations for prime fields and binary fields;
     the above ..._GF2m functions (except for EX_GROUP_new_curve_GF2m)
     are essentially identical to their ..._GFp counterparts.
Bodo Möller's avatar
Bodo Möller committed
     (For simplicity, the '..._GFp' prefix has been dropped from
     various internal method names.)

     An internal 'field_div' method (similar to 'field_mul' and
     'field_sqr') has been added; this is used only for binary fields.

     [Sheueling Chang Shantz and Douglas Stebila
     (Sun Microsystems Laboratories)]

Bodo Möller's avatar
Bodo Möller committed
  *) Optionally dispatch EC_POINT_mul(), EC_POINT_precompute_mult()
     through methods ('mul', 'precompute_mult').

     The generic implementations (now internally called 'ec_wNAF_mul'
     and 'ec_wNAF_precomputed_mult') remain the default if these
     methods are undefined.

     [Sheueling Chang Shantz and Douglas Stebila
     (Sun Microsystems Laboratories)]

  *) New function EC_GROUP_get_degree, which is defined through
     EC_METHOD.  For curves over prime fields, this returns the bit
     length of the modulus.

     [Sheueling Chang Shantz and Douglas Stebila
     (Sun Microsystems Laboratories)]

  *) New functions EC_GROUP_dup, EC_POINT_dup.
     (These simply call ..._new  and ..._copy).

     [Sheueling Chang Shantz and Douglas Stebila
     (Sun Microsystems Laboratories)]

  *) Add binary polynomial arithmetic software in crypto/bn/bn_gf2m.c.
     Polynomials are represented as BIGNUMs (where the sign bit is not
     used) in the following functions [macros]:  

          BN_GF2m_add
          BN_GF2m_sub             [= BN_GF2m_add]
          BN_GF2m_mod             [wrapper for BN_GF2m_mod_arr]
          BN_GF2m_mod_mul         [wrapper for BN_GF2m_mod_mul_arr]
          BN_GF2m_mod_sqr         [wrapper for BN_GF2m_mod_sqr_arr]
          BN_GF2m_mod_inv
          BN_GF2m_mod_exp         [wrapper for BN_GF2m_mod_exp_arr]
          BN_GF2m_mod_sqrt        [wrapper for BN_GF2m_mod_sqrt_arr]
          BN_GF2m_mod_solve_quad  [wrapper for BN_GF2m_mod_solve_quad_arr]
          BN_GF2m_cmp             [= BN_ucmp]

     (Note that only the 'mod' functions are actually for fields GF(2^m).
     BN_GF2m_add() is misnomer, but this is for the sake of consistency.)

     For some functions, an the irreducible polynomial defining a
     field can be given as an 'unsigned int[]' with strictly
     decreasing elements giving the indices of those bits that are set;
     i.e., p[] represents the polynomial
          f(t) = t^p[0] + t^p[1] + ... + t^p[k]
     where
          p[0] > p[1] > ... > p[k] = 0.
     This applies to the following functions:

          BN_GF2m_mod_arr
          BN_GF2m_mod_mul_arr
          BN_GF2m_mod_sqr_arr
          BN_GF2m_mod_inv_arr        [wrapper for BN_GF2m_mod_inv]
          BN_GF2m_mod_div_arr        [wrapper for BN_GF2m_mod_div]
          BN_GF2m_mod_exp_arr
          BN_GF2m_mod_sqrt_arr
          BN_GF2m_mod_solve_quad_arr
          BN_GF2m_poly2arr
          BN_GF2m_arr2poly

     Conversion can be performed by the following functions:

          BN_GF2m_poly2arr
          BN_GF2m_arr2poly

     bntest.c has additional tests for binary polynomial arithmetic.

     Two implementations for BN_GF2m_mod_div() are available.
     The default algorithm simply uses BN_GF2m_mod_inv() and
     BN_GF2m_mod_mul().  The alternative algorithm is compiled in only
     if OPENSSL_SUN_GF2M_DIV is defined (patent pending; read the
     copyright notice in crypto/bn/bn_gf2m.c before enabling it).

     [Sheueling Chang Shantz and Douglas Stebila
     (Sun Microsystems Laboratories)]

  *) Add new error code 'ERR_R_DISABLED' that can be used when some
     functionality is disabled at compile-time.
     [Douglas Stebila <douglas.stebila@sun.com>]

  *) Change default behaviour of 'openssl asn1parse' so that more
     information is visible when viewing, e.g., a certificate:

     Modify asn1_parse2 (crypto/asn1/asn1_par.c) so that in non-'dump'
     mode the content of non-printable OCTET STRINGs is output in a
     style similar to INTEGERs, but with '[HEX DUMP]' prepended to
     avoid the appearance of a printable string.
     [Nils Larsch <nla@trustcenter.de>]

Bodo Möller's avatar
Bodo Möller committed
  *) Add 'asn1_flag' and 'asn1_form' member to EC_GROUP with access
     functions
          EC_GROUP_set_asn1_flag()
          EC_GROUP_get_asn1_flag()
          EC_GROUP_set_point_conversion_form()
          EC_GROUP_get_point_conversion_form()
     These control ASN1 encoding details:
Bodo Möller's avatar
Bodo Möller committed
     - Curves (i.e., groups) are encoded explicitly unless asn1_flag
       has been set to OPENSSL_EC_NAMED_CURVE.
     - Points are encoded in uncompressed form by default; options for
Bodo Möller's avatar
Bodo Möller committed
       asn1_for are as for point2oct, namely
          POINT_CONVERSION_COMPRESSED
          POINT_CONVERSION_UNCOMPRESSED
          POINT_CONVERSION_HYBRID

     Also add 'seed' and 'seed_len' members to EC_GROUP with access
     functions
          EC_GROUP_set_seed()
          EC_GROUP_get0_seed()
          EC_GROUP_get_seed_len()
     This is used only for ASN1 purposes (so far).
     [Nils Larsch <nla@trustcenter.de>]

  *) Add 'field_type' member to EC_METHOD, which holds the NID
     of the appropriate field type OID.  The new function
     EC_METHOD_get_field_type() returns this value.
     [Nils Larsch <nla@trustcenter.de>]

  *) Add functions 
          EC_POINT_point2bn()
          EC_POINT_bn2point()
          EC_POINT_point2hex()
          EC_POINT_hex2point()
     providing useful interfaces to EC_POINT_point2oct() and
     EC_POINT_oct2point().
     [Nils Larsch <nla@trustcenter.de>]

  *) Change internals of the EC library so that the functions
          EC_GROUP_set_generator()
          EC_GROUP_get_generator()
          EC_GROUP_get_order()
          EC_GROUP_get_cofactor()
     are implemented directly in crypto/ec/ec_lib.c and not dispatched
     to methods, which would lead to unnecessary code duplication when
     adding different types of curves.
     [Nils Larsch <nla@trustcenter.de> with input by Bodo Moeller]
Bodo Möller's avatar
Bodo Möller committed
  *) Implement compute_wNAF (crypto/ec/ec_mult.c) without BIGNUM
     arithmetic, and such that modified wNAFs are generated
     (which avoid length expansion in many cases).
     [Bodo Moeller]

  *) Add a function EC_GROUP_check_discriminant() (defined via
     EC_METHOD) that verifies that the curve discriminant is non-zero.

     Add a function EC_GROUP_check() that makes some sanity tests
     on a EC_GROUP, its generator and order.  This includes
     EC_GROUP_check_discriminant().
     [Nils Larsch <nla@trustcenter.de>]

Bodo Möller's avatar
Bodo Möller committed
  *) Add ECDSA in new directory crypto/ecdsa/.

     Add applications 'openssl ecparam' and 'openssl ecdsa'
     (these are based on 'openssl dsaparam' and 'openssl dsa').
Bodo Möller's avatar
Bodo Möller committed

     ECDSA support is also included in various other files across the
     library.  Most notably,
     - 'openssl req' now has a '-newkey ecdsa:file' option;
     - EVP_PKCS82PKEY (crypto/evp/evp_pkey.c) now can handle ECDSA;
     - X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and
       d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make
       them suitable for ECDSA where domain parameters must be
Bodo Möller's avatar
Bodo Möller committed
       extracted before the specific public key;
     - ECDSA engine support has been added.
Bodo Möller's avatar
Bodo Möller committed
     [Nils Larsch <nla@trustcenter.de>]
Bodo Möller's avatar
Bodo Möller committed

Bodo Möller's avatar
Bodo Möller committed
  *) Include some named elliptic curves, and add OIDs from X9.62,
     SECG, and WAP/WTLS.  Each curve can be obtained from the new
          EC_GROUP_new_by_nid(),
     and the list of available named curves can be obtained with
          EC_get_builtin_curves().
Bodo Möller's avatar
Bodo Möller committed
     Also add a 'curve_name' member to EC_GROUP objects, which can be
     accessed via
Bodo Möller's avatar
Bodo Möller committed
         EC_GROUP_set_nid()
         EC_GROUP_get_nid()
     [Nils Larsch <nla@trustcenter.de, Bodo Moeller]
 
 Changes between 0.9.6h and 0.9.7  [XX xxx 2002]

  *) In asn1_d2i_read_bio() repeatedly call BIO_read() until all content
     octets have been read, EOF or an error occurs. Without this change
     some truncated ASN1 structures will not produce an error.
     [Steve Henson]

  *) Disable Heimdal support, since it hasn't been fully implemented.
     Still give the possibility to force the use of Heimdal, but with
     warnings and a request that patches get sent to openssl-dev.
     [Richard Levitte]

Richard Levitte's avatar
Richard Levitte committed
  *) Add the VC-CE target, introduce the WINCE sysname, and add
     INSTALL.WCE and appropriate conditionals to make it build.
     [Steven Reddie <smr@essemer.com.au> via Richard Levitte]

  *) Change the DLL names for Cygwin to cygcrypto-x.y.z.dll and
     cygssl-x.y.z.dll, where x, y and z are the major, minor and
     edit numbers of the version.
     [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte]

  *) Introduce safe string copy and catenation functions
     (BUF_strlcpy() and BUF_strlcat()).
     [Ben Laurie (CHATS) and Richard Levitte]

  *) Avoid using fixed-size buffers for one-line DNs.
     [Ben Laurie (CHATS)]

  *) Add BUF_MEM_grow_clean() to avoid information leakage when
     resizing buffers containing secrets, and use where appropriate.
     [Ben Laurie (CHATS)]

  *) Avoid using fixed size buffers for configuration file location.
     [Ben Laurie (CHATS)]

  *) Avoid filename truncation for various CA files.
     [Ben Laurie (CHATS)]

  *) Use sizeof in preference to magic numbers.
     [Ben Laurie (CHATS)]

  *) Avoid filename truncation in cert requests.
     [Ben Laurie (CHATS)]

  *) Add assertions to check for (supposedly impossible) buffer
     overflows.
     [Ben Laurie (CHATS)]

  *) Don't cache truncated DNS entries in the local cache (this could
     potentially lead to a spoofing attack).
     [Ben Laurie (CHATS)]

  *) Fix various buffers to be large enough for hex/decimal
     representations in a platform independent manner.
     [Ben Laurie (CHATS)]

  *) Add CRYPTO_realloc_clean() to avoid information leakage when
     resizing buffers containing secrets, and use where appropriate.
     [Ben Laurie (CHATS)]

  *) Add BIO_indent() to avoid much slightly worrying code to do
     indents.
     [Ben Laurie (CHATS)]

  *) Convert sprintf()/BIO_puts() to BIO_printf().
     [Ben Laurie (CHATS)]

  *) buffer_gets() could terminate with the buffer only half
     full. Fixed.
     [Ben Laurie (CHATS)]

  *) Add assertions to prevent user-supplied crypto functions from
     overflowing internal buffers by having large block sizes, etc.
     [Ben Laurie (CHATS)]

Bodo Möller's avatar
Bodo Möller committed
  *) New OPENSSL_assert() macro (similar to assert(), but enabled
     unconditionally).
     [Ben Laurie (CHATS)]

  *) Eliminate unused copy of key in RC4.
     [Ben Laurie (CHATS)]

  *) Eliminate unused and incorrectly sized buffers for IV in pem.h.
     [Ben Laurie (CHATS)]

  *) Fix off-by-one error in EGD path.
     [Ben Laurie (CHATS)]

  *) If RANDFILE path is too long, ignore instead of truncating.
     [Ben Laurie (CHATS)]

  *) Eliminate unused and incorrectly sized X.509 structure
     CBCParameter.
     [Ben Laurie (CHATS)]

  *) Eliminate unused and dangerous function knumber().
     [Ben Laurie (CHATS)]

  *) Eliminate unused and dangerous structure, KSSL_ERR.
     [Ben Laurie (CHATS)]

  *) Protect against overlong session ID context length in an encoded
     session object. Since these are local, this does not appear to be
     exploitable.
     [Ben Laurie (CHATS)]

  *) Change from security patch (see 0.9.6e below) that did not affect
     the 0.9.6 release series:

     Remote buffer overflow in SSL3 protocol - an attacker could
     supply an oversized master key in Kerberos-enabled versions.
     (CAN-2002-0657)
     [Ben Laurie (CHATS)]
Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed

  *) Change the SSL kerb5 codes to match RFC 2712.
     [Richard Levitte]

  *) Make -nameopt work fully for req and add -reqopt switch.
     [Michael Bell <michael.bell@rz.hu-berlin.de>, Steve Henson]

  *) The "block size" for block ciphers in CFB and OFB mode should be 1.
     [Steve Henson, reported by Yngve Nysaeter Pettersen <yngve@opera.com>]

  *) Make sure tests can be performed even if the corresponding algorithms
     have been removed entirely.  This was also the last step to make
     OpenSSL compilable with DJGPP under all reasonable conditions.
     [Richard Levitte, Doug Kaufman <dkaufman@rahul.net>]

  *) Add cipher selection rules COMPLEMENTOFALL and COMPLEMENTOFDEFAULT
     to allow version independent disabling of normally unselected ciphers,
     which may be activated as a side-effect of selecting a single cipher.

     (E.g., cipher list string "RSA" enables ciphersuites that are left
     out of "ALL" because they do not provide symmetric encryption.
     "RSA:!COMPLEMEMENTOFALL" avoids these unsafe ciphersuites.)
  *) Add appropriate support for separate platform-dependent build
     directories.  The recommended way to make a platform-dependent
     build directory is the following (tested on Linux), maybe with
     some local tweaks:

	# Place yourself outside of the OpenSSL source tree.  In
	# this example, the environment variable OPENSSL_SOURCE
	# is assumed to contain the absolute OpenSSL source directory.
	mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
	cd objtree/"`uname -s`-`uname -r`-`uname -m`"
	(cd $OPENSSL_SOURCE; find . -type f -o -type l) | while read F; do
		mkdir -p `dirname $F`
		ln -s $OPENSSL_SOURCE/$F $F
	done

     To be absolutely sure not to disturb the source tree, a "make clean"
     is a good thing.  If it isn't successfull, don't worry about it,
     it probably means the source directory is very clean.
     [Richard Levitte]

  *) Make sure any ENGINE control commands make local copies of string
     pointers passed to them whenever necessary. Otherwise it is possible
     the caller may have overwritten (or deallocated) the original string
     data when a later ENGINE operation tries to use the stored values.
     [Götz Babin-Ebell <babinebell@trustcenter.de>]

Ben Laurie's avatar
Ben Laurie committed
  *) Improve diagnostics in file reading and command-line digests.
     [Ben Laurie aided and abetted by Solar Designer <solar@openwall.com>]

  *) Add AES modes CFB and OFB to the object database.  Correct an
     error in AES-CFB decryption.
     [Richard Levitte]

Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
  *) Remove most calls to EVP_CIPHER_CTX_cleanup() in evp_enc.c, this 
     allows existing EVP_CIPHER_CTX structures to be reused after
     calling EVP_*Final(). This behaviour is used by encryption
     BIOs and some applications. This has the side effect that
     applications must explicitly clean up cipher contexts with
     EVP_CIPHER_CTX_cleanup() or they will leak memory.
     [Steve Henson]

Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
  *) Check the values of dna and dnb in bn_mul_recursive before calling
     bn_mul_comba (a non zero value means the a or b arrays do not contain
     n2 elements) and fallback to bn_mul_normal if either is not zero.
     [Steve Henson]
Bodo Möller's avatar
Bodo Möller committed

  *) Fix escaping of non-ASCII characters when using the -subj option
     of the "openssl req" command line tool. (Robert Joop <joop@fokus.gmd.de>)
     [Lutz Jaenicke]

  *) Make object definitions compliant to LDAP (RFC2256): SN is the short
Lutz Jänicke's avatar
Lutz Jänicke committed
     form for "surname", serialNumber has no short form.
     Use "mail" as the short name for "rfc822Mailbox" according to RFC2798;
     therefore remove "mail" short name for "internet 7".
     The OID for unique identifiers in X509 certificates is
     x500UniqueIdentifier, not uniqueIdentifier.
Lutz Jänicke's avatar
Lutz Jänicke committed
     Some more OID additions. (Michael Bell <michael.bell@rz.hu-berlin.de>)
Bodo Möller's avatar
Bodo Möller committed
     [Lutz Jaenicke]
  *) Add an "init" command to the ENGINE config module and auto initialize
Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
     ENGINEs. Without any "init" command the ENGINE will be initialized 
     after all ctrl commands have been executed on it. If init=1 the 
     ENGINE is initailized at that point (ctrls before that point are run
     on the uninitialized ENGINE and after on the initialized one). If
     init=0 then the ENGINE will not be iniatialized at all.
     [Steve Henson]

  *) Fix the 'app_verify_callback' interface so that the user-defined
     argument is actually passed to the callback: In the
     SSL_CTX_set_cert_verify_callback() prototype, the callback
     declaration has been changed from
          int (*cb)()
     into
          int (*cb)(X509_STORE_CTX *,void *);
     in ssl_verify_cert_chain (ssl/ssl_cert.c), the call
          i=s->ctx->app_verify_callback(&ctx)
     has been changed into
          i=s->ctx->app_verify_callback(&ctx, s->ctx->app_verify_arg).

     To update applications using SSL_CTX_set_cert_verify_callback(),
     a dummy argument can be added to their callback functions.
     [D. K. Smetters <smetters@parc.xerox.com>]

  *) Added the '4758cca' ENGINE to support IBM 4758 cards.
     [Maurice Gittens <maurice@gittens.nl>, touchups by Geoff Thorpe]

  *) Add and OPENSSL_LOAD_CONF define which will cause
     OpenSSL_add_all_algorithms() to load the openssl.cnf config file.
     This allows older applications to transparently support certain
     OpenSSL features: such as crypto acceleration and dynamic ENGINE loading.
     Two new functions OPENSSL_add_all_algorithms_noconf() which will never
     load the config file and OPENSSL_add_all_algorithms_conf() which will
     always load it have also been added.
     [Steve Henson]

  *) Add the OFB, CFB and CTR (all with 128 bit feedback) to AES.
     Adjust NIDs and EVP layer.
     [Stephen Sprunk <stephen@sprunk.org> and Richard Levitte]

  *) Config modules support in openssl utility.
Dr. Stephen Henson's avatar
Dr. Stephen Henson committed

     Most commands now load modules from the config file,
     though in a few (such as version) this isn't done 
     because it couldn't be used for anything.

     In the case of ca and req the config file used is
     the same as the utility itself: that is the -config
     command line option can be used to specify an
     alternative file.
     [Steve Henson]

  *) Move default behaviour from OPENSSL_config(). If appname is NULL
     use "openssl_conf" if filename is NULL use default openssl config file.
     [Steve Henson]

  *) Add an argument to OPENSSL_config() to allow the use of an alternative
     config section name. Add a new flag to tolerate a missing config file
     and move code to CONF_modules_load_file().
     [Steve Henson]

  *) Support for crypto accelerator cards from Accelerated Encryption
     Processing, www.aep.ie.  (Use engine 'aep')
     The support was copied from 0.9.6c [engine] and adapted/corrected
     to work with the new engine framework.
     [AEP Inc. and Richard Levitte]

  *) Support for SureWare crypto accelerator cards from Baltimore
     Technologies.  (Use engine 'sureware')
     The support was copied from 0.9.6c [engine] and adapted
     to work with the new engine framework.
     [Richard Levitte]

  *) Have the CHIL engine fork-safe (as defined by nCipher) and actually
     make the newer ENGINE framework commands for the CHIL engine work.
     [Toomas Kiisk <vix@cyber.ee> and Richard Levitte]

  *) Make it possible to produce shared libraries on ReliantUNIX.
     [Robert Dahlem <Robert.Dahlem@ffm2.siemens.de> via Richard Levitte]

  *) Add the configuration target debug-linux-ppro.
     Make 'openssl rsa' use the general key loading routines
     implemented in apps.c, and make those routines able to
     handle the key format FORMAT_NETSCAPE and the variant
     FORMAT_IISSGC.
     [Toomas Kiisk <vix@cyber.ee> via Richard Levitte]

 *) Fix a crashbug and a logic bug in hwcrhk_load_pubkey().
     [Toomas Kiisk <vix@cyber.ee> via Richard Levitte]

  *) Add -keyform to rsautl, and document -engine.
     [Richard Levitte, inspired by Toomas Kiisk <vix@cyber.ee>]

  *) Change BIO_new_file (crypto/bio/bss_file.c) to use new
Bodo Möller's avatar
Bodo Möller committed
     BIO_R_NO_SUCH_FILE error code rather than the generic
     ERR_R_SYS_LIB error code if fopen() fails with ENOENT.
     [Ben Laurie]

  *) Add new functions
Bodo Möller's avatar
Bodo Möller committed
          ERR_peek_last_error
          ERR_peek_last_error_line
          ERR_peek_last_error_line_data.
     These are similar to
          ERR_peek_error
          ERR_peek_error_line
          ERR_peek_error_line_data,
     but report on the latest error recorded rather than the first one
     still in the error queue.
     [Ben Laurie, Bodo Moeller]
        
  *) default_algorithms option in ENGINE config module. This allows things
Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
     like:
     default_algorithms = ALL
     default_algorithms = RSA, DSA, RAND, CIPHERS, DIGESTS
     [Steve Henson]

  *) Prelminary ENGINE config module.
Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
     [Steve Henson]

  *) New experimental application configuration code.
Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
     [Steve Henson]

  *) Change the AES code to follow the same name structure as all other
     symmetric ciphers, and behave the same way.  Move everything to
     the directory crypto/aes, thereby obsoleting crypto/rijndael.
     [Stephen Sprunk <stephen@sprunk.org> and Richard Levitte]

  *) SECURITY: remove unsafe setjmp/signal interaction from ui_openssl.c.
Ben Laurie's avatar
Ben Laurie committed
     [Ben Laurie and Theo de Raadt]

  *) Add option to output public keys in req command.
     [Massimiliano Pala madwolf@openca.org]

  *) Use wNAFs in EC_POINTs_mul() for improved efficiency
     (up to about 10% better than before for P-192 and P-224).
Bodo Möller's avatar
Bodo Möller committed
     [Bodo Moeller]

  *) New functions/macros

          SSL_CTX_set_msg_callback(ctx, cb)
          SSL_CTX_set_msg_callback_arg(ctx, arg)
          SSL_set_msg_callback(ssl, cb)
          SSL_set_msg_callback_arg(ssl, arg)

     to request calling a callback function

          void cb(int write_p, int version, int content_type,
                  const void *buf, size_t len, SSL *ssl, void *arg)

     whenever a protocol message has been completely received
     (write_p == 0) or sent (write_p == 1).  Here 'version' is the
     protocol version  according to which the SSL library interprets
     the current protocol message (SSL2_VERSION, SSL3_VERSION, or
     TLS1_VERSION).  'content_type' is 0 in the case of SSL 2.0, or
     the content type as defined in the SSL 3.0/TLS 1.0 protocol
     specification (change_cipher_spec(20), alert(21), handshake(22)).
     'buf' and 'len' point to the actual message, 'ssl' to the
     SSL object, and 'arg' is the application-defined value set by
     SSL[_CTX]_set_msg_callback_arg().

     'openssl s_client' and 'openssl s_server' have new '-msg' options
     to enable a callback that displays all protocol messages.
     [Bodo Moeller]

  *) Change the shared library support so shared libraries are built as
     soon as the corresponding static library is finished, and thereby get
     openssl and the test programs linked against the shared library.
     This still only happens when the keyword "shard" has been given to
     the configuration scripts.

     NOTE: shared library support is still an experimental thing, and
     backward binary compatibility is still not guaranteed.
     ["Maciej W. Rozycki" <macro@ds2.pg.gda.pl> and Richard Levitte]

  *) Add support for Subject Information Access extension.
     [Peter Sylvester <Peter.Sylvester@EdelWeb.fr>]

  *) Make BUF_MEM_grow() behaviour more consistent: Initialise to zero
     additional bytes when new memory had to be allocated, not just
     when reusing an existing buffer.
     [Bodo Moeller]

  *) New command line and configuration option 'utf8' for the req command.
     This allows field values to be specified as UTF8 strings.
     [Steve Henson]

  *) Add -multi and -mr options to "openssl speed" - giving multiple parallel
     runs for the former and machine-readable output for the latter.
     [Ben Laurie]

  *) Add '-noemailDN' option to 'openssl ca'.  This prevents inclusion
     of the e-mail address in the DN (i.e., it will go into a certificate
     extension only).  The new configuration file option 'email_in_dn = no'
     has the same effect.
     [Massimiliano Pala madwolf@openca.org]

  *) Change all functions with names starting with des_ to be starting
     with DES_ instead.  Add wrappers that are compatible with libdes,
     but are named _ossl_old_des_*.  Finally, add macros that map the
     des_* symbols to the corresponding _ossl_old_des_* if libdes
     compatibility is desired.  If OpenSSL 0.9.6c compatibility is
     desired, the des_* symbols will be mapped to DES_*, with one
     exception.
     Since we provide two compatibility mappings, the user needs to
     define the macro OPENSSL_DES_LIBDES_COMPATIBILITY if libdes
     compatibility is desired.  The default (i.e., when that macro
     isn't defined) is OpenSSL 0.9.6c compatibility.

     There are also macros that enable and disable the support of old
     des functions altogether.  Those are OPENSSL_ENABLE_OLD_DES_SUPPORT
     and OPENSSL_DISABLE_OLD_DES_SUPPORT.  If none or both of those
     are defined, the default will apply: to support the old des routines.

     In either case, one must include openssl/des.h to get the correct
     definitions.  Do not try to just include openssl/des_old.h, that
     won't work.

     NOTE: This is a major break of an old API into a new one.  Software
     authors are encouraged to switch to the DES_ style functions.  Some
     time in the future, des_old.h and the libdes compatibility functions
     will be disable (i.e. OPENSSL_DISABLE_OLD_DES_SUPPORT will be the
     default), and then completely removed.
  *) Test for certificates which contain unsupported critical extensions.
Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
     If such a certificate is found during a verify operation it is 
     rejected by default: this behaviour can be overridden by either
     handling the new error X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION or
     by setting the verify flag X509_V_FLAG_IGNORE_CRITICAL. A new function
     X509_supported_extension() has also been added which returns 1 if a
     particular extension is supported.
     [Steve Henson]

  *) Modify the behaviour of EVP cipher functions in similar way to digests
     to retain compatibility with existing code.
     [Steve Henson]

  *) Modify the behaviour of EVP_DigestInit() and EVP_DigestFinal() to retain
     compatibility with existing code. In particular the 'ctx' parameter does
     not have to be to be initialized before the call to EVP_DigestInit() and
     it is tidied up after a call to EVP_DigestFinal(). New function
     EVP_DigestFinal_ex() which does not tidy up the ctx. Similarly function
     EVP_MD_CTX_copy() changed to not require the destination to be
     initialized valid and new function EVP_MD_CTX_copy_ex() added which
     requires the destination to be valid.

     Modify all the OpenSSL digest calls to use EVP_DigestInit_ex(),
     EVP_DigestFinal_ex() and EVP_MD_CTX_copy_ex().
Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
     [Steve Henson]

  *) Change ssl3_get_message (ssl/s3_both.c) and the functions using it
     so that complete 'Handshake' protocol structures are kept in memory
     instead of overwriting 'msg_type' and 'length' with 'body' data.
     [Bodo Moeller]

  *) Add an implementation of SSL_add_dir_cert_subjects_to_stack for Win32.
     [Massimo Santin via Richard Levitte]

  *) Major restructuring to the underlying ENGINE code. This includes
     reduction of linker bloat, separation of pure "ENGINE" manipulation
     (initialisation, etc) from functionality dealing with implementations
     of specific crypto iterfaces. This change also introduces integrated
     support for symmetric ciphers and digest implementations - so ENGINEs
     can now accelerate these by providing EVP_CIPHER and EVP_MD
     implementations of their own. This is detailed in crypto/engine/README
     as it couldn't be adequately described here. However, there are a few
     API changes worth noting - some RSA, DSA, DH, and RAND functions that
     were changed in the original introduction of ENGINE code have now
     reverted back - the hooking from this code to ENGINE is now a good
     deal more passive and at run-time, operations deal directly with
     RSA_METHODs, DSA_METHODs (etc) as they did before, rather than
     dereferencing through an ENGINE pointer any more. Also, the ENGINE
     functions dealing with BN_MOD_EXP[_CRT] handlers have been removed -
     they were not being used by the framework as there is no concept of a
     BIGNUM_METHOD and they could not be generalised to the new
     'ENGINE_TABLE' mechanism that underlies the new code. Similarly,
     ENGINE_cpy() has been removed as it cannot be consistently defined in
     the new code.
     [Geoff Thorpe]

  *) Change ASN1_GENERALIZEDTIME_check() to allow fractional seconds.
  *) Change mkdef.pl to sort symbols that get the same entry number,
Richard Levitte's avatar
Richard Levitte committed
     and make sure the automatically generated functions ERR_load_*
     become part of libeay.num as well.
     [Richard Levitte]

  *) New function SSL_renegotiate_pending().  This returns true once
     renegotiation has been requested (either SSL_renegotiate() call
     or HelloRequest/ClientHello receveived from the peer) and becomes
     false once a handshake has been completed.
     (For servers, SSL_renegotiate() followed by SSL_do_handshake()
     sends a HelloRequest, but does not ensure that a handshake takes
     place.  SSL_renegotiate_pending() is useful for checking if the
     client has followed the request.)
     [Bodo Moeller]

  *) New SSL option SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION.
     By default, clients may request session resumption even during
     renegotiation (if session ID contexts permit); with this option,
     session resumption is possible only in the first handshake.

     SSL_OP_ALL is now 0x00000FFFL instead of 0x000FFFFFL.  This makes
     more bits available for options that should not be part of
     SSL_OP_ALL (such as SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION).
  *) Add some demos for certificate and certificate request creation.
  *) Make maximum certificate chain size accepted from the peer application
     settable (SSL*_get/set_max_cert_list()), as proposed by
     "Douglas E. Engert" <deengert@anl.gov>.
     [Lutz Jaenicke]

  *) Add support for shared libraries for Unixware-7
     (Boyd Lynn Gerber <gerberb@zenez.com>).
  *) Add a "destroy" handler to ENGINEs that allows structural cleanup to
     be done prior to destruction. Use this to unload error strings from
     ENGINEs that load their own error strings. NB: This adds two new API
     functions to "get" and "set" this destroy handler in an ENGINE.
Bodo Möller's avatar
Bodo Möller committed
     [Geoff Thorpe]
  *) Alter all existing ENGINE implementations (except "openssl" and
     "openbsd") to dynamically instantiate their own error strings. This
     makes them more flexible to be built both as statically-linked ENGINEs
     and self-contained shared-libraries loadable via the "dynamic" ENGINE.
     Also, add stub code to each that makes building them as self-contained
     shared-libraries easier (see README.ENGINE).
     [Geoff Thorpe]

  *) Add a "dynamic" ENGINE that provides a mechanism for binding ENGINE
     implementations into applications that are completely implemented in
     self-contained shared-libraries. The "dynamic" ENGINE exposes control
     commands that can be used to configure what shared-library to load and
     to control aspects of the way it is handled. Also, made an update to
     the README.ENGINE file that brings its information up-to-date and
     provides some information and instructions on the "dynamic" ENGINE
     (ie. how to use it, how to build "dynamic"-loadable ENGINEs, etc).
     [Geoff Thorpe]

  *) Make it possible to unload ranges of ERR strings with a new
     "ERR_unload_strings" function.
     [Geoff Thorpe]

  *) Add a copy() function to EVP_MD.
  *) Make EVP_MD routines take a context pointer instead of just the
Ulf Möller's avatar
Ulf Möller committed
     md_data void pointer.
  *) Add flags to EVP_MD and EVP_MD_CTX. EVP_MD_FLAG_ONESHOT indicates
     that the digest can only process a single chunk of data
     (typically because it is provided by a piece of
     hardware). EVP_MD_CTX_FLAG_ONESHOT indicates that the application
     is only going to provide a single chunk of data, and hence the
     framework needn't accumulate the data for oneshot drivers.
     [Ben Laurie]

  *) As with "ERR", make it possible to replace the underlying "ex_data"
     functions. This change also alters the storage and management of global
     ex_data state - it's now all inside ex_data.c and all "class" code (eg.
     RSA, BIO, SSL_CTX, etc) no longer stores its own STACKS and per-class
     index counters. The API functions that use this state have been changed
     to take a "class_index" rather than pointers to the class's local STACK
     and counter, and there is now an API function to dynamically create new
     classes. This centralisation allows us to (a) plug a lot of the
     thread-safety problems that existed, and (b) makes it possible to clean
     up all allocated state using "CRYPTO_cleanup_all_ex_data()". W.r.t. (b)
     such data would previously have always leaked in application code and
     workarounds were in place to make the memory debugging turn a blind eye
     to it. Application code that doesn't use this new function will still
     leak as before, but their memory debugging output will announce it now
     rather than letting it slide.

     Besides the addition of CRYPTO_cleanup_all_ex_data(), another API change
     induced by the "ex_data" overhaul is that X509_STORE_CTX_init() now
     has a return value to indicate success or failure.
     [Geoff Thorpe]

  *) Make it possible to replace the underlying "ERR" functions such that the
Geoff Thorpe's avatar
Geoff Thorpe committed
     global state (2 LHASH tables and 2 locks) is only used by the "default"
     implementation. This change also adds two functions to "get" and "set"
     the implementation prior to it being automatically set the first time
     any other ERR function takes place. Ie. an application can call "get",
     pass the return value to a module it has just loaded, and that module
     can call its own "set" function using that value. This means the
     module's "ERR" operations will use (and modify) the error state in the
     application and not in its own statically linked copy of OpenSSL code.
     [Geoff Thorpe]

  *) Give DH, DSA, and RSA types their own "**_up_ref()" function to increment
     reference counts. This performs normal REF_PRINT/REF_CHECK macros on
     the operation, and provides a more encapsulated way for external code
     (crypto/evp/ and ssl/) to do this. Also changed the evp and ssl code
     to use these functions rather than manually incrementing the counts.

     Also rename "DSO_up()" function to more descriptive "DSO_up_ref()".
     [Geoff Thorpe]

  *) Add EVP test program.
Ben Laurie's avatar
Ben Laurie committed
     [Ben Laurie]

  *) Add symmetric cipher support to ENGINE. Expect the API to change!
  *) New CRL functions: X509_CRL_set_version(), X509_CRL_set_issuer_name()
Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
     X509_CRL_set_lastUpdate(), X509_CRL_set_nextUpdate(), X509_CRL_sort(),
     X509_REVOKED_set_serialNumber(), and X509_REVOKED_set_revocationDate().
     These allow a CRL to be built without having to access X509_CRL fields
     directly. Modify 'ca' application to use new functions.
     [Steve Henson]

  *) Move SSL_OP_TLS_ROLLBACK_BUG out of the SSL_OP_ALL list of recommended
     bug workarounds. Rollback attack detection is a security feature.
Bodo Möller's avatar
Bodo Möller committed
     The problem will only arise on OpenSSL servers when TLSv1 is not
     available (sslv3_server_method() or SSL_OP_NO_TLSv1).
     Software authors not wanting to support TLSv1 will have special reasons
     for their choice and can explicitly enable this option.
     [Bodo Moeller, Lutz Jaenicke]

  *) Rationalise EVP so it can be extended: don't include a union of
     cipher/digest structures, add init/cleanup functions for EVP_MD_CTX
     (similar to those existing for EVP_CIPHER_CTX).
Bodo Möller's avatar
Bodo Möller committed
     Usage example:

         EVP_MD_CTX md;

         EVP_MD_CTX_init(&md);             /* new function call */
         EVP_DigestInit(&md, EVP_sha1());
         EVP_DigestUpdate(&md, in, len);
         EVP_DigestFinal(&md, out, NULL);
         EVP_MD_CTX_cleanup(&md);          /* new function call */

  *) Make DES key schedule conform to the usual scheme, as well as
Ben Laurie's avatar
Ben Laurie committed
     correcting its structure. This means that calls to DES functions
     now have to pass a pointer to a des_key_schedule instead of a
     plain des_key_schedule (which was actually always a pointer
Bodo Möller's avatar
Bodo Möller committed
     anyway): E.g.,

         des_key_schedule ks;

	 des_set_key_checked(..., &ks);
	 des_ncbc_encrypt(..., &ks, ...);

     (Note that a later change renames 'des_...' into 'DES_...'.)
  *) Initial reduction of linker bloat: the use of some functions, such as
Dr. Stephen Henson's avatar
 
Dr. Stephen Henson committed
     PEM causes large amounts of unused functions to be linked in due to
     poor organisation. For example pem_all.c contains every PEM function
     which has a knock on effect of linking in large amounts of (unused)
     ASN1 code. Grouping together similar functions and splitting unrelated
     functions prevents this.
     [Steve Henson]

  *) Cleanup of EVP macros.
     [Ben Laurie]
  *) Change historical references to {NID,SN,LN}_des_ede and ede3 to add the
     correct _ecb suffix.
     [Ben Laurie]