]> git.ipfire.org Git - thirdparty/openssl.git/blame - CHANGES
Linux shared libraries can be linked with debug symbols.
[thirdparty/openssl.git] / CHANGES
CommitLineData
81a6c781 1
f1c236f8 2 OpenSSL CHANGES
651d0aff
RE
3 _______________
4
a9d2bc49 5 Changes between 0.9.6 and 0.9.7 [xx XXX 2001]
a43cf9fa 6
f2346808 7 Both OpenSSL 0.9.6a (bugfix release, 5 Apr 2001) and OpenSSL 0.9.7
a9d2bc49
BM
8 are based on OpenSSL 0.9.6.
9 Change log entries are tagged as follows:
f2346808
BM
10 -) applies to 0.9.6a (/0.9.6b) only
11 *) applies to 0.9.6a (/0.9.6b) and 0.9.7
a9d2bc49
BM
12 +) applies to 0.9.7 only
13
c962479b
DSH
14 +) Fix various bugs related to DSA S/MIME verification. Handle missing
15 parameters in DSA public key structures and return an error in the
16 DSA routines if parameters are absent.
17 [Steve Henson]
18
19 +) Fix ASN1 decoder when decoding type ANY and V_ASN1_OTHER: since this
20 needs to match any other type at all we need to manually clear the
21 tag cache.
22 [Steve Henson]
23
2a8a10ed
GT
24 +) Changes to the "openssl engine" utility to include;
25 - verbosity levels ('-v', '-vv', and '-vvv') that provide information
26 about an ENGINE's available control commands.
27 - executing control commands from command line arguments using the
28 '-pre' and '-post' switches. '-post' is only used if '-t' is
29 specified and the ENGINE is successfully initialised. The syntax for
30 the individual commands are colon-separated, for example;
31 openssl engine chil -pre FORK_CHECK:0 -pre SO_PATH:/lib/test.so
32 [Geoff]
33
34 +) New dynamic control command support for ENGINEs. ENGINEs can now
35 declare their own commands (numbers), names (strings), descriptions,
36 and input types for run-time discovery by calling applications. A
37 subset of these commands are implicitly classed as "executable"
38 depending on their input type, and only these can be invoked through
39 the new string-based API function ENGINE_ctrl_cmd_string(). (Eg. this
40 can be based on user input, config files, etc). The distinction is
41 that "executable" commands cannot return anything other than a boolean
42 result and can only support numeric or string input, whereas some
43 discoverable commands may only be for direct use through
44 ENGINE_ctrl(), eg. supporting the exchange of binary data, function
45 pointers, or other custom uses. The "executable" commands are to
46 support parameterisations of ENGINE behaviour that can be
47 unambiguously defined by ENGINEs and used consistently across any
48 OpenSSL-based application. Commands have been added to all the
49 existing hardware-supporting ENGINEs, noticeably "SO_PATH" to allow
50 control over shared-library paths without source code alterations.
51 [Geoff]
52
53 +) Changed all ENGINE implementations to dynamically allocate their
54 ENGINEs rather than declaring them statically. Apart from this being
55 necessary with the removal of the ENGINE_FLAGS_MALLOCED distinction,
56 this also allows the implementations to compile without using the
57 internal engine_int.h header.
58 [Geoff]
59
4d6115a5
GT
60 +) Minor adjustment to "rand" code. RAND_get_rand_method() now returns a
61 'const' value. Any code that should be able to modify a RAND_METHOD
62 should already have non-const pointers to it (ie. they should only
63 modify their own ones).
64 [Geoff]
65
2a8a10ed 66 +) Made a variety of little tweaks to the ENGINE code.
4d6115a5
GT
67 - "atalla" and "ubsec" string definitions were moved from header files
68 to C code. "nuron" string definitions were placed in variables
69 rather than hard-coded - allowing parameterisation of these values
70 later on via ctrl() commands.
71 - Removed unused "#if 0"'d code.
72 - Fixed engine list iteration code so it uses ENGINE_free() to release
73 structural references.
74 - Constified the RAND_METHOD element of ENGINE structures.
75 - Constified various get/set functions as appropriate and added
76 missing functions (including a catch-all ENGINE_cpy that duplicates
77 all ENGINE values onto a new ENGINE except reference counts/state).
78 - Removed NULL parameter checks in get/set functions. Setting a method
79 or function to NULL is a way of cancelling out a previously set
80 value. Passing a NULL ENGINE parameter is just plain stupid anyway
81 and doesn't justify the extra error symbols and code.
82 - Deprecate the ENGINE_FLAGS_MALLOCED define and move the area for
83 flags from engine_int.h to engine.h.
84 - Changed prototypes for ENGINE handler functions (init(), finish(),
85 ctrl(), key-load functions, etc) to take an (ENGINE*) parameter.
86 [Geoff]
87
6e6d04e2
BM
88 *) Move 'if (!initialized) RAND_poll()' into regions protected by
89 CRYPTO_LOCK_RAND. This is not strictly necessary, but avoids
3a25b96c 90 having multiple threads call RAND_poll() concurrently.
6e6d04e2
BM
91 [Bodo Moeller]
92
93 *) In crypto/rand/md_rand.c, replace 'add_do_not_lock' flag by a
94 combination of a flag and a thread ID variable.
95 Otherwise while one thread is in ssleay_rand_bytes (which sets the
96 flag), *other* threads can enter ssleay_add_bytes without obeying
97 the CRYPTO_LOCK_RAND lock (and may even illegaly release the lock
98 that they do not hold after the first thread unsets add_do_not_lock).
99 [Bodo Moeller]
100
c962479b 101>>>>>>> 1.823
a9d2bc49 102 +) Implement binary inversion algorithm for BN_mod_inverse in addition
7d0d0996 103 to the algorithm using long divison. The binary algorithm can be
1f224bf0
BM
104 used only if the modulus is odd. On 32-bit systems, it is faster
105 only for relatively small moduli (roughly 20-30% for 128-bit moduli,
106 roughly 5-15% for 256-bit moduli), so we use it only for moduli
107 up to 450 bits. In 64-bit environments, the binary algorithm
108 appears to be advantageous for much longer moduli; here we use it
109 for moduli up to 2048 bits.
7d0d0996
BM
110 [Bodo Moeller]
111
f2346808 112 *) Change bctest again: '-x' expressions are not available in all
5f1fddbb
BM
113 versions of 'test'.
114 [Bodo Moeller]
115
a9d2bc49
BM
116 -) OpenSSL 0.9.6a released [5 Apr 2001]
117
4ac881ed
RL
118 *) Fix a couple of memory leaks in PKCS7_dataDecode()
119 [Steve Henson, reported by Heyun Zheng <hzheng@atdsprint.com>]
120
967d95f0
RL
121 *) Change Configure and Makefiles to provide EXE_EXT, which will contain
122 the default extension for executables, if any. Also, make the perl
123 scripts that use symlink() to test if it really exists and use "cp"
124 if it doesn't. All this made OpenSSL compilable and installable in
125 CygWin.
126 [Richard Levitte]
127
a9d2bc49 128 +) Rewrite CHOICE field setting in ASN1_item_ex_d2i(). The old code
722ca278
DSH
129 could not support the combine flag in choice fields.
130 [Steve Henson]
131
a9d2bc49
BM
132 -) Fix for asn1_GetSequence() for indefinite length constructed data.
133 If SEQUENCE is length is indefinite just set c->slen to the total
134 amount of data available.
135 [Steve Henson, reported by shige@FreeBSD.org]
136 [This change does not apply to 0.9.7.]
137
884e2608
BM
138 *) Change bctest to avoid here-documents inside command substitution
139 (workaround for FreeBSD /bin/sh bug).
6186ef93
BM
140 For compatibility with Ultrix, avoid shell functions (introduced
141 in the bctest version that searches along $PATH).
884e2608
BM
142 [Bodo Moeller]
143
080b8cad
RL
144 *) Rename 'des_encrypt' to 'des_encrypt1'. This avoids the clashes
145 with des_encrypt() defined on some operating systems, like Solaris
146 and UnixWare.
147 [Richard Levitte]
148
6a5b52ef
UM
149 *) Check the result of RSA-CRT (see D. Boneh, R. DeMillo, R. Lipton:
150 On the Importance of Eliminating Errors in Cryptographic
080b8cad
RL
151 Computations, J. Cryptology 14 (2001) 2, 101-119,
152 http://theory.stanford.edu/~dabo/papers/faults.ps.gz).
153 [Ulf Moeller]
6a5b52ef
UM
154
155 *) MIPS assembler BIGNUM division bug fix.
6d864b70
UM
156 [Andy Polyakov]
157
c9fd9152
UM
158 *) Disabled incorrect Alpha assembler code.
159 [Richard Levitte]
160
a9d2bc49
BM
161 -) Fix PKCS#7 decode routines so they correctly update the length
162 after reading an EOC for the EXPLICIT tag.
163 [Steve Henson]
164 [This change does not apply to 0.9.7.]
165
02ee8626
DSH
166 *) Fix bug in PKCS#12 key generation routines. This was triggered
167 if a 3DES key was generated with a 0 initial byte. Include
168 PKCS12_BROKEN_KEYGEN compilation option to retain the old
169 (but broken) behaviour.
170 [Steve Henson]
171
6e678305
RL
172 *) Enhance bctest to search for a working bc along $PATH and print
173 it when found.
174 [Tim Rice <tim@multitalents.net> via Richard Levitte]
175
a9d2bc49 176 +) Add a 'copy_extensions' option to the 'ca' utility. This copies
791bd0cd
DSH
177 extensions from a certificate request to the certificate.
178 [Steve Henson]
179
a9d2bc49 180 +) Allow multiple 'certopt' and 'nameopt' options to be separated
535d79da
DSH
181 by commas. Add 'namopt' and 'certopt' options to the 'ca' config
182 file: this allows the display of the certificate about to be
183 signed to be customised, to allow certain fields to be included
184 or excluded and extension details. The old system didn't display
185 multicharacter strings properly, omitted fields not in the policy
186 and couldn't display additional details such as extensions.
187 [Steve Henson]
188
5d809414
BM
189 *) Fix memory leaks in err.c: free err_data string if necessary;
190 don't write to the wrong index in ERR_set_error_data.
f51cf14b
BM
191 [Bodo Moeller]
192
a9d2bc49 193 +) Function EC_POINTs_mul for simultaneous scalar multiplication
38374911
BM
194 of an arbitrary number of elliptic curve points, optionally
195 including the generator defined for the EC_GROUP.
196 EC_POINT_mul is a simple wrapper function for the typical case
197 that the point list has just one item (besides the optional
198 generator).
48fe4d62
BM
199 [Bodo Moeller]
200
a9d2bc49 201 +) First EC_METHODs for curves over GF(p):
48fe4d62
BM
202
203 EC_GFp_simple_method() uses the basic BN_mod_mul and BN_mod_sqr
204 operations and provides various method functions that can also
205 operate with faster implementations of modular arithmetic.
206
207 EC_GFp_mont_method() reuses most functions that are part of
208 EC_GFp_simple_method, but uses Montgomery arithmetic.
209
210 [Bodo Moeller; point addition and point doubling
211 implementation directly derived from source code provided by
212 Lenka Fibikova <fibikova@exp-math.uni-essen.de>]
213
a9d2bc49 214 +) Framework for elliptic curves (crypto/ec/ec.h, crypto/ec/ec_lcl.h,
48fe4d62
BM
215 crypto/ec/ec_lib.c):
216
6f8f4431
BM
217 Curves are EC_GROUP objects (with an optional group generator)
218 based on EC_METHODs that are built into the library.
48fe4d62
BM
219
220 Points are EC_POINT objects based on EC_GROUP objects.
221
222 Most of the framework would be able to handle curves over arbitrary
6f8f4431
BM
223 finite fields, but as there are no obvious types for fields other
224 than GF(p), some functions are limited to that for now.
48fe4d62
BM
225 [Bodo Moeller]
226
a9d2bc49 227 +) Add the -HTTP option to s_server. It is similar to -WWW, but requires
251cb4cf
RL
228 that the file contains a complete HTTP response.
229 [Richard Levitte]
230
a9d2bc49 231 +) Add the ec directory to mkdef.pl and mkfiles.pl. In mkdef.pl
b4f682d3
DSH
232 change the def and num file printf format specifier from "%-40sXXX"
233 to "%-39s XXX". The latter will always guarantee a space after the
234 field while the former will cause them to run together if the field
235 is 40 of more characters long.
236 [Steve Henson]
237
a9d2bc49 238 +) Constify the cipher and digest 'method' functions and structures
13588350
DSH
239 and modify related functions to take constant EVP_MD and EVP_CIPHER
240 pointers.
241 [Steve Henson]
242
c1081080
BM
243 *) Implement ssl23_peek (analogous to ssl23_read), which previously
244 did not exist.
245 [Bodo Moeller]
246
bb62a8b0
BM
247 *) Replace rdtsc with _emit statements for VC++ version 5.
248 [Jeremy Cooper <jeremy@baymoo.org>]
bd9e2e4c 249
a9d2bc49 250 +) Hide BN_CTX structure details in bn_lcl.h instead of publishing them
48fe4d62 251 in <openssl/bn.h>. Also further increase BN_CTX_NUM to 32.
c62b26fd
BM
252 [Bodo Moeller]
253
a9d2bc49 254 +) Modify EVP_Digest*() routines so they now return values. Although the
2dc769a1
DSH
255 internal software routines can never fail additional hardware versions
256 might.
257 [Steve Henson]
258
a9d2bc49 259 +) Clean up crypto/err/err.h and change some error codes to avoid conflicts:
5277d7cb
BM
260
261 Previously ERR_R_FATAL was too small and coincided with ERR_LIB_PKCS7
262 (= ERR_R_PKCS7_LIB); it is now 64 instead of 32.
263
264 ASN1 error codes
265 ERR_R_NESTED_ASN1_ERROR
266 ...
267 ERR_R_MISSING_ASN1_EOS
268 were 4 .. 9, conflicting with
269 ERR_LIB_RSA (= ERR_R_RSA_LIB)
270 ...
271 ERR_LIB_PEM (= ERR_R_PEM_LIB).
272 They are now 58 .. 63 (i.e., just below ERR_R_FATAL).
273
274 Add new error code 'ERR_R_INTERNAL_ERROR'.
275 [Bodo Moeller]
276
a9d2bc49 277 +) Don't overuse locks in crypto/err/err.c: For data retrieval, CRYPTO_r_lock
5277d7cb
BM
278 suffices.
279 [Bodo Moeller]
280
a9d2bc49 281 +) New option '-subj arg' for 'openssl req' and 'openssl ca'. This
bad40585
BM
282 sets the subject name for a new request or supersedes the
283 subject name in a given request. Formats that can be parsed are
284 'CN=Some Name, OU=myOU, C=IT'
285 and
286 'CN=Some Name/OU=myOU/C=IT'.
287
288 Add options '-batch' and '-verbose' to 'openssl req'.
289 [Massimiliano Pala <madwolf@hackmasters.net>]
290
757a8b46
RL
291 *) Make it possible to reuse SSLv2 sessions.
292 [Richard Levitte]
293
a9d2bc49 294 +) Introduce the possibility to access global variables through
62dc5aad
RL
295 functions on platform were that's the best way to handle exporting
296 global variables in shared libraries. To enable this functionality,
297 one must configure with "EXPORT_VAR_AS_FN" or defined the C macro
298 "OPENSSL_EXPORT_VAR_AS_FUNCTION" in crypto/opensslconf.h (the latter
299 is normally done by Configure or something similar).
300
301 To implement a global variable, use the macro OPENSSL_IMPLEMENT_GLOBAL
302 in the source file (foo.c) like this:
303
304 OPENSSL_IMPLEMENT_GLOBAL(int,foo)=1;
305 OPENSSL_IMPLEMENT_GLOBAL(double,bar);
306
307 To declare a global variable, use the macros OPENSSL_DECLARE_GLOBAL
308 and OPENSSL_GLOBAL_REF in the header file (foo.h) like this:
309
310 OPENSSL_DECLARE_GLOBAL(int,foo);
311 #define foo OPENSSL_GLOBAL_REF(foo)
312 OPENSSL_DECLARE_GLOBAL(double,bar);
313 #define bar OPENSSL_GLOBAL_REF(bar)
314
315 The #defines are very important, and therefore so is including the
316 header file everywere where the defined globals are used.
317
318 The macro OPENSSL_EXPORT_VAR_AS_FUNCTION also affects the definition
319 of ASN.1 items, but that structure is a bt different.
320
321 The largest change is in util/mkdef.pl which has been enhanced with
322 better and easier to understand logic to choose which symbols should
323 go into the Windows .def files as well as a number of fixes and code
324 cleanup (among others, algorithm keywords are now sorted
325 lexicographically to avoid constant rewrites).
326 [Richard Levitte]
327
f23478c3
DSH
328 *) In copy_email() check for >= 0 as a return value for
329 X509_NAME_get_index_by_NID() since 0 is a valid index.
330 [Steve Henson reported by Massimiliano Pala <madwolf@opensca.org>]
331
a9d2bc49 332 +) In BN_div() keep a copy of the sign of 'num' before writing the
3d2e469c
DSH
333 result to 'rm' because if rm==num the value will be overwritten
334 and produce the wrong result if 'num' is negative: this caused
335 problems with BN_mod() and BN_nnmod().
336 [Steve Henson]
337
a9d2bc49 338 +) Function OCSP_request_verify(). This checks the signature on an
fafc7f98
DSH
339 OCSP request and verifies the signer certificate. The signer
340 certificate is just checked for a generic purpose and OCSP request
341 trust settings.
342 [Steve Henson]
343
a9d2bc49 344 +) Add OCSP_check_validity() function to check the validity of OCSP
f1965221
DSH
345 responses. OCSP responses are prepared in real time and may only
346 be a few seconds old. Simply checking that the current time lies
347 between thisUpdate and nextUpdate max reject otherwise valid responses
348 caused by either OCSP responder or client clock innacuracy. Instead
349 we allow thisUpdate and nextUpdate to fall within a certain period of
350 the current time. The age of the response can also optionally be
351 checked. Two new options -validity_period and -status_age added to
352 ocsp utility.
353 [Steve Henson]
354
a9d2bc49 355 +) If signature or public key algorithm is unrecognized print out its
4ff18c8c
DSH
356 OID rather that just UNKOWN.
357 [Steve Henson]
358
db4a4659
DSH
359 *) Avoid coredump with unsupported or invalid public keys by checking if
360 X509_get_pubkey() fails in PKCS7_verify(). Fix memory leak when
361 PKCS7_verify() fails with non detached data.
362 [Steve Henson]
363
a9d2bc49 364 +) Change OCSP_cert_to_id() to tolerate a NULL subject certificate and
d7c06e9e
DSH
365 OCSP_cert_id_new() a NULL serialNumber. This allows a partial certificate
366 ID to be generated from the issuer certificate alone which can then be
367 passed to OCSP_id_issuer_cmp().
368 [Steve Henson]
369
a9d2bc49 370 +) New compilation option ASN1_ITEM_FUNCTIONS. This causes the new
386828d0
DSH
371 ASN1 modules to export functions returning ASN1_ITEM pointers
372 instead of the ASN1_ITEM structures themselves. This adds several
373 new macros which allow the underlying ASN1 function/structure to
374 be accessed transparently. As a result code should not use ASN1_ITEM
375 references directly (such as &X509_it) but instead use the relevant
376 macros (such as ASN1_ITEM_rptr(X509)). This option is to allow
377 use of the new ASN1 code on platforms where exporting structures
378 is problematical (for example in shared libraries) but exporting
379 functions returning pointers to structures is not.
380 [Steve Henson]
381
a9d2bc49 382 +) Add support for overriding the generation of SSL/TLS session IDs.
fa2b8db4
GT
383 These callbacks can be registered either in an SSL_CTX or per SSL.
384 The purpose of this is to allow applications to control, if they wish,
385 the arbitrary values chosen for use as session IDs, particularly as it
386 can be useful for session caching in multiple-server environments. A
387 command-line switch for testing this (and any client code that wishes
388 to use such a feature) has been added to "s_server".
389 [Geoff Thorpe, Lutz Jaenicke]
390
a9d2bc49 391 +) Modify mkdef.pl to recognise and parse prprocessor conditionals
d399fdf8
RL
392 of the form '#if defined(...) || defined(...) || ...' and
393 '#if !defined(...) && !defined(...) && ...'. This also avoids
394 the growing number of special cases it was previously handling.
395 [Richard Levitte]
396
5003a61b
UM
397 *) Don't use getenv in library functions when run as setuid/setgid.
398 New function OPENSSL_issetugid().
399 [Ulf Moeller]
400
a9d2bc49 401 +) Make all configuration macros available for application by making
cf1b7d96
RL
402 sure they are available in opensslconf.h, by giving them names starting
403 with "OPENSSL_" to avoid conflicts with other packages and by making
404 sure e_os2.h will cover all platform-specific cases together with
405 opensslconf.h.
2affbab9
RL
406 Additionally, it is now possible to define configuration/platform-
407 specific names (called "system identities"). In the C code, these
408 are prefixed with "OPENSSL_SYSNAME_". e_os2.h will create another
409 macro with the name beginning with "OPENSSL_SYS_", which is determined
410 from "OPENSSL_SYSNAME_*" or compiler-specific macros depending on
411 what is available.
cf1b7d96
RL
412 [Richard Levitte]
413
a9d2bc49 414 +) New option -set_serial to 'req' and 'x509' this allows the serial
acba75c5
DSH
415 number to use to be specified on the command line. Previously self
416 signed certificates were hard coded with serial number 0 and the
417 CA options of 'x509' had to use a serial number in a file which was
418 auto incremented.
419 [Steve Henson]
420
934397ec
BM
421 *) Avoid false positives in memory leak detection code (crypto/mem_dbg.c)
422 due to incorrect handling of multi-threading:
423
424 1. Fix timing glitch in the MemCheck_off() portion of CRYPTO_mem_ctrl().
425
426 2. Fix logical glitch in is_MemCheck_on() aka CRYPTO_is_mem_check_on().
427
428 3. Count how many times MemCheck_off() has been called so that
429 nested use can be treated correctly. This also avoids
430 inband-signalling in the previous code (which relied on the
431 assumption that thread ID 0 is impossible).
432 [Bodo Moeller]
433
a9d2bc49 434 +) New options to 'ca' utility to support V2 CRL entry extensions.
a6b7ffdd
DSH
435 Currently CRL reason, invalidity date and hold instruction are
436 supported. Add new CRL extensions to V3 code and some new objects.
437 [Steve Henson]
438
f30d34f3
LJ
439 *) Add "-rand" option also to s_client and s_server.
440 [Lutz Jaenicke]
441
a9d2bc49 442 +) New function EVP_CIPHER_CTX_set_padding() this is used to
f2e5ca84
DSH
443 disable standard block padding (aka PKCS#5 padding) in the EVP
444 API, which was previously mandatory. This means that the data is
445 not padded in any way and so the total length much be a multiple
446 of the block size, otherwise an error occurs.
447 [Steve Henson]
448
a9d2bc49 449 +) Initial (incomplete) OCSP SSL support.
cdc7b8cc
DSH
450 [Steve Henson]
451
720235ee
UM
452 *) Fix CPU detection on Irix 6.x.
453 [Kurt Hockenbury <khockenb@stevens-tech.edu> and
454 "Bruce W. Forsberg" <bruce.forsberg@baesystems.com>]
455
a9d2bc49 456 +) New function OCSP_parse_url(). This splits up a URL into its host,
67c18019
DSH
457 port and path components: primarily to parse OCSP URLs. New -url
458 option to ocsp utility.
459 [Steve Henson]
460
a9d2bc49 461 +) New nonce behavior. The return value of OCSP_check_nonce() now
46a58ab9
DSH
462 reflects the various checks performed. Applications can decide
463 whether to tolerate certain situations such as an absent nonce
464 in a response when one was present in a request: the ocsp application
465 just prints out a warning. New function OCSP_add1_basic_nonce()
466 this is to allow responders to include a nonce in a response even if
467 the request is nonce-less.
468 [Steve Henson]
469
a9d2bc49
BM
470 *) Fix X509_NAME bug which produced incorrect encoding if X509_NAME
471 was empty.
472 [This change does not apply to 0.9.7.]
473
94fcd013
DSH
474 *) Use the cached encoding of an X509_NAME structure rather than
475 copying it. This is apparently the reason for the libsafe "errors"
476 but the code is actually correct.
477 [Steve Henson]
478
a9d2bc49 479 +) Disable stdin buffering in load_cert (apps/apps.c) so that no certs are
620cea37
BM
480 skipped when using openssl x509 multiple times on a single input file,
481 e.g. "(openssl x509 -out cert1; openssl x509 -out cert2) <certs".
482 [Bodo Moeller]
483
a9d2bc49 484 +) Make ASN1_UTCTIME_set_string() and ASN1_GENERALIZEDTIME_set_string()
ccb08f98
DSH
485 set string type: to handle setting ASN1_TIME structures. Fix ca
486 utility to correctly initialize revocation date of CRLs.
487 [Steve Henson]
488
a9d2bc49 489 +) New option SSL_OP_CIPHER_SERVER_PREFERENCE allows the server to override
836f9960
LJ
490 the clients preferred ciphersuites and rather use its own preferences.
491 Should help to work around M$ SGC (Server Gated Cryptography) bug in
492 Internet Explorer by ensuring unchanged hash method during stepup.
493 [Lutz Jaenicke]
494
a9d2bc49 495 +) Make mkdef.pl recognise all DECLARE_ASN1 macros, change rijndael
c47c6196
DSH
496 to aes and add a new 'exist' option to print out symbols that don't
497 appear to exist.
498 [Steve Henson]
499
a9d2bc49 500 +) Additional options to ocsp utility to allow flags to be set and
8c950429
DSH
501 additional certificates supplied.
502 [Steve Henson]
503
a9d2bc49 504 +) Add the option -VAfile to 'openssl ocsp', so the user can give the
9235adbf
RL
505 OCSP client a number of certificate to only verify the response
506 signature against.
507 [Richard Levitte]
508
57e7d3ce
UM
509 *) Add new function BN_rand_range(), and fix DSA_sign_setup() to prevent
510 Bleichenbacher's DSA attack.
f2bc6684
BM
511 Extend BN_[pseudo_]rand: As before, top=1 forces the highest two bits
512 to be set and top=0 forces the highest bit to be set; top=-1 is new
513 and leaves the highest bit random.
35ed8cb8 514 [Ulf Moeller, Bodo Moeller]
57e7d3ce 515
a9d2bc49 516 +) Update Rijndael code to version 3.0 and change EVP AES ciphers to
deb2c1a1
DSH
517 handle the new API. Currently only ECB, CBC modes supported. Add new
518 AES OIDs. Add TLS AES ciphersuites as described in the "AES Ciphersuites
519 for TLS" draft-ietf-tls-ciphersuite-03.txt.
520 [Ben Laurie, Steve Henson]
521
9eea2be6
BM
522 *) In the NCONF_...-based implementations for CONF_... queries
523 (crypto/conf/conf_lib.c), if the input LHASH is NULL, avoid using
524 a temporary CONF structure with the data component set to NULL
525 (which gives segmentation faults in lh_retrieve).
526 Instead, use NULL for the CONF pointer in CONF_get_string and
527 CONF_get_number (which may use environment variables) and directly
528 return NULL from CONF_get_section.
529 [Bodo Moeller]
530
741a9690
UM
531 *) Fix potential buffer overrun for EBCDIC.
532 [Ulf Moeller]
533
a9d2bc49 534 +) New function OCSP_copy_nonce() to copy nonce value (if present) from
26e083cc
DSH
535 request to response.
536 [Steve Henson]
537
a9d2bc49 538 +) Functions for OCSP responders. OCSP_request_onereq_count(),
02e4fbed
DSH
539 OCSP_request_onereq_get0(), OCSP_onereq_get0_id() and OCSP_id_get0_info()
540 extract information from a certificate request. OCSP_response_create()
541 creates a response and optionally adds a basic response structure.
542 OCSP_basic_add1_status() adds a complete single response to a basic
543 reponse and returns the OCSP_SINGLERESP structure just added (to allow
544 extensions to be included for example). OCSP_basic_add1_cert() adds a
545 certificate to a basic response and OCSP_basic_sign() signs a basic
546 response with various flags. New helper functions ASN1_TIME_check()
547 (checks validity of ASN1_TIME structure) and ASN1_TIME_to_generalizedtime()
548 (converts ASN1_TIME to GeneralizedTime).
549 [Steve Henson]
550
a9d2bc49 551 +) Various new functions. EVP_Digest() combines EVP_Digest{Init,Update,Final}()
88ce56f8
DSH
552 in a single operation. X509_get0_pubkey_bitstr() extracts the public_key
553 structure from a certificate. X509_pubkey_digest() digests tha public_key
554 contents: this is used in various key identifiers.
555 [Steve Henson]
556
8cff6331
DSH
557 *) Tolerate nonRepudiation as being valid for S/MIME signing and certSign
558 keyUsage if basicConstraints absent for a CA.
559 [Steve Henson]
560
903872d6
RL
561 *) Make SMIME_write_PKCS7() write mail header values with a format that
562 is more generally accepted (no spaces before the semicolon), since
563 some programs can't parse those values properly otherwise. Also make
564 sure BIO's that break lines after each write do not create invalid
565 headers.
566 [Richard Levitte]
567
a9d2bc49 568 +) Make sk_sort() tolerate a NULL argument.
b8470240
DSH
569 [Steve Henson reported by Massimiliano Pala <madwolf@comune.modena.it>]
570
a9d2bc49 571 +) New OCSP verify flag OCSP_TRUSTOTHER. When set the "other" certificates
50d51991
DSH
572 passed by the function are trusted implicitly. If any of them signed the
573 reponse then it is assumed to be valid and is not verified.
574 [Steve Henson]
575
a9d2bc49
BM
576 -) Make the CRL encoding routines work with empty SEQUENCE OF. The
577 macros previously used would not encode an empty SEQUENCE OF
578 and break the signature.
579 [Steve Henson]
580 [This change does not apply to 0.9.7.]
581
a342cc5a
DSH
582 *) Zero the premaster secret after deriving the master secret in
583 DH ciphersuites.
584 [Steve Henson]
585
a9d2bc49 586 +) In PKCS7_set_type() initialise content_type in PKCS7_ENC_CONTENT
a43cf9fa
DSH
587 to data. This was previously part of the PKCS7 ASN1 code. This
588 was causing problems with OpenSSL created PKCS#12 and PKCS#7 structures.
589 [Steve Henson, reported by Kenneth R. Robinette
590 <support@securenetterm.com>]
591
a9d2bc49 592 +) Add CRYPTO_push_info() and CRYPTO_pop_info() calls to new ASN1
a43cf9fa
DSH
593 routines: without these tracing memory leaks is very painful.
594 Fix leaks in PKCS12 and PKCS7 routines.
595 [Steve Henson]
596
ae0665b8 597 *) Add some EVP_add_digest_alias registrations (as found in
81a6c781 598 OpenSSL_add_all_digests()) to SSL_library_init()
ae0665b8
BM
599 aka OpenSSL_add_ssl_algorithms(). This provides improved
600 compatibility with peers using X.509 certificates
601 with unconventional AlgorithmIdentifier OIDs.
602 [Bodo Moeller]
603
81a6c781
BM
604 *) Fix for Irix with NO_ASM.
605 ["Bruce W. Forsberg" <bruce.forsberg@baesystems.com>]
606
893b76c5
UM
607 *) ./config script fixes.
608 [Ulf Moeller, Richard Levitte]
609
a9d2bc49 610 +) Make X509_time_adj() cope with the new behaviour of ASN1_TIME_new().
ba8e2824
DSH
611 Previously it initialised the 'type' argument to V_ASN1_UTCTIME which
612 effectively meant GeneralizedTime would never be used. Now it
613 is initialised to -1 but X509_time_adj() now has to check the value
614 and use ASN1_TIME_set() if the value is not V_ASN1_UTCTIME or
615 V_ASN1_GENERALIZEDTIME, without this it always uses GeneralizedTime.
616 [Steve Henson, reported by Kenneth R. Robinette
617 <support@securenetterm.com>]
618
a9d2bc49 619 +) Fixes to BN_to_ASN1_INTEGER when bn is zero. This would previously
8e8972bb
DSH
620 result in a zero length in the ASN1_INTEGER structure which was
621 not consistent with the structure when d2i_ASN1_INTEGER() was used
622 and would cause ASN1_INTEGER_cmp() to fail. Enhance s2i_ASN1_INTEGER()
623 to cope with hex and negative integers. Fix bug in i2a_ASN1_INTEGER()
624 where it did not print out a minus for negative ASN1_INTEGER.
625 [Steve Henson]
626
57108f0a
BM
627 *) Fix 'openssl passwd -1'.
628 [Bodo Moeller]
629
a9d2bc49 630 +) Add summary printout to ocsp utility. The various functions which
73758d43
DSH
631 convert status values to strings have been renamed to:
632 OCSP_response_status_str(), OCSP_cert_status_str() and
633 OCSP_crl_reason_str() and are no longer static. New options
634 to verify nonce values and to disable verification. OCSP response
635 printout format cleaned up.
636 [Steve Henson]
637
a9d2bc49 638 +) Add additional OCSP certificate checks. These are those specified
e8af92fc
DSH
639 in RFC2560. This consists of two separate checks: the CA of the
640 certificate being checked must either be the OCSP signer certificate
641 or the issuer of the OCSP signer certificate. In the latter case the
642 OCSP signer certificate must contain the OCSP signing extended key
643 usage. This check is performed by attempting to match the OCSP
644 signer or the OCSP signer CA to the issuerNameHash and issuerKeyHash
645 in the OCSP_CERTID structures of the response.
646 [Steve Henson]
647
a9d2bc49 648 +) Initial OCSP certificate verification added to OCSP_basic_verify()
81f169e9
DSH
649 and related routines. This uses the standard OpenSSL certificate
650 verify routines to perform initial checks (just CA validity) and
651 to obtain the certificate chain. Then additional checks will be
652 performed on the chain. Currently the root CA is checked to see
653 if it is explicitly trusted for OCSP signing. This is used to set
654 a root CA as a global signing root: that is any certificate that
655 chains to that CA is an acceptable OCSP signing certificate.
656 [Steve Henson]
657
a9d2bc49 658 +) New '-extfile ...' option to 'openssl ca' for reading X.509v3
dfebac32
BM
659 extensions from a separate configuration file.
660 As when reading extensions from the main configuration file,
661 the '-extensions ...' option may be used for specifying the
662 section to use.
663 [Massimiliano Pala <madwolf@comune.modena.it>]
664
6308af19
DSH
665 *) Change PKCS12_key_gen_asc() so it can cope with non null
666 terminated strings whose length is passed in the passlen
667 parameter, for example from PEM callbacks. This was done
668 by adding an extra length parameter to asc2uni().
669 [Steve Henson, reported by <oddissey@samsung.co.kr>]
670
a9d2bc49 671 +) New OCSP utility. Allows OCSP requests to be generated or
5782ceb2
DSH
672 read. The request can be sent to a responder and the output
673 parsed, outputed or printed in text form. Not complete yet:
674 still needs to check the OCSP response validity.
675 [Steve Henson]
676
a9d2bc49 677 +) New subcommands for 'openssl ca':
c67cdb50
BM
678 'openssl ca -status <serial>' prints the status of the cert with
679 the given serial number (according to the index file).
680 'openssl ca -updatedb' updates the expiry status of certificates
681 in the index file.
682 [Massimiliano Pala <madwolf@comune.modena.it>]
683
a9d2bc49 684 +) New '-newreq-nodes' command option to CA.pl. This is like
d199858e
BM
685 '-newreq', but calls 'openssl req' with the '-nodes' option
686 so that the resulting key is not encrypted.
687 [Damien Miller <djm@mindrot.org>]
688
a9d2bc49 689 +) New configuration for the GNU Hurd.
10a2975a
RL
690 [Jonathan Bartlett <johnnyb@wolfram.com> via Richard Levitte]
691
a9d2bc49 692 +) Initial code to implement OCSP basic response verify. This
9b4dc830
DSH
693 is currently incomplete. Currently just finds the signer's
694 certificate and verifies the signature on the response.
695 [Steve Henson]
696
a9d2bc49 697 +) New SSLeay_version code SSLEAY_DIR to determine the compiled-in
673b3fde
BM
698 value of OPENSSLDIR. This is available via the new '-d' option
699 to 'openssl version', and is also included in 'openssl version -a'.
700 [Bodo Moeller]
701
c06648f7
BM
702 *) Fix C code generated by 'openssl dsaparam -C': If a BN_bin2bn
703 call failed, free the DSA structure.
704 [Bodo Moeller]
705
a9d2bc49 706 +) Allowing defining memory allocation callbacks that will be given
a5435e8b
BM
707 file name and line number information in additional arguments
708 (a const char* and an int). The basic functionality remains, as
709 well as the original possibility to just replace malloc(),
710 realloc() and free() by functions that do not know about these
711 additional arguments. To register and find out the current
712 settings for extended allocation functions, the following
713 functions are provided:
65a22e8e
RL
714
715 CRYPTO_set_mem_ex_functions
716 CRYPTO_set_locked_mem_ex_functions
717 CRYPTO_get_mem_ex_functions
718 CRYPTO_get_locked_mem_ex_functions
719
a5435e8b
BM
720 These work the same way as CRYPTO_set_mem_functions and friends.
721 CRYPTO_get_[locked_]mem_functions now writes 0 where such an
722 extended allocation function is enabled.
723 Similarly, CRYPTO_get_[locked_]mem_ex_functions writes 0 where
724 a conventional allocation function is enabled.
725 [Richard Levitte, Bodo Moeller]
65a22e8e 726
cbf0f45f
DSH
727 *) Fix to uni2asc() to cope with zero length Unicode strings.
728 These are present in some PKCS#12 files.
729 [Steve Henson]
730
a9d2bc49 731 +) Finish off removing the remaining LHASH function pointer casts.
3c914840 732 There should no longer be any prototype-casting required when using
56a67adb
GT
733 the LHASH abstraction, and any casts that remain are "bugs". See
734 the callback types and macros at the head of lhash.h for details
735 (and "OBJ_cleanup" in crypto/objects/obj_dat.c as an example).
3c914840
GT
736 [Geoff Thorpe]
737
a9d2bc49 738 +) Add automatic query of EGD sockets in RAND_poll() for the unix variant.
599c0353
LJ
739 If an EGD or PRNGD is running and enough entropy is returned, automatic
740 seeding like with /dev/[u]random will be performed.
741 Positions tried are: /etc/entropy, /var/run/egd-pool.
742 [Lutz Jaenicke]
743
a9d2bc49 744 +) Change the Unix RAND_poll() variant to be able to poll several
361ef5f4
RL
745 random devices, as specified by DEVRANDOM, until a sufficient amount
746 of data has been collected. We spend at most 10 ms on each file
747 (select timeout) and read in non-blocking mode. DEVRANDOM now
748 defaults to the list "/dev/urandom", "/dev/random", "/dev/srandom"
749 (previously it was just the string "/dev/urandom"), so on typical
750 platforms the 10 ms delay will never occur.
751 Also separate out the Unix variant to its own file, rand_unix.c.
752 For VMS, there's a currently-empty rand_vms.c.
0c61e299
RL
753 [Richard Levitte]
754
a9d2bc49 755 +) Move OCSP client related routines to ocsp_cl.c. These
0b33bc65
DSH
756 provide utility functions which an application needing
757 to issue a request to an OCSP responder and analyse the
758 response will typically need: as opposed to those which an
759 OCSP responder itself would need which will be added later.
760
761 OCSP_request_sign() signs an OCSP request with an API similar
762 to PKCS7_sign(). OCSP_response_status() returns status of OCSP
763 response. OCSP_response_get1_basic() extracts basic response
764 from response. OCSP_resp_find_status(): finds and extracts status
765 information from an OCSP_CERTID structure (which will be created
766 when the request structure is built). These are built from lower
767 level functions which work on OCSP_SINGLERESP structures but
768 wont normally be used unless the application wishes to examine
769 extensions in the OCSP response for example.
770
771 Replace nonce routines with a pair of functions.
772 OCSP_request_add1_nonce() adds a nonce value and optionally
773 generates a random value. OCSP_check_nonce() checks the
774 validity of the nonce in an OCSP response.
775 [Steve Henson]
776
a9d2bc49 777 +) Change function OCSP_request_add() to OCSP_request_add0_id().
8e961835
DSH
778 This doesn't copy the supplied OCSP_CERTID and avoids the
779 need to free up the newly created id. Change return type
780 to OCSP_ONEREQ to return the internal OCSP_ONEREQ structure.
781 This can then be used to add extensions to the request.
782 Deleted OCSP_request_new(), since most of its functionality
783 is now in OCSP_REQUEST_new() (and the case insensitive name
784 clash) apart from the ability to set the request name which
785 will be added elsewhere.
786 [Steve Henson]
787
a9d2bc49 788 +) Update OCSP API. Remove obsolete extensions argument from
bf0d176e
DSH
789 various functions. Extensions are now handled using the new
790 OCSP extension code. New simple OCSP HTTP function which
791 can be used to send requests and parse the response.
792 [Steve Henson]
793
a9d2bc49 794 +) Fix the PKCS#7 (S/MIME) code to work with new ASN1. Two new
ec5add87
DSH
795 ASN1_ITEM structures help with sign and verify. PKCS7_ATTR_SIGN
796 uses the special reorder version of SET OF to sort the attributes
797 and reorder them to match the encoded order. This resolves a long
798 standing problem: a verify on a PKCS7 structure just after signing
799 it used to fail because the attribute order did not match the
800 encoded order. PKCS7_ATTR_VERIFY does not reorder the attributes:
801 it uses the received order. This is necessary to tolerate some broken
802 software that does not order SET OF. This is handled by encoding
803 as a SEQUENCE OF but using implicit tagging (with UNIVERSAL class)
804 to produce the required SET OF.
805 [Steve Henson]
806
a9d2bc49 807 +) Have mk1mf.pl generate the macros OPENSSL_BUILD_SHLIBCRYPTO and
a6574c21
RL
808 OPENSSL_BUILD_SHLIBSSL and use them appropriately in the header
809 files to get correct declarations of the ASN.1 item variables.
810 [Richard Levitte]
811
a9d2bc49 812 +) Rewrite of PKCS#12 code to use new ASN1 functionality. Replace many
ecbe0781
DSH
813 PKCS#12 macros with real functions. Fix two unrelated ASN1 bugs:
814 asn1_check_tlen() would sometimes attempt to use 'ctx' when it was
815 NULL and ASN1_TYPE was not dereferenced properly in asn1_ex_c2i().
816 New ASN1 macro: DECLARE_ASN1_ITEM() which just declares the relevant
817 ASN1_ITEM and no wrapper functions.
818 [Steve Henson]
819
a9d2bc49 820 +) New functions or ASN1_item_d2i_fp() and ASN1_item_d2i_bio(). These
4e1209eb
DSH
821 replace the old function pointer based I/O routines. Change most of
822 the *_d2i_bio() and *_d2i_fp() functions to use these.
823 [Steve Henson]
824
a9d2bc49 825 +) Enhance mkdef.pl to be more accepting about spacing in C preprocessor
3f07fe09
RL
826 lines, recognice more "algorithms" that can be deselected, and make
827 it complain about algorithm deselection that isn't recognised.
828 [Richard Levitte]
829
a9d2bc49 830 +) New ASN1 functions to handle dup, sign, verify, digest, pack and
73e92de5
DSH
831 unpack operations in terms of ASN1_ITEM. Modify existing wrappers
832 to use new functions. Add NO_ASN1_OLD which can be set to remove
833 some old style ASN1 functions: this can be used to determine if old
834 code will still work when these eventually go away.
09ab755c
DSH
835 [Steve Henson]
836
a9d2bc49 837 +) New extension functions for OCSP structures, these follow the
ec558b65
DSH
838 same conventions as certificates and CRLs.
839 [Steve Henson]
840
a9d2bc49 841 +) New function X509V3_add1_i2d(). This automatically encodes and
57d2f217
DSH
842 adds an extension. Its behaviour can be customised with various
843 flags to append, replace or delete. Various wrappers added for
844 certifcates and CRLs.
845 [Steve Henson]
846
a9d2bc49 847 +) Fix to avoid calling the underlying ASN1 print routine when
5755cab4
DSH
848 an extension cannot be parsed. Correct a typo in the
849 OCSP_SERVICELOC extension. Tidy up print OCSP format.
850 [Steve Henson]
851
3880cd35
BM
852 *) Increase s2->wbuf allocation by one byte in ssl2_new (ssl/s2_lib.c).
853 Otherwise do_ssl_write (ssl/s2_pkt.c) will write beyond buffer limits
854 when writing a 32767 byte record.
855 [Bodo Moeller; problem reported by Eric Day <eday@concentric.net>]
856
f640ee90 857 *) In RSA_eay_public_{en,ed}crypt and RSA_eay_mod_exp (rsa_eay.c),
126fe085 858 obtain lock CRYPTO_LOCK_RSA before setting rsa->_method_mod_{n,p,q}.
f640ee90
BM
859
860 (RSA objects have a reference count access to which is protected
861 by CRYPTO_LOCK_RSA [see rsa_lib.c, s3_srvr.c, ssl_cert.c, ssl_rsa.c],
862 so they are meant to be shared between threads.)
126fe085
BM
863 [Bodo Moeller, Geoff Thorpe; original patch submitted by
864 "Reddie, Steven" <Steven.Reddie@ca.com>]
f640ee90 865
a9d2bc49 866 +) Make mkdef.pl parse some of the ASN1 macros and add apropriate
9c67ab2f 867 entries for variables.
5755cab4 868 [Steve Henson]
9c67ab2f 869
1456d186
BM
870 *) Fix a deadlock in CRYPTO_mem_leaks().
871 [Bodo Moeller]
872
a9d2bc49 873 +) Add functionality to apps/openssl.c for detecting locking
3ac82faa
BM
874 problems: As the program is single-threaded, all we have
875 to do is register a locking callback using an array for
876 storing which locks are currently held by the program.
3ac82faa
BM
877 [Bodo Moeller]
878
a9d2bc49 879 +) Use a lock around the call to CRYPTO_get_ex_new_index() in
3ac82faa
BM
880 SSL_get_ex_data_X509_STORE_idx(), which is used in
881 ssl_verify_cert_chain() and thus can be called at any time
882 during TLS/SSL handshakes so that thread-safety is essential.
883 Unfortunately, the ex_data design is not at all suited
884 for multi-threaded use, so it probably should be abolished.
885 [Bodo Moeller]
886
a9d2bc49 887 +) Added Broadcom "ubsec" ENGINE to OpenSSL.
2a86064f
GT
888 [Broadcom, tweaked and integrated by Geoff Thorpe]
889
a9d2bc49 890 +) Move common extension printing code to new function
2c15d426 891 X509V3_print_extensions(). Reorganise OCSP print routines and
c08523d8 892 implement some needed OCSP ASN1 functions. Add OCSP extensions.
2c15d426
DSH
893 [Steve Henson]
894
a9d2bc49 895 +) New function X509_signature_print() to remove duplication in some
de487514
DSH
896 print routines.
897 [Steve Henson]
898
a9d2bc49 899 +) Add a special meaning when SET OF and SEQUENCE OF flags are both
06db4253
DSH
900 set (this was treated exactly the same as SET OF previously). This
901 is used to reorder the STACK representing the structure to match the
902 encoding. This will be used to get round a problem where a PKCS7
903 structure which was signed could not be verified because the STACK
904 order did not reflect the encoded order.
905 [Steve Henson]
906
a9d2bc49 907 +) Reimplement the OCSP ASN1 module using the new code.
36f554d4
DSH
908 [Steve Henson]
909
a9d2bc49 910 +) Update the X509V3 code to permit the use of an ASN1_ITEM structure
2aff7727
DSH
911 for its ASN1 operations. The old style function pointers still exist
912 for now but they will eventually go away.
913 [Steve Henson]
914
a9d2bc49 915 +) Merge in replacement ASN1 code from the ASN1 branch. This almost
5755cab4
DSH
916 completely replaces the old ASN1 functionality with a table driven
917 encoder and decoder which interprets an ASN1_ITEM structure describing
918 the ASN1 module. Compatibility with the existing ASN1 API (i2d,d2i) is
919 largely maintained. Almost all of the old asn1_mac.h macro based ASN1
920 has also been converted to the new form.
9d6b1ce6
DSH
921 [Steve Henson]
922
a9d2bc49 923 +) Change BN_mod_exp_recp so that negative moduli are tolerated
8dea52fa
BM
924 (the sign is ignored). Similarly, ignore the sign in BN_MONT_CTX_set
925 so that BN_mod_exp_mont and BN_mod_exp_mont_word work
926 for negative moduli.
927 [Bodo Moeller]
928
a9d2bc49 929 +) Fix BN_uadd and BN_usub: Always return non-negative results instead
8dea52fa
BM
930 of not touching the result's sign bit.
931 [Bodo Moeller]
932
a9d2bc49 933 +) BN_div bugfix: If the result is 0, the sign (res->neg) must not be
80d89e6a
BM
934 set.
935 [Bodo Moeller]
936
a9d2bc49 937 +) Changed the LHASH code to use prototypes for callbacks, and created
f1919c3d
GT
938 macros to declare and implement thin (optionally static) functions
939 that provide type-safety and avoid function pointer casting for the
940 type-specific callbacks.
941 [Geoff Thorpe]
942
1946cd8b
UM
943 *) Use better test patterns in bntest.
944