]> git.ipfire.org Git - thirdparty/openssl.git/blame - CHANGES
Bug fixes.
[thirdparty/openssl.git] / CHANGES
CommitLineData
f1c236f8 1 OpenSSL CHANGES
651d0aff
RE
2 _______________
3
c5e8580e 4 Changes between 0.9.6 and 0.9.7 [xx XXX 2000]
a43cf9fa 5
c1081080
BM
6 *) Implement ssl23_peek (analogous to ssl23_read), which previously
7 did not exist.
8 [Bodo Moeller]
9
bb62a8b0
BM
10 *) Replace rdtsc with _emit statements for VC++ version 5.
11 [Jeremy Cooper <jeremy@baymoo.org>]
bd9e2e4c 12
c62b26fd
BM
13 *) Hide BN_CTX structure details in bn_lcl.h instead of publishing them
14 in <openssl/bn.h>. Also further increase BN_CTX_NUM to 24.
15 [Bodo Moeller]
16
2dc769a1
DSH
17 *) Modify EVP_Digest*() routines so they now return values. Although the
18 internal software routines can never fail additional hardware versions
19 might.
20 [Steve Henson]
21
5277d7cb
BM
22 *) Clean up crypto/err/err.h and change some error codes to avoid conflicts:
23
24 Previously ERR_R_FATAL was too small and coincided with ERR_LIB_PKCS7
25 (= ERR_R_PKCS7_LIB); it is now 64 instead of 32.
26
27 ASN1 error codes
28 ERR_R_NESTED_ASN1_ERROR
29 ...
30 ERR_R_MISSING_ASN1_EOS
31 were 4 .. 9, conflicting with
32 ERR_LIB_RSA (= ERR_R_RSA_LIB)
33 ...
34 ERR_LIB_PEM (= ERR_R_PEM_LIB).
35 They are now 58 .. 63 (i.e., just below ERR_R_FATAL).
36
37 Add new error code 'ERR_R_INTERNAL_ERROR'.
38 [Bodo Moeller]
39
40 *) Don't overuse locks in crypto/err/err.c: For data retrieval, CRYPTO_r_lock
41 suffices.
42 [Bodo Moeller]
43
bad40585
BM
44 *) New option '-subj arg' for 'openssl req' and 'openssl ca'. This
45 sets the subject name for a new request or supersedes the
46 subject name in a given request. Formats that can be parsed are
47 'CN=Some Name, OU=myOU, C=IT'
48 and
49 'CN=Some Name/OU=myOU/C=IT'.
50
51 Add options '-batch' and '-verbose' to 'openssl req'.
52 [Massimiliano Pala <madwolf@hackmasters.net>]
53
757a8b46
RL
54 *) Make it possible to reuse SSLv2 sessions.
55 [Richard Levitte]
56
62dc5aad
RL
57 *) Introduce the possibility to access global variables through
58 functions on platform were that's the best way to handle exporting
59 global variables in shared libraries. To enable this functionality,
60 one must configure with "EXPORT_VAR_AS_FN" or defined the C macro
61 "OPENSSL_EXPORT_VAR_AS_FUNCTION" in crypto/opensslconf.h (the latter
62 is normally done by Configure or something similar).
63
64 To implement a global variable, use the macro OPENSSL_IMPLEMENT_GLOBAL
65 in the source file (foo.c) like this:
66
67 OPENSSL_IMPLEMENT_GLOBAL(int,foo)=1;
68 OPENSSL_IMPLEMENT_GLOBAL(double,bar);
69
70 To declare a global variable, use the macros OPENSSL_DECLARE_GLOBAL
71 and OPENSSL_GLOBAL_REF in the header file (foo.h) like this:
72
73 OPENSSL_DECLARE_GLOBAL(int,foo);
74 #define foo OPENSSL_GLOBAL_REF(foo)
75 OPENSSL_DECLARE_GLOBAL(double,bar);
76 #define bar OPENSSL_GLOBAL_REF(bar)
77
78 The #defines are very important, and therefore so is including the
79 header file everywere where the defined globals are used.
80
81 The macro OPENSSL_EXPORT_VAR_AS_FUNCTION also affects the definition
82 of ASN.1 items, but that structure is a bt different.
83
84 The largest change is in util/mkdef.pl which has been enhanced with
85 better and easier to understand logic to choose which symbols should
86 go into the Windows .def files as well as a number of fixes and code
87 cleanup (among others, algorithm keywords are now sorted
88 lexicographically to avoid constant rewrites).
89 [Richard Levitte]
90
f23478c3
DSH
91 *) In copy_email() check for >= 0 as a return value for
92 X509_NAME_get_index_by_NID() since 0 is a valid index.
93 [Steve Henson reported by Massimiliano Pala <madwolf@opensca.org>]
94
3d2e469c
DSH
95 *) In BN_div() keep a copy of the sign of 'num' before writing the
96 result to 'rm' because if rm==num the value will be overwritten
97 and produce the wrong result if 'num' is negative: this caused
98 problems with BN_mod() and BN_nnmod().
99 [Steve Henson]
100
fafc7f98
DSH
101 *) Function OCSP_request_verify(). This checks the signature on an
102 OCSP request and verifies the signer certificate. The signer
103 certificate is just checked for a generic purpose and OCSP request
104 trust settings.
105 [Steve Henson]
106
f1965221
DSH
107 *) Add OCSP_check_validity() function to check the validity of OCSP
108 responses. OCSP responses are prepared in real time and may only
109 be a few seconds old. Simply checking that the current time lies
110 between thisUpdate and nextUpdate max reject otherwise valid responses
111 caused by either OCSP responder or client clock innacuracy. Instead
112 we allow thisUpdate and nextUpdate to fall within a certain period of
113 the current time. The age of the response can also optionally be
114 checked. Two new options -validity_period and -status_age added to
115 ocsp utility.
116 [Steve Henson]
117
4ff18c8c
DSH
118 *) If signature or public key algorithm is unrecognized print out its
119 OID rather that just UNKOWN.
120 [Steve Henson]
121
db4a4659
DSH
122 *) Avoid coredump with unsupported or invalid public keys by checking if
123 X509_get_pubkey() fails in PKCS7_verify(). Fix memory leak when
124 PKCS7_verify() fails with non detached data.
125 [Steve Henson]
126
d7c06e9e
DSH
127 *) Change OCSP_cert_to_id() to tolerate a NULL subject certificate and
128 OCSP_cert_id_new() a NULL serialNumber. This allows a partial certificate
129 ID to be generated from the issuer certificate alone which can then be
130 passed to OCSP_id_issuer_cmp().
131 [Steve Henson]
132
386828d0
DSH
133 *) New compilation option ASN1_ITEM_FUNCTIONS. This causes the new
134 ASN1 modules to export functions returning ASN1_ITEM pointers
135 instead of the ASN1_ITEM structures themselves. This adds several
136 new macros which allow the underlying ASN1 function/structure to
137 be accessed transparently. As a result code should not use ASN1_ITEM
138 references directly (such as &X509_it) but instead use the relevant
139 macros (such as ASN1_ITEM_rptr(X509)). This option is to allow
140 use of the new ASN1 code on platforms where exporting structures
141 is problematical (for example in shared libraries) but exporting
142 functions returning pointers to structures is not.
143 [Steve Henson]
144
fa2b8db4
GT
145 *) Add support for overriding the generation of SSL/TLS session IDs.
146 These callbacks can be registered either in an SSL_CTX or per SSL.
147 The purpose of this is to allow applications to control, if they wish,
148 the arbitrary values chosen for use as session IDs, particularly as it
149 can be useful for session caching in multiple-server environments. A
150 command-line switch for testing this (and any client code that wishes
151 to use such a feature) has been added to "s_server".
152 [Geoff Thorpe, Lutz Jaenicke]
153
d399fdf8
RL
154 *) Modify mkdef.pl to recognise and parse prprocessor conditionals
155 of the form '#if defined(...) || defined(...) || ...' and
156 '#if !defined(...) && !defined(...) && ...'. This also avoids
157 the growing number of special cases it was previously handling.
158 [Richard Levitte]
159
5003a61b
UM
160 *) Don't use getenv in library functions when run as setuid/setgid.
161 New function OPENSSL_issetugid().
162 [Ulf Moeller]
163
cf1b7d96
RL
164 *) Make all configuration macros available for application by making
165 sure they are available in opensslconf.h, by giving them names starting
166 with "OPENSSL_" to avoid conflicts with other packages and by making
167 sure e_os2.h will cover all platform-specific cases together with
168 opensslconf.h.
2affbab9
RL
169 Additionally, it is now possible to define configuration/platform-
170 specific names (called "system identities"). In the C code, these
171 are prefixed with "OPENSSL_SYSNAME_". e_os2.h will create another
172 macro with the name beginning with "OPENSSL_SYS_", which is determined
173 from "OPENSSL_SYSNAME_*" or compiler-specific macros depending on
174 what is available.
cf1b7d96
RL
175 [Richard Levitte]
176
acba75c5
DSH
177 *) New option -set_serial to 'req' and 'x509' this allows the serial
178 number to use to be specified on the command line. Previously self
179 signed certificates were hard coded with serial number 0 and the
180 CA options of 'x509' had to use a serial number in a file which was
181 auto incremented.
182 [Steve Henson]
183
934397ec
BM
184 *) Avoid false positives in memory leak detection code (crypto/mem_dbg.c)
185 due to incorrect handling of multi-threading:
186
187 1. Fix timing glitch in the MemCheck_off() portion of CRYPTO_mem_ctrl().
188
189 2. Fix logical glitch in is_MemCheck_on() aka CRYPTO_is_mem_check_on().
190
191 3. Count how many times MemCheck_off() has been called so that
192 nested use can be treated correctly. This also avoids
193 inband-signalling in the previous code (which relied on the
194 assumption that thread ID 0 is impossible).
195 [Bodo Moeller]
196
a6b7ffdd
DSH
197 *) New options to 'ca' utility to support V2 CRL entry extensions.
198 Currently CRL reason, invalidity date and hold instruction are
199 supported. Add new CRL extensions to V3 code and some new objects.
200 [Steve Henson]
201
f30d34f3
LJ
202 *) Add "-rand" option also to s_client and s_server.
203 [Lutz Jaenicke]
204
f2e5ca84
DSH
205 *) New function EVP_CIPHER_CTX_set_padding() this is used to
206 disable standard block padding (aka PKCS#5 padding) in the EVP
207 API, which was previously mandatory. This means that the data is
208 not padded in any way and so the total length much be a multiple
209 of the block size, otherwise an error occurs.
210 [Steve Henson]
211
cdc7b8cc
DSH
212 *) Initial (incomplete) OCSP SSL support.
213 [Steve Henson]
214
720235ee
UM
215 *) Fix CPU detection on Irix 6.x.
216 [Kurt Hockenbury <khockenb@stevens-tech.edu> and
217 "Bruce W. Forsberg" <bruce.forsberg@baesystems.com>]
218
67c18019
DSH
219 *) New function OCSP_parse_url(). This splits up a URL into its host,
220 port and path components: primarily to parse OCSP URLs. New -url
221 option to ocsp utility.
222 [Steve Henson]
223
46a58ab9
DSH
224 *) New nonce behavior. The return value of OCSP_check_nonce() now
225 reflects the various checks performed. Applications can decide
226 whether to tolerate certain situations such as an absent nonce
227 in a response when one was present in a request: the ocsp application
228 just prints out a warning. New function OCSP_add1_basic_nonce()
229 this is to allow responders to include a nonce in a response even if
230 the request is nonce-less.
231 [Steve Henson]
232
94fcd013
DSH
233 *) Use the cached encoding of an X509_NAME structure rather than
234 copying it. This is apparently the reason for the libsafe "errors"
235 but the code is actually correct.
236 [Steve Henson]
237
620cea37
BM
238 *) Disable stdin buffering in load_cert (apps/apps.c) so that no certs are
239 skipped when using openssl x509 multiple times on a single input file,
240 e.g. "(openssl x509 -out cert1; openssl x509 -out cert2) <certs".
241 [Bodo Moeller]
242
ccb08f98
DSH
243 *) Make ASN1_UTCTIME_set_string() and ASN1_GENERALIZEDTIME_set_string()
244 set string type: to handle setting ASN1_TIME structures. Fix ca
245 utility to correctly initialize revocation date of CRLs.
246 [Steve Henson]
247
836f9960
LJ
248 *) New option SSL_OP_CIPHER_SERVER_PREFERENCE allows the server to override
249 the clients preferred ciphersuites and rather use its own preferences.
250 Should help to work around M$ SGC (Server Gated Cryptography) bug in
251 Internet Explorer by ensuring unchanged hash method during stepup.
252 [Lutz Jaenicke]
253
c47c6196
DSH
254 *) Make mkdef.pl recognise all DECLARE_ASN1 macros, change rijndael
255 to aes and add a new 'exist' option to print out symbols that don't
256 appear to exist.
257 [Steve Henson]
258
8c950429
DSH
259 *) Additional options to ocsp utility to allow flags to be set and
260 additional certificates supplied.
261 [Steve Henson]
262
9235adbf
RL
263 *) Add the option -VAfile to 'openssl ocsp', so the user can give the
264 OCSP client a number of certificate to only verify the response
265 signature against.
266 [Richard Levitte]
267
57e7d3ce
UM
268 *) Add new function BN_rand_range(), and fix DSA_sign_setup() to prevent
269 Bleichenbacher's DSA attack.
f2bc6684
BM
270 Extend BN_[pseudo_]rand: As before, top=1 forces the highest two bits
271 to be set and top=0 forces the highest bit to be set; top=-1 is new
272 and leaves the highest bit random.
35ed8cb8 273 [Ulf Moeller, Bodo Moeller]
57e7d3ce 274
deb2c1a1
DSH
275 *) Update Rijndael code to version 3.0 and change EVP AES ciphers to
276 handle the new API. Currently only ECB, CBC modes supported. Add new
277 AES OIDs. Add TLS AES ciphersuites as described in the "AES Ciphersuites
278 for TLS" draft-ietf-tls-ciphersuite-03.txt.
279 [Ben Laurie, Steve Henson]
280
9eea2be6
BM
281 *) In the NCONF_...-based implementations for CONF_... queries
282 (crypto/conf/conf_lib.c), if the input LHASH is NULL, avoid using
283 a temporary CONF structure with the data component set to NULL
284 (which gives segmentation faults in lh_retrieve).
285 Instead, use NULL for the CONF pointer in CONF_get_string and
286 CONF_get_number (which may use environment variables) and directly
287 return NULL from CONF_get_section.
288 [Bodo Moeller]
289
741a9690
UM
290 *) Fix potential buffer overrun for EBCDIC.
291 [Ulf Moeller]
292
26e083cc
DSH
293 *) New function OCSP_copy_nonce() to copy nonce value (if present) from
294 request to response.
295 [Steve Henson]
296
02e4fbed
DSH
297 *) Functions for OCSP responders. OCSP_request_onereq_count(),
298 OCSP_request_onereq_get0(), OCSP_onereq_get0_id() and OCSP_id_get0_info()
299 extract information from a certificate request. OCSP_response_create()
300 creates a response and optionally adds a basic response structure.
301 OCSP_basic_add1_status() adds a complete single response to a basic
302 reponse and returns the OCSP_SINGLERESP structure just added (to allow
303 extensions to be included for example). OCSP_basic_add1_cert() adds a
304 certificate to a basic response and OCSP_basic_sign() signs a basic
305 response with various flags. New helper functions ASN1_TIME_check()
306 (checks validity of ASN1_TIME structure) and ASN1_TIME_to_generalizedtime()
307 (converts ASN1_TIME to GeneralizedTime).
308 [Steve Henson]
309
88ce56f8
DSH
310 *) Various new functions. EVP_Digest() combines EVP_Digest{Init,Update,Final}()
311 in a single operation. X509_get0_pubkey_bitstr() extracts the public_key
312 structure from a certificate. X509_pubkey_digest() digests tha public_key
313 contents: this is used in various key identifiers.
314 [Steve Henson]
315
8cff6331
DSH
316 *) Tolerate nonRepudiation as being valid for S/MIME signing and certSign
317 keyUsage if basicConstraints absent for a CA.
318 [Steve Henson]
319
903872d6
RL
320 *) Make SMIME_write_PKCS7() write mail header values with a format that
321 is more generally accepted (no spaces before the semicolon), since
322 some programs can't parse those values properly otherwise. Also make
323 sure BIO's that break lines after each write do not create invalid
324 headers.
325 [Richard Levitte]
326
b8470240
DSH
327 *) Make sk_sort() tolerate a NULL argument.
328 [Steve Henson reported by Massimiliano Pala <madwolf@comune.modena.it>]
329
50d51991
DSH
330 *) New OCSP verify flag OCSP_TRUSTOTHER. When set the "other" certificates
331 passed by the function are trusted implicitly. If any of them signed the
332 reponse then it is assumed to be valid and is not verified.
333 [Steve Henson]
334
a342cc5a
DSH
335 *) Zero the premaster secret after deriving the master secret in
336 DH ciphersuites.
337 [Steve Henson]
338
a43cf9fa
DSH
339 *) In PKCS7_set_type() initialise content_type in PKCS7_ENC_CONTENT
340 to data. This was previously part of the PKCS7 ASN1 code. This
341 was causing problems with OpenSSL created PKCS#12 and PKCS#7 structures.
342 [Steve Henson, reported by Kenneth R. Robinette
343 <support@securenetterm.com>]
344
345 *) Add CRYPTO_push_info() and CRYPTO_pop_info() calls to new ASN1
346 routines: without these tracing memory leaks is very painful.
347 Fix leaks in PKCS12 and PKCS7 routines.
348 [Steve Henson]
349
75802000
UM
350 *) Fix for Irix with NO_ASM.
351 ["Bruce W. Forsberg" <bruce.forsberg@baesystems.com>]
352
ae0665b8
BM
353 *) Add some EVP_add_digest_alias registrations (as found in
354 OpenSSL_add_all_digests()), to SSL_library_init()
355 aka OpenSSL_add_ssl_algorithms(). This provides improved
356 compatibility with peers using X.509 certificates
357 with unconventional AlgorithmIdentifier OIDs.
358 [Bodo Moeller]
359
893b76c5
UM
360 *) ./config script fixes.
361 [Ulf Moeller, Richard Levitte]
362
ba8e2824
DSH
363 *) Make X509_time_adj() cope with the new behaviour of ASN1_TIME_new().
364 Previously it initialised the 'type' argument to V_ASN1_UTCTIME which
365 effectively meant GeneralizedTime would never be used. Now it
366 is initialised to -1 but X509_time_adj() now has to check the value
367 and use ASN1_TIME_set() if the value is not V_ASN1_UTCTIME or
368 V_ASN1_GENERALIZEDTIME, without this it always uses GeneralizedTime.
369 [Steve Henson, reported by Kenneth R. Robinette
370 <support@securenetterm.com>]
371
8e8972bb
DSH
372 *) Fixes to BN_to_ASN1_INTEGER when bn is zero. This would previously
373 result in a zero length in the ASN1_INTEGER structure which was
374 not consistent with the structure when d2i_ASN1_INTEGER() was used
375 and would cause ASN1_INTEGER_cmp() to fail. Enhance s2i_ASN1_INTEGER()
376 to cope with hex and negative integers. Fix bug in i2a_ASN1_INTEGER()
377 where it did not print out a minus for negative ASN1_INTEGER.
378 [Steve Henson]
379
57108f0a
BM
380 *) Fix 'openssl passwd -1'.
381 [Bodo Moeller]
382
73758d43
DSH
383 *) Add summary printout to ocsp utility. The various functions which
384 convert status values to strings have been renamed to:
385 OCSP_response_status_str(), OCSP_cert_status_str() and
386 OCSP_crl_reason_str() and are no longer static. New options
387 to verify nonce values and to disable verification. OCSP response
388 printout format cleaned up.
389 [Steve Henson]
390
e8af92fc
DSH
391 *) Add additional OCSP certificate checks. These are those specified
392 in RFC2560. This consists of two separate checks: the CA of the
393 certificate being checked must either be the OCSP signer certificate
394 or the issuer of the OCSP signer certificate. In the latter case the
395 OCSP signer certificate must contain the OCSP signing extended key
396 usage. This check is performed by attempting to match the OCSP
397 signer or the OCSP signer CA to the issuerNameHash and issuerKeyHash
398 in the OCSP_CERTID structures of the response.
399 [Steve Henson]
400
81f169e9
DSH
401 *) Initial OCSP certificate verification added to OCSP_basic_verify()
402 and related routines. This uses the standard OpenSSL certificate
403 verify routines to perform initial checks (just CA validity) and
404 to obtain the certificate chain. Then additional checks will be
405 performed on the chain. Currently the root CA is checked to see
406 if it is explicitly trusted for OCSP signing. This is used to set
407 a root CA as a global signing root: that is any certificate that
408 chains to that CA is an acceptable OCSP signing certificate.
409 [Steve Henson]
410
dfebac32
BM
411 *) New '-extfile ...' option to 'openssl ca' for reading X.509v3
412 extensions from a separate configuration file.
413 As when reading extensions from the main configuration file,
414 the '-extensions ...' option may be used for specifying the
415 section to use.
416 [Massimiliano Pala <madwolf@comune.modena.it>]
417
6308af19
DSH
418 *) Change PKCS12_key_gen_asc() so it can cope with non null
419 terminated strings whose length is passed in the passlen
420 parameter, for example from PEM callbacks. This was done
421 by adding an extra length parameter to asc2uni().
422 [Steve Henson, reported by <oddissey@samsung.co.kr>]
423
5782ceb2
DSH
424 *) New OCSP utility. Allows OCSP requests to be generated or
425 read. The request can be sent to a responder and the output
426 parsed, outputed or printed in text form. Not complete yet:
427 still needs to check the OCSP response validity.
428 [Steve Henson]
429
c67cdb50
BM
430 *) New subcommands for 'openssl ca':
431 'openssl ca -status <serial>' prints the status of the cert with
432 the given serial number (according to the index file).
433 'openssl ca -updatedb' updates the expiry status of certificates
434 in the index file.
435 [Massimiliano Pala <madwolf@comune.modena.it>]
436
d199858e
BM
437 *) New '-newreq-nodes' command option to CA.pl. This is like
438 '-newreq', but calls 'openssl req' with the '-nodes' option
439 so that the resulting key is not encrypted.
440 [Damien Miller <djm@mindrot.org>]
441
10a2975a
RL
442 *) New configuration for the GNU Hurd.
443 [Jonathan Bartlett <johnnyb@wolfram.com> via Richard Levitte]
444
9b4dc830
DSH
445 *) Initial code to implement OCSP basic response verify. This
446 is currently incomplete. Currently just finds the signer's
447 certificate and verifies the signature on the response.
448 [Steve Henson]
449
673b3fde
BM
450 *) New SSLeay_version code SSLEAY_DIR to determine the compiled-in
451 value of OPENSSLDIR. This is available via the new '-d' option
452 to 'openssl version', and is also included in 'openssl version -a'.
453 [Bodo Moeller]
454
c06648f7
BM
455 *) Fix C code generated by 'openssl dsaparam -C': If a BN_bin2bn
456 call failed, free the DSA structure.
457 [Bodo Moeller]
458
a5435e8b
BM
459 *) Allowing defining memory allocation callbacks that will be given
460 file name and line number information in additional arguments
461 (a const char* and an int). The basic functionality remains, as
462 well as the original possibility to just replace malloc(),
463 realloc() and free() by functions that do not know about these
464 additional arguments. To register and find out the current
465 settings for extended allocation functions, the following
466 functions are provided:
65a22e8e
RL
467
468 CRYPTO_set_mem_ex_functions
469 CRYPTO_set_locked_mem_ex_functions
470 CRYPTO_get_mem_ex_functions
471 CRYPTO_get_locked_mem_ex_functions
472
a5435e8b
BM
473 These work the same way as CRYPTO_set_mem_functions and friends.
474 CRYPTO_get_[locked_]mem_functions now writes 0 where such an
475 extended allocation function is enabled.
476 Similarly, CRYPTO_get_[locked_]mem_ex_functions writes 0 where
477 a conventional allocation function is enabled.
478 [Richard Levitte, Bodo Moeller]
65a22e8e 479
cbf0f45f
DSH
480 *) Fix to uni2asc() to cope with zero length Unicode strings.
481 These are present in some PKCS#12 files.
482 [Steve Henson]
483
3c914840
GT
484 *) Finish off removing the remaining LHASH function pointer casts.
485 There should no longer be any prototype-casting required when using
56a67adb
GT
486 the LHASH abstraction, and any casts that remain are "bugs". See
487 the callback types and macros at the head of lhash.h for details
488 (and "OBJ_cleanup" in crypto/objects/obj_dat.c as an example).
3c914840
GT
489 [Geoff Thorpe]
490
599c0353
LJ
491 *) Add automatic query of EGD sockets in RAND_poll() for the unix variant.
492 If an EGD or PRNGD is running and enough entropy is returned, automatic
493 seeding like with /dev/[u]random will be performed.
494 Positions tried are: /etc/entropy, /var/run/egd-pool.
495 [Lutz Jaenicke]
496
0c61e299 497 *) Change the Unix RAND_poll() variant to be able to poll several
361ef5f4
RL
498 random devices, as specified by DEVRANDOM, until a sufficient amount
499 of data has been collected. We spend at most 10 ms on each file
500 (select timeout) and read in non-blocking mode. DEVRANDOM now
501 defaults to the list "/dev/urandom", "/dev/random", "/dev/srandom"
502 (previously it was just the string "/dev/urandom"), so on typical
503 platforms the 10 ms delay will never occur.
504 Also separate out the Unix variant to its own file, rand_unix.c.
505 For VMS, there's a currently-empty rand_vms.c.
0c61e299
RL
506 [Richard Levitte]
507
0b33bc65
DSH
508 *) Move OCSP client related routines to ocsp_cl.c. These
509 provide utility functions which an application needing
510 to issue a request to an OCSP responder and analyse the
511 response will typically need: as opposed to those which an
512 OCSP responder itself would need which will be added later.
513
514 OCSP_request_sign() signs an OCSP request with an API similar
515 to PKCS7_sign(). OCSP_response_status() returns status of OCSP
516 response. OCSP_response_get1_basic() extracts basic response
517 from response. OCSP_resp_find_status(): finds and extracts status
518 information from an OCSP_CERTID structure (which will be created
519 when the request structure is built). These are built from lower
520 level functions which work on OCSP_SINGLERESP structures but
521 wont normally be used unless the application wishes to examine
522 extensions in the OCSP response for example.
523
524 Replace nonce routines with a pair of functions.
525 OCSP_request_add1_nonce() adds a nonce value and optionally
526 generates a random value. OCSP_check_nonce() checks the
527 validity of the nonce in an OCSP response.
528 [Steve Henson]
529
530 *) Change function OCSP_request_add() to OCSP_request_add0_id().
8e961835
DSH
531 This doesn't copy the supplied OCSP_CERTID and avoids the
532 need to free up the newly created id. Change return type
533 to OCSP_ONEREQ to return the internal OCSP_ONEREQ structure.
534 This can then be used to add extensions to the request.
535 Deleted OCSP_request_new(), since most of its functionality
536 is now in OCSP_REQUEST_new() (and the case insensitive name
537 clash) apart from the ability to set the request name which
538 will be added elsewhere.
539 [Steve Henson]
540
bf0d176e
DSH
541 *) Update OCSP API. Remove obsolete extensions argument from
542 various functions. Extensions are now handled using the new
543 OCSP extension code. New simple OCSP HTTP function which
544 can be used to send requests and parse the response.
545 [Steve Henson]
546
ec5add87
DSH
547 *) Fix the PKCS#7 (S/MIME) code to work with new ASN1. Two new
548 ASN1_ITEM structures help with sign and verify. PKCS7_ATTR_SIGN
549 uses the special reorder version of SET OF to sort the attributes
550 and reorder them to match the encoded order. This resolves a long
551 standing problem: a verify on a PKCS7 structure just after signing
552 it used to fail because the attribute order did not match the
553 encoded order. PKCS7_ATTR_VERIFY does not reorder the attributes:
554 it uses the received order. This is necessary to tolerate some broken
555 software that does not order SET OF. This is handled by encoding
556 as a SEQUENCE OF but using implicit tagging (with UNIVERSAL class)
557 to produce the required SET OF.
558 [Steve Henson]
559
a6574c21
RL
560 *) Have mk1mf.pl generate the macros OPENSSL_BUILD_SHLIBCRYPTO and
561 OPENSSL_BUILD_SHLIBSSL and use them appropriately in the header
562 files to get correct declarations of the ASN.1 item variables.
563 [Richard Levitte]
564
ecbe0781
DSH
565 *) Rewrite of PKCS#12 code to use new ASN1 functionality. Replace many
566 PKCS#12 macros with real functions. Fix two unrelated ASN1 bugs:
567 asn1_check_tlen() would sometimes attempt to use 'ctx' when it was
568 NULL and ASN1_TYPE was not dereferenced properly in asn1_ex_c2i().
569 New ASN1 macro: DECLARE_ASN1_ITEM() which just declares the relevant
570 ASN1_ITEM and no wrapper functions.
571 [Steve Henson]
572
4e1209eb
DSH
573 *) New functions or ASN1_item_d2i_fp() and ASN1_item_d2i_bio(). These
574 replace the old function pointer based I/O routines. Change most of
575 the *_d2i_bio() and *_d2i_fp() functions to use these.
576 [Steve Henson]
577
3f07fe09
RL
578 *) Enhance mkdef.pl to be more accepting about spacing in C preprocessor
579 lines, recognice more "algorithms" that can be deselected, and make
580 it complain about algorithm deselection that isn't recognised.
581 [Richard Levitte]
582
78d3b819 583 *) New ASN1 functions to handle dup, sign, verify, digest, pack and
73e92de5
DSH
584 unpack operations in terms of ASN1_ITEM. Modify existing wrappers
585 to use new functions. Add NO_ASN1_OLD which can be set to remove
586 some old style ASN1 functions: this can be used to determine if old
587 code will still work when these eventually go away.
09ab755c
DSH
588 [Steve Henson]
589
ec558b65
DSH
590 *) New extension functions for OCSP structures, these follow the
591 same conventions as certificates and CRLs.
592 [Steve Henson]
593
57d2f217
DSH
594 *) New function X509V3_add1_i2d(). This automatically encodes and
595 adds an extension. Its behaviour can be customised with various
596 flags to append, replace or delete. Various wrappers added for
597 certifcates and CRLs.
598 [Steve Henson]
599
5755cab4
DSH
600 *) Fix to avoid calling the underlying ASN1 print routine when
601 an extension cannot be parsed. Correct a typo in the
602 OCSP_SERVICELOC extension. Tidy up print OCSP format.
603 [Steve Henson]
604
3880cd35
BM
605 *) Increase s2->wbuf allocation by one byte in ssl2_new (ssl/s2_lib.c).
606 Otherwise do_ssl_write (ssl/s2_pkt.c) will write beyond buffer limits
607 when writing a 32767 byte record.
608 [Bodo Moeller; problem reported by Eric Day <eday@concentric.net>]
609
f640ee90 610 *) In RSA_eay_public_{en,ed}crypt and RSA_eay_mod_exp (rsa_eay.c),
126fe085 611 obtain lock CRYPTO_LOCK_RSA before setting rsa->_method_mod_{n,p,q}.
f640ee90
BM
612
613 (RSA objects have a reference count access to which is protected
614 by CRYPTO_LOCK_RSA [see rsa_lib.c, s3_srvr.c, ssl_cert.c, ssl_rsa.c],
615 so they are meant to be shared between threads.)
126fe085
BM
616 [Bodo Moeller, Geoff Thorpe; original patch submitted by
617 "Reddie, Steven" <Steven.Reddie@ca.com>]
f640ee90 618
9c67ab2f
DSH
619 *) Make mkdef.pl parse some of the ASN1 macros and add apropriate
620 entries for variables.
5755cab4 621 [Steve Henson]
9c67ab2f 622
1456d186
BM
623 *) Fix a deadlock in CRYPTO_mem_leaks().
624 [Bodo Moeller]
625
3ac82faa
BM
626 *) Add functionality to apps/openssl.c for detecting locking
627 problems: As the program is single-threaded, all we have
628 to do is register a locking callback using an array for
629 storing which locks are currently held by the program.
3ac82faa
BM
630 [Bodo Moeller]
631
632 *) Use a lock around the call to CRYPTO_get_ex_new_index() in
633 SSL_get_ex_data_X509_STORE_idx(), which is used in
634 ssl_verify_cert_chain() and thus can be called at any time
635 during TLS/SSL handshakes so that thread-safety is essential.
636 Unfortunately, the ex_data design is not at all suited
637 for multi-threaded use, so it probably should be abolished.
638 [Bodo Moeller]
639
2a86064f
GT
640 *) Added Broadcom "ubsec" ENGINE to OpenSSL.
641 [Broadcom, tweaked and integrated by Geoff Thorpe]
642
2c15d426
DSH
643 *) Move common extension printing code to new function
644 X509V3_print_extensions(). Reorganise OCSP print routines and
c08523d8 645 implement some needed OCSP ASN1 functions. Add OCSP extensions.
2c15d426
DSH
646 [Steve Henson]
647
de487514
DSH
648 *) New function X509_signature_print() to remove duplication in some
649 print routines.
650 [Steve Henson]
651
06db4253
DSH
652 *) Add a special meaning when SET OF and SEQUENCE OF flags are both
653 set (this was treated exactly the same as SET OF previously). This
654 is used to reorder the STACK representing the structure to match the
655 encoding. This will be used to get round a problem where a PKCS7
656 structure which was signed could not be verified because the STACK
657 order did not reflect the encoded order.
658 [Steve Henson]
659
36f554d4
DSH
660 *) Reimplement the OCSP ASN1 module using the new code.
661 [Steve Henson]
662
2aff7727
DSH
663 *) Update the X509V3 code to permit the use of an ASN1_ITEM structure
664 for its ASN1 operations. The old style function pointers still exist
665 for now but they will eventually go away.
666 [Steve Henson]
667
9d6b1ce6 668 *) Merge in replacement ASN1 code from the ASN1 branch. This almost
5755cab4
DSH
669 completely replaces the old ASN1 functionality with a table driven
670 encoder and decoder which interprets an ASN1_ITEM structure describing
671 the ASN1 module. Compatibility with the existing ASN1 API (i2d,d2i) is
672 largely maintained. Almost all of the old asn1_mac.h macro based ASN1
673 has also been converted to the new form.
9d6b1ce6
DSH
674 [Steve Henson]
675
8dea52fa
BM
676 *) Change BN_mod_exp_recp so that negative moduli are tolerated
677 (the sign is ignored). Similarly, ignore the sign in BN_MONT_CTX_set
678 so that BN_mod_exp_mont and BN_mod_exp_mont_word work
679 for negative moduli.
680 [Bodo Moeller]
681
682 *) Fix BN_uadd and BN_usub: Always return non-negative results instead
683 of not touching the result's sign bit.
684 [Bodo Moeller]
685
80d89e6a
BM
686 *) BN_div bugfix: If the result is 0, the sign (res->neg) must not be
687 set.
688 [Bodo Moeller]
689
f1919c3d
GT
690 *) Changed the LHASH code to use prototypes for callbacks, and created
691 macros to declare and implement thin (optionally static) functions
692 that provide type-safety and avoid function pointer casting for the
693 type-specific callbacks.
694 [Geoff Thorpe]
695
1946cd8b
UM
696 *) Use better test patterns in bntest.
697