]> git.ipfire.org Git - thirdparty/openssl.git/blame - CHANGES
Clarify ordering of certificates when using certificate chains
[thirdparty/openssl.git] / CHANGES
CommitLineData
81a6c781 1
f1c236f8 2 OpenSSL CHANGES
651d0aff
RE
3 _______________
4
8537943e 5 Changes between 0.9.7a and 0.9.8 [xx XXX xxxx]
4d94ae00 6
3bbb0212
RL
7 *) Add support for STORE in ENGINE.
8 [Richard Levitte]
9
a5db6fa5
RL
10 *) Add the STORE type. The intention is to provide a common interface
11 to certificate and key stores, be they simple file-based stores, or
12 HSM-type store, or LDAP stores, or...
13 NOTE: The code is currently UNTESTED and isn't really used anywhere.
14 [Richard Levitte]
15
535fba49
RL
16 *) Add a generic structure called OPENSSL_ITEM. This can be used to
17 pass a list of arguments to any function as well as provide a way
18 for a function to pass data back to the caller.
19 [Richard Levitte]
20
1ae0a83b
RL
21 *) Add the functions BUF_strndup() and BUF_memdup(). BUF_strndup()
22 works like BUF_strdup() but can be used to duplicate a portion of
23 a string. The copy gets NUL-terminated. BUF_memdup() duplicates
24 a memory area.
25 [Richard Levitte]
26
9d6c32d6
RL
27 *) Add the function sk_find_ex() which works like sk_find(), but will
28 return an index to an element even if an exact match couldn't be
29 found. The index is guaranteed to point at the element where the
30 searched-for key would be inserted to preserve sorting order.
31 [Richard Levitte]
32
ea5240a5
RL
33 *) Add the function OBJ_bsearch_ex() which works like OBJ_bsearch() but
34 takes an extra flags argument for optional functionality. Currently,
35 the following flags are defined:
36
37 OBJ_BSEARCH_VALUE_ON_NOMATCH
38 This one gets OBJ_bsearch_ex() to return a pointer to the first
39 element where the comparing function returns a negative or zero
40 number.
41
42 OBJ_BSEARCH_FIRST_VALUE_ON_MATCH
43 This one gets OBJ_bsearch_ex() to return a pointer to the first
44 element where the comparing function returns zero. This is useful
45 if there are more than one element where the comparing function
46 returns zero.
9d6c32d6 47 [Richard Levitte]
ea5240a5 48
16b1b035
RL
49 *) Make it possible to create self-signed certificates with 'openssl ca'
50 in such a way that the self-signed certificate becomes part of the
51 CA database and uses the same mechanisms for serial number generation
52 as all other certificate signing. The new flag '-selfsign' enables
53 this functionality. Adapt CA.sh and CA.pl.in.
54 [Richard Levitte]
55
e6526fbf
RL
56 *) Add functionality to check the public key of a certificate request
57 against a given private. This is useful to check that a certificate
58 request can be signed by that key (self-signing).
59 [Richard Levitte]
60
f85b68cd
RL
61 *) Make it possible to have multiple active certificates with the same
62 subject in the CA index file. This is done only if the keyword
63 'unique_subject' is set to 'no' in the main CA section (default
64 if 'CA_default') of the configuration file. The value is saved
65 with the database itself in a separate index attribute file,
66 named like the index file with '.attr' appended to the name.
67 [Richard Levitte]
68
1a15c899
DSH
69 *) Generate muti valued AVAs using '+' notation in config files for
70 req and dirName.
71 [Steve Henson]
72
520b76ff
DSH
73 *) Support for nameConstraints certificate extension.
74 [Steve Henson]
75
f80153e2
DSH
76 *) Support for policyConstraints certificate extension.
77 [Steve Henson]
78
a1d12dae
DSH
79 *) Support for policyMappings certificate extension.
80 [Steve Henson]
81
bba2cb3a
GT
82 *) Fixed a typo bug that would cause ENGINE_set_default() to set an
83 ENGINE as defaults for all supported algorithms irrespective of
84 the 'flags' parameter. 'flags' is now honoured, so applications
85 should make sure they are passing it correctly.
86 [Geoff Thorpe]
87
879650b8
GT
88 *) Make sure the default DSA_METHOD implementation only uses its
89 dsa_mod_exp() and/or bn_mod_exp() handlers if they are non-NULL,
90 and change its own handlers to be NULL so as to remove unnecessary
91 indirection. This lets alternative implementations fallback to the
92 default implementation more easily.
93 [Geoff Thorpe]
94
f0dc08e6
DSH
95 *) Support for directoryName in GeneralName related extensions
96 in config files.
97 [Steve Henson]
98
132eaa59
RL
99 *) Make it possible to link applications using Makefile.shared.
100 Make that possible even when linking against static libraries!
101 [Richard Levitte]
102
5562cfac
DSH
103 *) Various fixes to base64 BIO and non blocking I/O. On write
104 flushes were not handled properly if the BIO retried. On read
105 data was not being buffered properly and had various logic bugs.
106 [Steve Henson]
107
27068df7
DSH
108 *) Support for single pass processing for S/MIME signing. This now
109 means that S/MIME signing can be done from a pipe, in addition
110 cleartext signing (multipart/signed type) is effectively streaming
111 and the signed data does not need to be all held in memory.
112
e9ec6396 113 This is done with a new flag PKCS7_STREAM. When this flag is set
27068df7
DSH
114 PKCS7_sign() only initializes the PKCS7 structure and the actual signing
115 is done after the data is output (and digests calculated) in
116 SMIME_write_PKCS7().
117 [Steve Henson]
118
2d3de726
RL
119 *) Add full support for -rpath/-R, both in shared libraries and
120 applications, at least on the platforms where it's known how
121 to do it.
122 [Richard Levitte]
123
37c660ff 124 *) In crypto/ec/ec_mult.c, implement fast point multiplication with
24893ca9 125 precomputation, based on wNAF splitting: EC_GROUP_precompute_mult()
37c660ff 126 will now compute a table of multiples of the generator that
24893ca9 127 makes subsequent invocations of EC_POINTs_mul() or EC_POINT_mul()
37c660ff
BM
128 faster (notably in the case of a single point multiplication,
129 scalar * generator).
130 [Nils Larsch, Bodo Moeller]
131
4e5d3a7f
DSH
132 *) IPv6 support for certificate extensions. The various extensions
133 which use the IP:a.b.c.d can now take IPv6 addresses using the
134 formats of RFC1884 2.2 . IPv6 addresses are now also displayed
135 correctly.
136 [Steve Henson]
137
96f7065f
GT
138 *) Added an ENGINE that implements RSA by performing private key
139 exponentiations with the GMP library. The conversions to and from
140 GMP's mpz_t format aren't optimised nor are any montgomery forms
141 cached, and on x86 it appears OpenSSL's own performance has caught up.
142 However there are likely to be other architectures where GMP could
143 provide a boost. This ENGINE is not built in by default, but it can be
144 specified at Configure time and should be accompanied by the necessary
145 linker additions, eg;
146 ./config -DOPENSSL_USE_GMP -lgmp
147 [Geoff Thorpe]
148
149 *) "openssl engine" will not display ENGINE/DSO load failure errors when
150 testing availability of engines with "-t" - the old behaviour is
151 produced by increasing the feature's verbosity with "-tt".
152 [Geoff Thorpe]
153
a74333f9
LJ
154 *) ECDSA routines: under certain error conditions uninitialized BN objects
155 could be freed. Solution: make sure initialization is performed early
156 enough. (Reported and fix supplied by Nils Larsch <nla@trustcenter.de>
157 via PR#459)
158 [Lutz Jaenicke]
159
0e4aa0d2
GT
160 *) Key-generation can now be implemented in RSA_METHOD, DSA_METHOD
161 and DH_METHOD (eg. by ENGINE implementations) to override the normal
162 software implementations. For DSA and DH, parameter generation can
163 also be overriden by providing the appropriate method callbacks.
164 [Geoff Thorpe]
165
e9224c71
GT
166 *) Change the "progress" mechanism used in key-generation and
167 primality testing to functions that take a new BN_GENCB pointer in
168 place of callback/argument pairs. The new API functions have "_ex"
169 postfixes and the older functions are reimplemented as wrappers for
170 the new ones. The OPENSSL_NO_DEPRECATED symbol can be used to hide
171 declarations of the old functions to help (graceful) attempts to
172 migrate to the new functions. Also, the new key-generation API
173 functions operate on a caller-supplied key-structure and return
174 success/failure rather than returning a key or NULL - this is to
175 help make "keygen" another member function of RSA_METHOD etc.
9d5390a0
BM
176
177 Example for using the new callback interface:
178
179 int (*my_callback)(int a, int b, BN_GENCB *cb) = ...;
180 void *my_arg = ...;
181 BN_GENCB my_cb;
182
183 BN_GENCB_set(&my_cb, my_callback, my_arg);
184
185 return BN_is_prime_ex(some_bignum, BN_prime_checks, NULL, &cb);
186 /* For the meaning of a, b in calls to my_callback(), see the
187 * documentation of the function that calls the callback.
188 * cb will point to my_cb; my_arg can be retrieved as cb->arg.
189 * my_callback should return 1 if it wants BN_is_prime_ex()
190 * to continue, or 0 to stop.
191 */
192
e9224c71
GT
193 [Geoff Thorpe]
194
fdaea9ed
RL
195 *) Change the ZLIB compression method to be stateful, and make it
196 available to TLS with the number defined in
197 draft-ietf-tls-compression-04.txt.
198 [Richard Levitte]
199
20199ca8
RL
200 *) Add the ASN.1 structures and functions for CertificatePair, which
201 is defined as follows (according to X.509_4thEditionDraftV6.pdf):
202
203 CertificatePair ::= SEQUENCE {
9d5390a0
BM
204 forward [0] Certificate OPTIONAL,
205 reverse [1] Certificate OPTIONAL,
206 -- at least one of the pair shall be present -- }
20199ca8
RL
207
208 Also implement the PEM functions to read and write certificate
209 pairs, and defined the PEM tag as "CERTIFICATE PAIR".
210
211 This needed to be defined, mostly for the sake of the LDAP
212 attribute crossCertificatePair, but may prove useful elsewhere as
213 well.
214 [Richard Levitte]
215
6f17f16f
RL
216 *) Make it possible to inhibit symlinking of shared libraries in
217 Makefile.shared, for Cygwin's sake.
218 [Richard Levitte]
219
b53e44e5
BM
220 *) Extend the BIGNUM API by creating new macros that behave like
221 functions
222
223 void BN_set_sign(BIGNUM *a, int neg);
224 int BN_get_sign(const BIGNUM *a);
225
226 and avoid the need to access 'a->neg' directly in applications.
227 [Nils Larsch <nla@trustcenter.de>]
228
5c6bf031
BM
229 *) Implement fast modular reduction for pseudo-Mersenne primes
230 used in NIST curves (crypto/bn/bn_nist.c, crypto/ec/ecp_nist.c).
231 EC_GROUP_new_curve_GFp() will now automatically use this
232 if applicable.
233 [Nils Larsch <nla@trustcenter.de>]
234
19b8d06a
BM
235 *) Add new lock type (CRYPTO_LOCK_BN).
236 [Bodo Moeller]
237
6f7c2cb3
RL
238 *) Change the ENGINE framework to automatically load engines
239 dynamically from specific directories unless they could be
240 found to already be built in or loaded. Move all the
241 current engines except for the cryptodev one to a new
242 directory engines/.
243 The engines in engines/ are built as shared libraries if
244 the "shared" options was given to ./Configure or ./config.
245 Otherwise, they are inserted in libcrypto.a.
246 /usr/local/ssl/engines is the default directory for dynamic
874fee47
RL
247 engines, but that can be overriden at configure time through
248 the usual use of --prefix and/or --openssldir, and at run
249 time with the environment variable OPENSSL_ENGINES.
6f7c2cb3
RL
250 [Geoff Thorpe and Richard Levitte]
251
30afcc07
RL
252 *) Add Makefile.shared, a helper makefile to build shared
253 libraries. Addapt Makefile.org.
254 [Richard Levitte]
255
fc6a6a10
DSH
256 *) Add version info to Win32 DLLs.
257 [Peter 'Luna' Runestig" <peter@runestig.com>]
258
9a48b07e
DSH
259 *) Add new 'medium level' PKCS#12 API. Certificates and keys
260 can be added using this API to created arbitrary PKCS#12
261 files while avoiding the low level API.
262
263 New options to PKCS12_create(), key or cert can be NULL and
264 will then be omitted from the output file. The encryption
265 algorithm NIDs can be set to -1 for no encryption, the mac
266 iteration count can be set to 0 to omit the mac.
267
268 Enhance pkcs12 utility by making the -nokeys and -nocerts
269 options work when creating a PKCS#12 file. New option -nomac
270 to omit the mac, NONE can be set for an encryption algorithm.
271 New code is modified to use the enhanced PKCS12_create()
272 instead of the low level API.
273 [Steve Henson]
274
230fd6b7
DSH
275 *) Extend ASN1 encoder to support indefinite length constructed
276 encoding. This can output sequences tags and octet strings in
277 this form. Modify pk7_asn1.c to support indefinite length
278 encoding. This is experimental and needs additional code to
279 be useful, such as an ASN1 bio and some enhanced streaming
280 PKCS#7 code.
281
282 Extend template encode functionality so that tagging is passed
283 down to the template encoder.
284 [Steve Henson]
285
9226e218
BM
286 *) Let 'openssl req' fail if an argument to '-newkey' is not
287 recognized instead of using RSA as a default.
288 [Bodo Moeller]
289
ea262260
BM
290 *) Add support for ECC-based ciphersuites from draft-ietf-tls-ecc-01.txt.
291 As these are not official, they are not included in "ALL";
292 the "ECCdraft" ciphersuite group alias can be used to select them.
293 [Vipul Gupta and Sumit Gupta (Sun Microsystems Laboratories)]
294
e172d60d
BM
295 *) Add ECDH engine support.
296 [Nils Gura and Douglas Stebila (Sun Microsystems Laboratories)]
297
298 *) Add ECDH in new directory crypto/ecdh/.
299 [Douglas Stebila (Sun Microsystems Laboratories)]
300
95ecacf8
BM
301 *) Let BN_rand_range() abort with an error after 100 iterations
302 without success (which indicates a broken PRNG).
303 [Bodo Moeller]
304
6fb60a84
BM
305 *) Change BN_mod_sqrt() so that it verifies that the input value
306 is really the square of the return value. (Previously,
307 BN_mod_sqrt would show GIGO behaviour.)
308 [Bodo Moeller]
309
7793f30e
BM
310 *) Add named elliptic curves over binary fields from X9.62, SECG,
311 and WAP/WTLS; add OIDs that were still missing.
312
313 [Sheueling Chang Shantz and Douglas Stebila
314 (Sun Microsystems Laboratories)]
315
316 *) Extend the EC library for elliptic curves over binary fields
317 (new files ec2_smpl.c, ec2_smpt.c, ec2_mult.c in crypto/ec/).
318 New EC_METHOD:
319
320 EC_GF2m_simple_method
321
322 New API functions:
323
324 EC_GROUP_new_curve_GF2m
325 EC_GROUP_set_curve_GF2m
326 EC_GROUP_get_curve_GF2m
7793f30e
BM
327 EC_POINT_set_affine_coordinates_GF2m
328 EC_POINT_get_affine_coordinates_GF2m
329 EC_POINT_set_compressed_coordinates_GF2m
330
331 Point compression for binary fields is disabled by default for
332 patent reasons (compile with OPENSSL_EC_BIN_PT_COMP defined to
333 enable it).
334
335 As binary polynomials are represented as BIGNUMs, various members
336 of the EC_GROUP and EC_POINT data structures can be shared
337 between the implementations for prime fields and binary fields;
338 the above ..._GF2m functions (except for EX_GROUP_new_curve_GF2m)
339 are essentially identical to their ..._GFp counterparts.
9e4f9b36
BM
340 (For simplicity, the '..._GFp' prefix has been dropped from
341 various internal method names.)
7793f30e
BM
342
343 An internal 'field_div' method (similar to 'field_mul' and
344 'field_sqr') has been added; this is used only for binary fields.
345
346 [Sheueling Chang Shantz and Douglas Stebila
347 (Sun Microsystems Laboratories)]
348
9e4f9b36 349 *) Optionally dispatch EC_POINT_mul(), EC_POINT_precompute_mult()
7793f30e
BM
350 through methods ('mul', 'precompute_mult').
351
352 The generic implementations (now internally called 'ec_wNAF_mul'
353 and 'ec_wNAF_precomputed_mult') remain the default if these
354 methods are undefined.
355
356 [Sheueling Chang Shantz and Douglas Stebila
357 (Sun Microsystems Laboratories)]
358
359 *) New function EC_GROUP_get_degree, which is defined through
360 EC_METHOD. For curves over prime fields, this returns the bit
361 length of the modulus.
362
363 [Sheueling Chang Shantz and Douglas Stebila
364 (Sun Microsystems Laboratories)]
365
366 *) New functions EC_GROUP_dup, EC_POINT_dup.
367 (These simply call ..._new and ..._copy).
368
369 [Sheueling Chang Shantz and Douglas Stebila
370 (Sun Microsystems Laboratories)]
371
1dc920c8
BM
372 *) Add binary polynomial arithmetic software in crypto/bn/bn_gf2m.c.
373 Polynomials are represented as BIGNUMs (where the sign bit is not
374 used) in the following functions [macros]:
375
376 BN_GF2m_add
377 BN_GF2m_sub [= BN_GF2m_add]
378 BN_GF2m_mod [wrapper for BN_GF2m_mod_arr]
379 BN_GF2m_mod_mul [wrapper for BN_GF2m_mod_mul_arr]
380 BN_GF2m_mod_sqr [wrapper for BN_GF2m_mod_sqr_arr]
381 BN_GF2m_mod_inv
382 BN_GF2m_mod_exp [wrapper for BN_GF2m_mod_exp_arr]
383 BN_GF2m_mod_sqrt [wrapper for BN_GF2m_mod_sqrt_arr]
384 BN_GF2m_mod_solve_quad [wrapper for BN_GF2m_mod_solve_quad_arr]
385 BN_GF2m_cmp [= BN_ucmp]
386
387 (Note that only the 'mod' functions are actually for fields GF(2^m).
388 BN_GF2m_add() is misnomer, but this is for the sake of consistency.)
389
390 For some functions, an the irreducible polynomial defining a
391 field can be given as an 'unsigned int[]' with strictly
392 decreasing elements giving the indices of those bits that are set;
393 i.e., p[] represents the polynomial
394 f(t) = t^p[0] + t^p[1] + ... + t^p[k]
395 where
396 p[0] > p[1] > ... > p[k] = 0.
397 This applies to the following functions:
398
399 BN_GF2m_mod_arr
400 BN_GF2m_mod_mul_arr
401 BN_GF2m_mod_sqr_arr
402 BN_GF2m_mod_inv_arr [wrapper for BN_GF2m_mod_inv]
403 BN_GF2m_mod_div_arr [wrapper for BN_GF2m_mod_div]
404 BN_GF2m_mod_exp_arr
405 BN_GF2m_mod_sqrt_arr
406 BN_GF2m_mod_solve_quad_arr
407 BN_GF2m_poly2arr
408 BN_GF2m_arr2poly
409
410 Conversion can be performed by the following functions:
411
412 BN_GF2m_poly2arr
413 BN_GF2m_arr2poly
414
415 bntest.c has additional tests for binary polynomial arithmetic.
416
909abce8
BM
417 Two implementations for BN_GF2m_mod_div() are available.
418 The default algorithm simply uses BN_GF2m_mod_inv() and
419 BN_GF2m_mod_mul(). The alternative algorithm is compiled in only
420 if OPENSSL_SUN_GF2M_DIV is defined (patent pending; read the
421 copyright notice in crypto/bn/bn_gf2m.c before enabling it).
1dc920c8
BM
422
423 [Sheueling Chang Shantz and Douglas Stebila
424 (Sun Microsystems Laboratories)]
425
16dc1cfb
BM
426 *) Add new error code 'ERR_R_DISABLED' that can be used when some
427 functionality is disabled at compile-time.
428 [Douglas Stebila <douglas.stebila@sun.com>]
429
ea4f109c
BM
430 *) Change default behaviour of 'openssl asn1parse' so that more
431 information is visible when viewing, e.g., a certificate:
432
433 Modify asn1_parse2 (crypto/asn1/asn1_par.c) so that in non-'dump'
434 mode the content of non-printable OCTET STRINGs is output in a
435 style similar to INTEGERs, but with '[HEX DUMP]' prepended to
436 avoid the appearance of a printable string.
437 [Nils Larsch <nla@trustcenter.de>]
438
254ef80d
BM
439 *) Add 'asn1_flag' and 'asn1_form' member to EC_GROUP with access
440 functions
441 EC_GROUP_set_asn1_flag()
442 EC_GROUP_get_asn1_flag()
443 EC_GROUP_set_point_conversion_form()
444 EC_GROUP_get_point_conversion_form()
445 These control ASN1 encoding details:
b8e0e123
BM
446 - Curves (i.e., groups) are encoded explicitly unless asn1_flag
447 has been set to OPENSSL_EC_NAMED_CURVE.
5f3d6f70 448 - Points are encoded in uncompressed form by default; options for
254ef80d
BM
449 asn1_for are as for point2oct, namely
450 POINT_CONVERSION_COMPRESSED
451 POINT_CONVERSION_UNCOMPRESSED
452 POINT_CONVERSION_HYBRID
5f3d6f70
BM
453
454 Also add 'seed' and 'seed_len' members to EC_GROUP with access
455 functions
456 EC_GROUP_set_seed()
457 EC_GROUP_get0_seed()
458 EC_GROUP_get_seed_len()
459 This is used only for ASN1 purposes (so far).
458c2917
BM
460 [Nils Larsch <nla@trustcenter.de>]
461
462 *) Add 'field_type' member to EC_METHOD, which holds the NID
463 of the appropriate field type OID. The new function
464 EC_METHOD_get_field_type() returns this value.
465 [Nils Larsch <nla@trustcenter.de>]
466
6cbe6382
BM
467 *) Add functions
468 EC_POINT_point2bn()
469 EC_POINT_bn2point()
470 EC_POINT_point2hex()
471 EC_POINT_hex2point()
472 providing useful interfaces to EC_POINT_point2oct() and
473 EC_POINT_oct2point().
474 [Nils Larsch <nla@trustcenter.de>]
475
b6db386f
BM
476 *) Change internals of the EC library so that the functions
477 EC_GROUP_set_generator()
478 EC_GROUP_get_generator()
479 EC_GROUP_get_order()
480 EC_GROUP_get_cofactor()
481 are implemented directly in crypto/ec/ec_lib.c and not dispatched
482 to methods, which would lead to unnecessary code duplication when
483 adding different types of curves.
6cbe6382 484 [Nils Larsch <nla@trustcenter.de> with input by Bodo Moeller]
b6db386f 485
47234cd3
BM
486 *) Implement compute_wNAF (crypto/ec/ec_mult.c) without BIGNUM
487 arithmetic, and such that modified wNAFs are generated
488 (which avoid length expansion in many cases).
489 [Bodo Moeller]
490
82652aaf
BM
491 *) Add a function EC_GROUP_check_discriminant() (defined via
492 EC_METHOD) that verifies that the curve discriminant is non-zero.
493
494 Add a function EC_GROUP_check() that makes some sanity tests
495 on a EC_GROUP, its generator and order. This includes
496 EC_GROUP_check_discriminant().
497 [Nils Larsch <nla@trustcenter.de>]
498
4d94ae00
BM
499 *) Add ECDSA in new directory crypto/ecdsa/.
500
5dbd3efc
BM
501 Add applications 'openssl ecparam' and 'openssl ecdsa'
502 (these are based on 'openssl dsaparam' and 'openssl dsa').
4d94ae00
BM
503
504 ECDSA support is also included in various other files across the
505 library. Most notably,
506 - 'openssl req' now has a '-newkey ecdsa:file' option;
507 - EVP_PKCS82PKEY (crypto/evp/evp_pkey.c) now can handle ECDSA;
508 - X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and
509 d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make
510 them suitable for ECDSA where domain parameters must be
e172d60d
BM
511 extracted before the specific public key;
512 - ECDSA engine support has been added.
f8e21776 513 [Nils Larsch <nla@trustcenter.de>]
4d94ae00 514
af28dd6c 515 *) Include some named elliptic curves, and add OIDs from X9.62,
ed5e37c3 516 SECG, and WAP/WTLS. Each curve can be obtained from the new
7eb18f12 517 function
ed5e37c3
BM
518 EC_GROUP_new_by_nid(),
519 and the list of available named curves can be obtained with
520 EC_get_builtin_curves().
254ef80d
BM
521 Also add a 'curve_name' member to EC_GROUP objects, which can be
522 accessed via
4d94ae00
BM
523 EC_GROUP_set_nid()
524 EC_GROUP_get_nid()
525 [Nils Larsch <nla@trustcenter.de, Bodo Moeller]
526
c1862f91
BM
527 *) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there
528 was actually never needed) and in BN_mul(). The removal in BN_mul()
529 required a small change in bn_mul_part_recursive() and the addition
530 of the functions bn_cmp_part_words(), bn_sub_part_words() and
531 bn_add_part_words(), which do the same thing as bn_cmp_words(),
532 bn_sub_words() and bn_add_words() except they take arrays with
533 differing sizes.
534 [Richard Levitte]
535
132eaa59
RL
536 Changes between 0.9.7a and 0.9.7b [xx XXX 2003]
537
02da5bcd
BM
538 *) Countermeasure against the Klima-Pokorny-Rosa extension of
539 Bleichbacher's attack on PKCS #1 v1.5 padding: treat
540 a protocol version number mismatch like a decryption error
541 in ssl3_get_client_key_exchange (ssl/s3_srvr.c).
542 [Bodo Moeller]
543
c554155b
BM
544 *) Turn on RSA blinding by default in the default implementation
545 to avoid a timing attack. Applications that don't want it can call
546 RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING.
547 They would be ill-advised to do so in most cases.
5679bcce 548 [Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller]
c554155b
BM
549
550 *) Change RSA blinding code so that it works when the PRNG is not
551 seeded (in this case, the secret RSA exponent is abused as
552 an unpredictable seed -- if it is not unpredictable, there
5679bcce
BM
553 is no point in blinding anyway). Make RSA blinding thread-safe
554 by remembering the creator's thread ID in rsa->blinding and
555 having all other threads use local one-time blinding factors
556 (this requires more computation than sharing rsa->blinding, but
557 avoids excessive locking; and if an RSA object is not shared
558 between threads, blinding will still be very fast).
c554155b
BM
559 [Bodo Moeller]
560
02da5bcd 561yet to be integrated into this CVS branch:
02da5bcd
BM
562- Geoff's ENGINE_set_default() fix
563
63ff3e83
UM
564 *) Target "mingw" now allows native Windows code to be generated in
565 the Cygwin environment as well as with the MinGW compiler.
566 [Ulf Moeller]
132eaa59 567
5b0b0e98
RL
568 Changes between 0.9.7 and 0.9.7a [19 Feb 2003]
569
570 *) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
571 via timing by performing a MAC computation even if incorrrect
572 block cipher padding has been found. This is a countermeasure
573 against active attacks where the attacker has to distinguish
574 between bad padding and a MAC verification error. (CAN-2003-0078)
575
576 [Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
577 Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
578 Martin Vuagnoux (EPFL, Ilion)]
948dcdb8 579
758f942b
RL
580 *) Make the no-err option work as intended. The intention with no-err
581 is not to have the whole error stack handling routines removed from
582 libcrypto, it's only intended to remove all the function name and
583 reason texts, thereby removing some of the footprint that may not
584 be interesting if those errors aren't displayed anyway.
585
586 NOTE: it's still possible for any application or module to have it's
587 own set of error texts inserted. The routines are there, just not
588 used by default when no-err is given.
589 [Richard Levitte]
590
b7bbac72
RL
591 *) Add support for FreeBSD on IA64.
592 [dirk.meyer@dinoex.sub.org via Richard Levitte, resolves #454]
593
9ec1d35f
RL
594 *) Adjust DES_cbc_cksum() so it returns the same value as the MIT
595 Kerberos function mit_des_cbc_cksum(). Before this change,
596 the value returned by DES_cbc_cksum() was like the one from
597 mit_des_cbc_cksum(), except the bytes were swapped.
598 [Kevin Greaney <Kevin.Greaney@hp.com> and Richard Levitte]
599
cf56663f
DSH
600 *) Allow an application to disable the automatic SSL chain building.
601 Before this a rather primitive chain build was always performed in
602 ssl3_output_cert_chain(): an application had no way to send the
603 correct chain if the automatic operation produced an incorrect result.
604
605 Now the chain builder is disabled if either:
606
607 1. Extra certificates are added via SSL_CTX_add_extra_chain_cert().
608
609 2. The mode flag SSL_MODE_NO_AUTO_CHAIN is set.
610
611 The reasoning behind this is that an application would not want the
612 auto chain building to take place if extra chain certificates are
613 present and it might also want a means of sending no additional
614 certificates (for example the chain has two certificates and the
615 root is omitted).
616 [Steve Henson]
617
0b13e9f0
RL
618 *) Add the possibility to build without the ENGINE framework.
619 [Steven Reddie <smr@essemer.com.au> via Richard Levitte]
620
d3b5cb53
DSH
621 *) Under Win32 gmtime() can return NULL: check return value in
622 OPENSSL_gmtime(). Add error code for case where gmtime() fails.
623 [Steve Henson]
624
a74333f9
LJ
625 *) DSA routines: under certain error conditions uninitialized BN objects
626 could be freed. Solution: make sure initialization is performed early
627 enough. (Reported and fix supplied by Ivan D Nestlerode <nestler@MIT.EDU>,
628 Nils Larsch <nla@trustcenter.de> via PR#459)
629 [Lutz Jaenicke]
630
8ec16ce7
LJ
631 *) Another fix for SSLv2 session ID handling: the session ID was incorrectly
632 checked on reconnect on the client side, therefore session resumption
633 could still fail with a "ssl session id is different" error. This
634 behaviour is masked when SSL_OP_ALL is used due to
635 SSL_OP_MICROSOFT_SESS_ID_BUG being set.
636 Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as
637 followup to PR #377.
638 [Lutz Jaenicke]
639
04aff67d
RL
640 *) IA-32 assembler support enhancements: unified ELF targets, support
641 for SCO/Caldera platforms, fix for Cygwin shared build.
642 [Andy Polyakov]
643
afd41c9f
RL
644 *) Add support for FreeBSD on sparc64. As a consequence, support for
645 FreeBSD on non-x86 processors is separate from x86 processors on
646 the config script, much like the NetBSD support.
647 [Richard Levitte & Kris Kennaway <kris@obsecurity.org>]
948dcdb8 648
08101d72 649 Changes between 0.9.6h and 0.9.7 [31 Dec 2002]
3e06fb75 650
21cde7a4
LJ
651 *) Fix session ID handling in SSLv2 client code: the SERVER FINISHED
652 code (06) was taken as the first octet of the session ID and the last
653 octet was ignored consequently. As a result SSLv2 client side session
654 caching could not have worked due to the session ID mismatch between
655 client and server.
656 Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as
657 PR #377.
658 [Lutz Jaenicke]
659
9cd16b1d
RL
660 *) Change the declaration of needed Kerberos libraries to use EX_LIBS
661 instead of the special (and badly supported) LIBKRB5. LIBKRB5 is
662 removed entirely.
663 [Richard Levitte]
664
14676ffc 665 *) The hw_ncipher.c engine requires dynamic locks. Unfortunately, it
a1457874
RL
666 seems that in spite of existing for more than a year, many application
667 author have done nothing to provide the necessary callbacks, which
14676ffc
RL
668 means that this particular engine will not work properly anywhere.
669 This is a very unfortunate situation which forces us, in the name
670 of usability, to give the hw_ncipher.c a static lock, which is part
671 of libcrypto.
672 NOTE: This is for the 0.9.7 series ONLY. This hack will never
673 appear in 0.9.8 or later. We EXPECT application authors to have
674 dealt properly with this when 0.9.8 is released (unless we actually
675 make such changes in the libcrypto locking code that changes will
676 have to be made anyway).
677 [Richard Levitte]
678
2053c43d
DSH
679 *) In asn1_d2i_read_bio() repeatedly call BIO_read() until all content
680 octets have been read, EOF or an error occurs. Without this change
681 some truncated ASN1 structures will not produce an error.
682 [Steve Henson]
683
17582ccf
RL
684 *) Disable Heimdal support, since it hasn't been fully implemented.
685 Still give the possibility to force the use of Heimdal, but with
686 warnings and a request that patches get sent to openssl-dev.
687 [Richard Levitte]
688
0bf23d9b
RL
689 *) Add the VC-CE target, introduce the WINCE sysname, and add
690 INSTALL.WCE and appropriate conditionals to make it build.
691 [Steven Reddie <smr@essemer.com.au> via Richard Levitte]
692
6f17f16f
RL
693 *) Change the DLL names for Cygwin to cygcrypto-x.y.z.dll and
694 cygssl-x.y.z.dll, where x, y and z are the major, minor and
695 edit numbers of the version.
696 [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte]
697
54a656ef
BL
698 *) Introduce safe string copy and catenation functions
699 (BUF_strlcpy() and BUF_strlcat()).
700 [Ben Laurie (CHATS) and Richard Levitte]
701
702 *) Avoid using fixed-size buffers for one-line DNs.
703 [Ben Laurie (CHATS)]
704
705 *) Add BUF_MEM_grow_clean() to avoid information leakage when
706 resizing buffers containing secrets, and use where appropriate.
707 [Ben Laurie (CHATS)]
708
709 *) Avoid using fixed size buffers for configuration file location.
710 [Ben Laurie (CHATS)]
711
712 *) Avoid filename truncation for various CA files.
713 [Ben Laurie (CHATS)]
714
715 *) Use sizeof in preference to magic numbers.
716 [Ben Laurie (CHATS)]
717
718 *) Avoid filename truncation in cert requests.
719 [Ben Laurie (CHATS)]
720
54a656ef
BL
721 *) Add assertions to check for (supposedly impossible) buffer
722 overflows.
723 [Ben Laurie (CHATS)]
724
725 *) Don't cache truncated DNS entries in the local cache (this could
726 potentially lead to a spoofing attack).
727 [Ben Laurie (CHATS)]
728
729 *) Fix various buffers to be large enough for hex/decimal
730 representations in a platform independent manner.
731 [Ben Laurie (CHATS)]
732
733 *) Add CRYPTO_realloc_clean() to avoid information leakage when
734 resizing buffers containing secrets, and use where appropriate.
735 [Ben Laurie (CHATS)]
736
737 *) Add BIO_indent() to avoid much slightly worrying code to do
738 indents.
739 [Ben Laurie (CHATS)]
740
741 *) Convert sprintf()/BIO_puts() to BIO_printf().
742 [Ben Laurie (CHATS)]
743
744 *) buffer_gets() could terminate with the buffer only half
745 full. Fixed.
746 [Ben Laurie (CHATS)]
747
748 *) Add assertions to prevent user-supplied crypto functions from
749 overflowing internal buffers by having large block sizes, etc.
750 [Ben Laurie (CHATS)]
751
2b2ab523
BM
752 *) New OPENSSL_assert() macro (similar to assert(), but enabled
753 unconditionally).
754 [Ben Laurie (CHATS)]
755
54a656ef
BL
756 *) Eliminate unused copy of key in RC4.
757 [Ben Laurie (CHATS)]
758
759 *) Eliminate unused and incorrectly sized buffers for IV in pem.h.
760 [Ben Laurie (CHATS)]
761
762 *) Fix off-by-one error in EGD path.
763 [Ben Laurie (CHATS)]
764
765 *) If RANDFILE path is too long, ignore instead of truncating.
766 [Ben Laurie (CHATS)]
767
768 *) Eliminate unused and incorrectly sized X.509 structure
769 CBCParameter.
770 [Ben Laurie (CHATS)]
771
772 *) Eliminate unused and dangerous function knumber().
773 [Ben Laurie (CHATS)]
774
775 *) Eliminate unused and dangerous structure, KSSL_ERR.
776 [Ben Laurie (CHATS)]
777
778 *) Protect against overlong session ID context length in an encoded
779 session object. Since these are local, this does not appear to be
780 exploitable.
781 [Ben Laurie (CHATS)]
782
3e06fb75
BM
783 *) Change from security patch (see 0.9.6e below) that did not affect
784 the 0.9.6 release series:
785
786 Remote buffer overflow in SSL3 protocol - an attacker could
787 supply an oversized master key in Kerberos-enabled versions.
788 (CAN-2002-0657)
789 [Ben Laurie (CHATS)]
dc014d43 790
7ba3a4c3
RL
791 *) Change the SSL kerb5 codes to match RFC 2712.
792 [Richard Levitte]
793
ba111217
BM
794 *) Make -nameopt work fully for req and add -reqopt switch.
795 [Michael Bell <michael.bell@rz.hu-berlin.de>, Steve Henson]
796
3f6db7f5
DSH
797 *) The "block size" for block ciphers in CFB and OFB mode should be 1.
798 [Steve Henson, reported by Yngve Nysaeter Pettersen <yngve@opera.com>]
799
f013c7f2
RL
800 *) Make sure tests can be performed even if the corresponding algorithms
801 have been removed entirely. This was also the last step to make
802 OpenSSL compilable with DJGPP under all reasonable conditions.
803 [Richard Levitte, Doug Kaufman <dkaufman@rahul.net>]
804
648765ba 805 *) Add cipher selection rules COMPLEMENTOFALL and COMPLEMENTOFDEFAULT
c6ccf055
LJ
806 to allow version independent disabling of normally unselected ciphers,
807 which may be activated as a side-effect of selecting a single cipher.
648765ba
BM
808
809 (E.g., cipher list string "RSA" enables ciphersuites that are left
810 out of "ALL" because they do not provide symmetric encryption.
811 "RSA:!COMPLEMEMENTOFALL" avoids these unsafe ciphersuites.)
c6ccf055
LJ
812 [Lutz Jaenicke, Bodo Moeller]
813
041843e4
RL
814 *) Add appropriate support for separate platform-dependent build
815 directories. The recommended way to make a platform-dependent
816 build directory is the following (tested on Linux), maybe with
817 some local tweaks:
818
819 # Place yourself outside of the OpenSSL source tree. In
820 # this example, the environment variable OPENSSL_SOURCE
821 # is assumed to contain the absolute OpenSSL source directory.
3e06fb75
BM
822 mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
823 cd objtree/"`uname -s`-`uname -r`-`uname -m`"
4a9476dd 824 (cd $OPENSSL_SOURCE; find . -type f) | while read F; do
041843e4
RL
825 mkdir -p `dirname $F`
826 ln -s $OPENSSL_SOURCE/$F $F
827 done
828
829 To be absolutely sure not to disturb the source tree, a "make clean"
830 is a good thing. If it isn't successfull, don't worry about it,
831 it probably means the source directory is very clean.
832 [Richard Levitte]
833
a6c6874a
GT
834 *) Make sure any ENGINE control commands make local copies of string
835 pointers passed to them whenever necessary. Otherwise it is possible
836 the caller may have overwritten (or deallocated) the original string
837 data when a later ENGINE operation tries to use the stored values.
838