]> git.ipfire.org Git - thirdparty/openssl.git/blame - CHANGES
EXIT() may mean return(). That's confusing, so let's have it really mean
[thirdparty/openssl.git] / CHANGES
CommitLineData
81a6c781 1
f1c236f8 2 OpenSSL CHANGES
651d0aff
RE
3 _______________
4
4d94ae00
BM
5 Changes between 0.9.7 and 0.9.8 [xx XXX 2002]
6
20199ca8
RL
7 *) Add the ASN.1 structures and functions for CertificatePair, which
8 is defined as follows (according to X.509_4thEditionDraftV6.pdf):
9
10 CertificatePair ::= SEQUENCE {
11 forward [0] Certificate OPTIONAL,
12 reverse [1] Certificate OPTIONAL,
13 -- at least one of the pair shall be present -- }
14
15 Also implement the PEM functions to read and write certificate
16 pairs, and defined the PEM tag as "CERTIFICATE PAIR".
17
18 This needed to be defined, mostly for the sake of the LDAP
19 attribute crossCertificatePair, but may prove useful elsewhere as
20 well.
21 [Richard Levitte]
22
6f17f16f
RL
23 *) Make it possible to inhibit symlinking of shared libraries in
24 Makefile.shared, for Cygwin's sake.
25 [Richard Levitte]
26
b53e44e5
BM
27 *) Extend the BIGNUM API by creating new macros that behave like
28 functions
29
30 void BN_set_sign(BIGNUM *a, int neg);
31 int BN_get_sign(const BIGNUM *a);
32
33 and avoid the need to access 'a->neg' directly in applications.
34 [Nils Larsch <nla@trustcenter.de>]
35
5c6bf031
BM
36 *) Implement fast modular reduction for pseudo-Mersenne primes
37 used in NIST curves (crypto/bn/bn_nist.c, crypto/ec/ecp_nist.c).
38 EC_GROUP_new_curve_GFp() will now automatically use this
39 if applicable.
40 [Nils Larsch <nla@trustcenter.de>]
41
19b8d06a
BM
42 *) Add new lock type (CRYPTO_LOCK_BN).
43 [Bodo Moeller]
44
6f7c2cb3
RL
45 *) Change the ENGINE framework to automatically load engines
46 dynamically from specific directories unless they could be
47 found to already be built in or loaded. Move all the
48 current engines except for the cryptodev one to a new
49 directory engines/.
50 The engines in engines/ are built as shared libraries if
51 the "shared" options was given to ./Configure or ./config.
52 Otherwise, they are inserted in libcrypto.a.
53 /usr/local/ssl/engines is the default directory for dynamic
874fee47
RL
54 engines, but that can be overriden at configure time through
55 the usual use of --prefix and/or --openssldir, and at run
56 time with the environment variable OPENSSL_ENGINES.
6f7c2cb3
RL
57 [Geoff Thorpe and Richard Levitte]
58
30afcc07
RL
59 *) Add Makefile.shared, a helper makefile to build shared
60 libraries. Addapt Makefile.org.
61 [Richard Levitte]
62
fc6a6a10
DSH
63 *) Add version info to Win32 DLLs.
64 [Peter 'Luna' Runestig" <peter@runestig.com>]
65
9a48b07e
DSH
66 *) Add new 'medium level' PKCS#12 API. Certificates and keys
67 can be added using this API to created arbitrary PKCS#12
68 files while avoiding the low level API.
69
70 New options to PKCS12_create(), key or cert can be NULL and
71 will then be omitted from the output file. The encryption
72 algorithm NIDs can be set to -1 for no encryption, the mac
73 iteration count can be set to 0 to omit the mac.
74
75 Enhance pkcs12 utility by making the -nokeys and -nocerts
76 options work when creating a PKCS#12 file. New option -nomac
77 to omit the mac, NONE can be set for an encryption algorithm.
78 New code is modified to use the enhanced PKCS12_create()
79 instead of the low level API.
80 [Steve Henson]
81
230fd6b7
DSH
82 *) Extend ASN1 encoder to support indefinite length constructed
83 encoding. This can output sequences tags and octet strings in
84 this form. Modify pk7_asn1.c to support indefinite length
85 encoding. This is experimental and needs additional code to
86 be useful, such as an ASN1 bio and some enhanced streaming
87 PKCS#7 code.
88
89 Extend template encode functionality so that tagging is passed
90 down to the template encoder.
91 [Steve Henson]
92
9226e218
BM
93 *) Let 'openssl req' fail if an argument to '-newkey' is not
94 recognized instead of using RSA as a default.
95 [Bodo Moeller]
96
ea262260
BM
97 *) Add support for ECC-based ciphersuites from draft-ietf-tls-ecc-01.txt.
98 As these are not official, they are not included in "ALL";
99 the "ECCdraft" ciphersuite group alias can be used to select them.
100 [Vipul Gupta and Sumit Gupta (Sun Microsystems Laboratories)]
101
e172d60d
BM
102 *) Add ECDH engine support.
103 [Nils Gura and Douglas Stebila (Sun Microsystems Laboratories)]
104
105 *) Add ECDH in new directory crypto/ecdh/.
49a0f778
BM
106TODO: more general interface (return x coordinate, not its hash)
107TODO: bug: pad x with leading zeros if necessary
e172d60d
BM
108 [Douglas Stebila (Sun Microsystems Laboratories)]
109
95ecacf8
BM
110 *) Let BN_rand_range() abort with an error after 100 iterations
111 without success (which indicates a broken PRNG).
112 [Bodo Moeller]
113
6fb60a84
BM
114 *) Change BN_mod_sqrt() so that it verifies that the input value
115 is really the square of the return value. (Previously,
116 BN_mod_sqrt would show GIGO behaviour.)
117 [Bodo Moeller]
118
7793f30e
BM
119 *) Add named elliptic curves over binary fields from X9.62, SECG,
120 and WAP/WTLS; add OIDs that were still missing.
121
122 [Sheueling Chang Shantz and Douglas Stebila
123 (Sun Microsystems Laboratories)]
124
125 *) Extend the EC library for elliptic curves over binary fields
126 (new files ec2_smpl.c, ec2_smpt.c, ec2_mult.c in crypto/ec/).
127 New EC_METHOD:
128
129 EC_GF2m_simple_method
130
131 New API functions:
132
133 EC_GROUP_new_curve_GF2m
134 EC_GROUP_set_curve_GF2m
135 EC_GROUP_get_curve_GF2m
7793f30e
BM
136 EC_POINT_set_affine_coordinates_GF2m
137 EC_POINT_get_affine_coordinates_GF2m
138 EC_POINT_set_compressed_coordinates_GF2m
139
140 Point compression for binary fields is disabled by default for
141 patent reasons (compile with OPENSSL_EC_BIN_PT_COMP defined to
142 enable it).
143
144 As binary polynomials are represented as BIGNUMs, various members
145 of the EC_GROUP and EC_POINT data structures can be shared
146 between the implementations for prime fields and binary fields;
147 the above ..._GF2m functions (except for EX_GROUP_new_curve_GF2m)
148 are essentially identical to their ..._GFp counterparts.
9e4f9b36
BM
149 (For simplicity, the '..._GFp' prefix has been dropped from
150 various internal method names.)
7793f30e
BM
151
152 An internal 'field_div' method (similar to 'field_mul' and
153 'field_sqr') has been added; this is used only for binary fields.
154
155 [Sheueling Chang Shantz and Douglas Stebila
156 (Sun Microsystems Laboratories)]
157
9e4f9b36 158 *) Optionally dispatch EC_POINT_mul(), EC_POINT_precompute_mult()
7793f30e
BM
159 through methods ('mul', 'precompute_mult').
160
161 The generic implementations (now internally called 'ec_wNAF_mul'
162 and 'ec_wNAF_precomputed_mult') remain the default if these
163 methods are undefined.
164
165 [Sheueling Chang Shantz and Douglas Stebila
166 (Sun Microsystems Laboratories)]
167
168 *) New function EC_GROUP_get_degree, which is defined through
169 EC_METHOD. For curves over prime fields, this returns the bit
170 length of the modulus.
171
172 [Sheueling Chang Shantz and Douglas Stebila
173 (Sun Microsystems Laboratories)]
174
175 *) New functions EC_GROUP_dup, EC_POINT_dup.
176 (These simply call ..._new and ..._copy).
177
178 [Sheueling Chang Shantz and Douglas Stebila
179 (Sun Microsystems Laboratories)]
180
1dc920c8
BM
181 *) Add binary polynomial arithmetic software in crypto/bn/bn_gf2m.c.
182 Polynomials are represented as BIGNUMs (where the sign bit is not
183 used) in the following functions [macros]:
184
185 BN_GF2m_add
186 BN_GF2m_sub [= BN_GF2m_add]
187 BN_GF2m_mod [wrapper for BN_GF2m_mod_arr]
188 BN_GF2m_mod_mul [wrapper for BN_GF2m_mod_mul_arr]
189 BN_GF2m_mod_sqr [wrapper for BN_GF2m_mod_sqr_arr]
190 BN_GF2m_mod_inv
191 BN_GF2m_mod_exp [wrapper for BN_GF2m_mod_exp_arr]
192 BN_GF2m_mod_sqrt [wrapper for BN_GF2m_mod_sqrt_arr]
193 BN_GF2m_mod_solve_quad [wrapper for BN_GF2m_mod_solve_quad_arr]
194 BN_GF2m_cmp [= BN_ucmp]
195
196 (Note that only the 'mod' functions are actually for fields GF(2^m).
197 BN_GF2m_add() is misnomer, but this is for the sake of consistency.)
198
199 For some functions, an the irreducible polynomial defining a
200 field can be given as an 'unsigned int[]' with strictly
201 decreasing elements giving the indices of those bits that are set;
202 i.e., p[] represents the polynomial
203 f(t) = t^p[0] + t^p[1] + ... + t^p[k]
204 where
205 p[0] > p[1] > ... > p[k] = 0.
206 This applies to the following functions:
207
208 BN_GF2m_mod_arr
209 BN_GF2m_mod_mul_arr
210 BN_GF2m_mod_sqr_arr
211 BN_GF2m_mod_inv_arr [wrapper for BN_GF2m_mod_inv]
212 BN_GF2m_mod_div_arr [wrapper for BN_GF2m_mod_div]
213 BN_GF2m_mod_exp_arr
214 BN_GF2m_mod_sqrt_arr
215 BN_GF2m_mod_solve_quad_arr
216 BN_GF2m_poly2arr
217 BN_GF2m_arr2poly
218
219 Conversion can be performed by the following functions:
220
221 BN_GF2m_poly2arr
222 BN_GF2m_arr2poly
223
224 bntest.c has additional tests for binary polynomial arithmetic.
225
909abce8
BM
226 Two implementations for BN_GF2m_mod_div() are available.
227 The default algorithm simply uses BN_GF2m_mod_inv() and
228 BN_GF2m_mod_mul(). The alternative algorithm is compiled in only
229 if OPENSSL_SUN_GF2M_DIV is defined (patent pending; read the
230 copyright notice in crypto/bn/bn_gf2m.c before enabling it).
1dc920c8
BM
231
232 [Sheueling Chang Shantz and Douglas Stebila
233 (Sun Microsystems Laboratories)]
234
16dc1cfb
BM
235 *) Add new error code 'ERR_R_DISABLED' that can be used when some
236 functionality is disabled at compile-time.
237 [Douglas Stebila <douglas.stebila@sun.com>]
238
ea4f109c
BM
239 *) Change default behaviour of 'openssl asn1parse' so that more
240 information is visible when viewing, e.g., a certificate:
241
242 Modify asn1_parse2 (crypto/asn1/asn1_par.c) so that in non-'dump'
243 mode the content of non-printable OCTET STRINGs is output in a
244 style similar to INTEGERs, but with '[HEX DUMP]' prepended to
245 avoid the appearance of a printable string.
246 [Nils Larsch <nla@trustcenter.de>]
247
254ef80d
BM
248 *) Add 'asn1_flag' and 'asn1_form' member to EC_GROUP with access
249 functions
250 EC_GROUP_set_asn1_flag()
251 EC_GROUP_get_asn1_flag()
252 EC_GROUP_set_point_conversion_form()
253 EC_GROUP_get_point_conversion_form()
254 These control ASN1 encoding details:
b8e0e123
BM
255 - Curves (i.e., groups) are encoded explicitly unless asn1_flag
256 has been set to OPENSSL_EC_NAMED_CURVE.
5f3d6f70 257 - Points are encoded in uncompressed form by default; options for
254ef80d
BM
258 asn1_for are as for point2oct, namely
259 POINT_CONVERSION_COMPRESSED
260 POINT_CONVERSION_UNCOMPRESSED
261 POINT_CONVERSION_HYBRID
5f3d6f70
BM
262
263 Also add 'seed' and 'seed_len' members to EC_GROUP with access
264 functions
265 EC_GROUP_set_seed()
266 EC_GROUP_get0_seed()
267 EC_GROUP_get_seed_len()
268 This is used only for ASN1 purposes (so far).
458c2917
BM
269 [Nils Larsch <nla@trustcenter.de>]
270
271 *) Add 'field_type' member to EC_METHOD, which holds the NID
272 of the appropriate field type OID. The new function
273 EC_METHOD_get_field_type() returns this value.
274 [Nils Larsch <nla@trustcenter.de>]
275
6cbe6382
BM
276 *) Add functions
277 EC_POINT_point2bn()
278 EC_POINT_bn2point()
279 EC_POINT_point2hex()
280 EC_POINT_hex2point()
281 providing useful interfaces to EC_POINT_point2oct() and
282 EC_POINT_oct2point().
283 [Nils Larsch <nla@trustcenter.de>]
284
b6db386f
BM
285 *) Change internals of the EC library so that the functions
286 EC_GROUP_set_generator()
287 EC_GROUP_get_generator()
288 EC_GROUP_get_order()
289 EC_GROUP_get_cofactor()
290 are implemented directly in crypto/ec/ec_lib.c and not dispatched
291 to methods, which would lead to unnecessary code duplication when
292 adding different types of curves.
6cbe6382 293 [Nils Larsch <nla@trustcenter.de> with input by Bodo Moeller]
b6db386f 294
47234cd3
BM
295 *) Implement compute_wNAF (crypto/ec/ec_mult.c) without BIGNUM
296 arithmetic, and such that modified wNAFs are generated
297 (which avoid length expansion in many cases).
298 [Bodo Moeller]
299
82652aaf
BM
300 *) Add a function EC_GROUP_check_discriminant() (defined via
301 EC_METHOD) that verifies that the curve discriminant is non-zero.
302
303 Add a function EC_GROUP_check() that makes some sanity tests
304 on a EC_GROUP, its generator and order. This includes
305 EC_GROUP_check_discriminant().
306 [Nils Larsch <nla@trustcenter.de>]
307
4d94ae00
BM
308 *) Add ECDSA in new directory crypto/ecdsa/.
309
5dbd3efc
BM
310 Add applications 'openssl ecparam' and 'openssl ecdsa'
311 (these are based on 'openssl dsaparam' and 'openssl dsa').
4d94ae00
BM
312
313 ECDSA support is also included in various other files across the
314 library. Most notably,
315 - 'openssl req' now has a '-newkey ecdsa:file' option;
316 - EVP_PKCS82PKEY (crypto/evp/evp_pkey.c) now can handle ECDSA;
317 - X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and
318 d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make
319 them suitable for ECDSA where domain parameters must be
e172d60d
BM
320 extracted before the specific public key;
321 - ECDSA engine support has been added.
f8e21776 322 [Nils Larsch <nla@trustcenter.de>]
4d94ae00 323
af28dd6c 324 *) Include some named elliptic curves, and add OIDs from X9.62,
ed5e37c3 325 SECG, and WAP/WTLS. Each curve can be obtained from the new
7eb18f12 326 function
ed5e37c3
BM
327 EC_GROUP_new_by_nid(),
328 and the list of available named curves can be obtained with
329 EC_get_builtin_curves().
254ef80d
BM
330 Also add a 'curve_name' member to EC_GROUP objects, which can be
331 accessed via
4d94ae00
BM
332 EC_GROUP_set_nid()
333 EC_GROUP_get_nid()
334 [Nils Larsch <nla@trustcenter.de, Bodo Moeller]
335
3e06fb75
BM
336 Changes between 0.9.6h and 0.9.7 [XX xxx 2002]
337
17582ccf
RL
338 *) Disable Heimdal support, since it hasn't been fully implemented.
339 Still give the possibility to force the use of Heimdal, but with
340 warnings and a request that patches get sent to openssl-dev.
341 [Richard Levitte]
342
0bf23d9b
RL
343 *) Add the VC-CE target, introduce the WINCE sysname, and add
344 INSTALL.WCE and appropriate conditionals to make it build.
345 [Steven Reddie <smr@essemer.com.au> via Richard Levitte]
346
6f17f16f
RL
347 *) Change the DLL names for Cygwin to cygcrypto-x.y.z.dll and
348 cygssl-x.y.z.dll, where x, y and z are the major, minor and
349 edit numbers of the version.
350 [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte]
351
54a656ef
BL
352 *) Introduce safe string copy and catenation functions
353 (BUF_strlcpy() and BUF_strlcat()).
354 [Ben Laurie (CHATS) and Richard Levitte]
355
356 *) Avoid using fixed-size buffers for one-line DNs.
357 [Ben Laurie (CHATS)]
358
359 *) Add BUF_MEM_grow_clean() to avoid information leakage when
360 resizing buffers containing secrets, and use where appropriate.
361 [Ben Laurie (CHATS)]
362
363 *) Avoid using fixed size buffers for configuration file location.
364 [Ben Laurie (CHATS)]
365
366 *) Avoid filename truncation for various CA files.
367 [Ben Laurie (CHATS)]
368
369 *) Use sizeof in preference to magic numbers.
370 [Ben Laurie (CHATS)]
371
372 *) Avoid filename truncation in cert requests.
373 [Ben Laurie (CHATS)]
374
54a656ef
BL
375 *) Add assertions to check for (supposedly impossible) buffer
376 overflows.
377 [Ben Laurie (CHATS)]
378
379 *) Don't cache truncated DNS entries in the local cache (this could
380 potentially lead to a spoofing attack).
381 [Ben Laurie (CHATS)]
382
383 *) Fix various buffers to be large enough for hex/decimal
384 representations in a platform independent manner.
385 [Ben Laurie (CHATS)]
386
387 *) Add CRYPTO_realloc_clean() to avoid information leakage when
388 resizing buffers containing secrets, and use where appropriate.
389 [Ben Laurie (CHATS)]
390
391 *) Add BIO_indent() to avoid much slightly worrying code to do
392 indents.
393 [Ben Laurie (CHATS)]
394
395 *) Convert sprintf()/BIO_puts() to BIO_printf().
396 [Ben Laurie (CHATS)]
397
398 *) buffer_gets() could terminate with the buffer only half
399 full. Fixed.
400 [Ben Laurie (CHATS)]
401
402 *) Add assertions to prevent user-supplied crypto functions from
403 overflowing internal buffers by having large block sizes, etc.
404 [Ben Laurie (CHATS)]
405
2b2ab523
BM
406 *) New OPENSSL_assert() macro (similar to assert(), but enabled
407 unconditionally).
408 [Ben Laurie (CHATS)]
409
54a656ef
BL
410 *) Eliminate unused copy of key in RC4.
411 [Ben Laurie (CHATS)]
412
413 *) Eliminate unused and incorrectly sized buffers for IV in pem.h.
414 [Ben Laurie (CHATS)]
415
416 *) Fix off-by-one error in EGD path.
417 [Ben Laurie (CHATS)]
418
419 *) If RANDFILE path is too long, ignore instead of truncating.
420 [Ben Laurie (CHATS)]
421
422 *) Eliminate unused and incorrectly sized X.509 structure
423 CBCParameter.
424 [Ben Laurie (CHATS)]
425
426 *) Eliminate unused and dangerous function knumber().
427 [Ben Laurie (CHATS)]
428
429 *) Eliminate unused and dangerous structure, KSSL_ERR.
430 [Ben Laurie (CHATS)]
431
432 *) Protect against overlong session ID context length in an encoded
433 session object. Since these are local, this does not appear to be
434 exploitable.
435 [Ben Laurie (CHATS)]
436
3e06fb75
BM
437 *) Change from security patch (see 0.9.6e below) that did not affect
438 the 0.9.6 release series:
439
440 Remote buffer overflow in SSL3 protocol - an attacker could
441 supply an oversized master key in Kerberos-enabled versions.
442 (CAN-2002-0657)
443 [Ben Laurie (CHATS)]
dc014d43 444
7ba3a4c3
RL
445 *) Change the SSL kerb5 codes to match RFC 2712.
446 [Richard Levitte]
447
ba111217
BM
448 *) Make -nameopt work fully for req and add -reqopt switch.
449 [Michael Bell <michael.bell@rz.hu-berlin.de>, Steve Henson]
450
3f6db7f5
DSH
451 *) The "block size" for block ciphers in CFB and OFB mode should be 1.
452 [Steve Henson, reported by Yngve Nysaeter Pettersen <yngve@opera.com>]
453
f013c7f2
RL
454 *) Make sure tests can be performed even if the corresponding algorithms
455 have been removed entirely. This was also the last step to make
456 OpenSSL compilable with DJGPP under all reasonable conditions.
457 [Richard Levitte, Doug Kaufman <dkaufman@rahul.net>]
458
648765ba 459 *) Add cipher selection rules COMPLEMENTOFALL and COMPLEMENTOFDEFAULT
c6ccf055
LJ
460 to allow version independent disabling of normally unselected ciphers,
461 which may be activated as a side-effect of selecting a single cipher.
648765ba
BM
462
463 (E.g., cipher list string "RSA" enables ciphersuites that are left
464 out of "ALL" because they do not provide symmetric encryption.
465 "RSA:!COMPLEMEMENTOFALL" avoids these unsafe ciphersuites.)
c6ccf055
LJ
466 [Lutz Jaenicke, Bodo Moeller]
467
041843e4
RL
468 *) Add appropriate support for separate platform-dependent build
469 directories. The recommended way to make a platform-dependent
470 build directory is the following (tested on Linux), maybe with
471 some local tweaks:
472
473 # Place yourself outside of the OpenSSL source tree. In
474 # this example, the environment variable OPENSSL_SOURCE
475 # is assumed to contain the absolute OpenSSL source directory.
3e06fb75
BM
476 mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
477 cd objtree/"`uname -s`-`uname -r`-`uname -m`"
041843e4
RL
478 (cd $OPENSSL_SOURCE; find . -type f -o -type l) | while read F; do
479 mkdir -p `dirname $F`
480 ln -s $OPENSSL_SOURCE/$F $F
481 done
482
483 To be absolutely sure not to disturb the source tree, a "make clean"
484 is a good thing. If it isn't successfull, don't worry about it,
485 it probably means the source directory is very clean.
486 [Richard Levitte]
487
a6c6874a
GT
488 *) Make sure any ENGINE control commands make local copies of string
489 pointers passed to them whenever necessary. Otherwise it is possible
490 the caller may have overwritten (or deallocated) the original string
491 data when a later ENGINE operation tries to use the stored values.
492