]> git.ipfire.org Git - thirdparty/openssl.git/blame - CHANGES
Two changes have been made:
[thirdparty/openssl.git] / CHANGES
CommitLineData
651d0aff 1
f1c236f8 2 OpenSSL CHANGES
651d0aff
RE
3 _______________
4
d91e201e
RE
5 Changes between 0.9.4 and 0.9.5 [xx XXX 1999]
6
954ef7ef
DSH
7 *) Add options -text and -noout to pkcs7 utility and delets the
8 encryption options which never did anything. Update docs.
9 [Steve Henson]
10
af29811e
DSH
11 *) Add options to some of the utilities to allow the pass phrase
12 to be included on either the command line (not recommended on
13 OSes like Unix) or read from the environment. Update the
14 manpages and fix a few bugs.
15 [Steve Henson]
16
aba3e65f
DSH
17 *) Add a few manpages for some of the openssl commands.
18 [Steve Henson]
19
a0ad17bb
DSH
20 *) Fix the -revoke option in ca. It was freeing up memory twice,
21 leaking and not finding already revoked certificates.
22 [Steve Henson]
23
ce1b4fe1
DSH
24 *) Extensive changes to support certificate auxiliary information.
25 This involves the use of X509_CERT_AUX structure and X509_AUX
26 functions. An X509_AUX function such as PEM_read_X509_AUX()
27 can still read in a certificate file in the usual way but it
28 will also read in any additional "auxiliary information". By
29 doing things this way a fair degree of compatability can be
30 retained: existing certificates can have this information added
31 using the new 'x509' options.
32
33 Current auxiliary information includes an "alias" and some trust
34 settings. The trust settings will ultimately be used in enhanced
35 certificate chain verification routines: currently a certificate
36 can only be trusted if it is self signed and then it is trusted
37 for all purposes.
38 [Steve Henson]
39
ce2c95b2
MC
40 *) Fix assembler for Alpha (tested only on DEC OSF not Linux or *BSD). The
41 problem was that one of the replacement routines had not been working since
42 SSLeay releases. For now the offending routine has been replaced with
43 non-optimised assembler. Even so, this now gives around 95% performance
44 improvement for 1024 bit RSA signs.
45 [Mark Cox]
46
9716a8f9
DSH
47 *) Hack to fix PKCS#7 decryption when used with some unorthodox RC2
48 handling. Most clients have the effective key size in bits equal to
49 the key length in bits: so a 40 bit RC2 key uses a 40 bit (5 byte) key.
50 A few however don't do this and instead use the size of the decrypted key
51 to determine the RC2 key length and the AlgorithmIdentifier to determine
52 the effective key length. In this case the effective key lenth can still
53 be 40 bits but the key length can be 168 bits for example. This is fixed
54 by manually forcing an RC2 key into the EVP_PKEY structure because the
55 EVP code can't currently handle unusual RC2 key sizes: it always assumes
56 the key length and effective key length are equal.
57 [Steve Henson]
58
74400f73
DSH
59 *) Add a bunch of functions that should simplify the creation of
60 X509_NAME structures. Now you should be able to do:
61 X509_NAME_add_entry_by_txt(nm, "CN", MBSTRING_ASC, "Steve", -1, -1, 0);
62 and have it automatically work out the correct field type and fill in
63 the structures. The more adventurous can try:
64 X509_NAME_add_entry_by_txt(nm, field, MBSTRING_UTF8, str, -1, -1, 0);
65 and it will (hopefully) work out the correct multibyte encoding.
66 [Steve Henson]
67
68 *) Change the 'req' utility to use the new field handling and multibyte
69 copy routines. Before the DN field creation was handled in an ad hoc
70 way in req, ca, and x509 which was rather broken and didn't support
71 BMPStrings or UTF8Strings. Since some software doesn't implement
72 BMPStrings or UTF8Strings yet, they can be enabled using the config file
73 using the dirstring_type option. See the new comment in the default
74 openssl.cnf for more info.
75 [Steve Henson]
76
c1e744b9 77 *) Make crypto/rand/md_rand.c more robust:
62ac2938 78 - Assure unique random numbers after fork().
c1e744b9
BM
79 - Make sure that concurrent threads access the global counter and
80 md serializably so that we never lose entropy in them
81 or use exactly the same state in multiple threads.
82 Access to the large state is not always serializable because
83 the additional locking could be a performance killer, and
84 md should be large enough anyway.
85 [Bodo Moeller]
86
a31011e8
BM
87 *) New file apps/app_rand.c with commonly needed functionality
88 for handling the random seed file.
89
90 Use the random seed file in some applications that previously did not:
91 ca,
92 dsaparam -genkey (which also ignored its `-rand' option),
93 s_client,
94 s_server,
95 x509 (when signing).
96 Except on systems with /dev/urandom, it is crucial to have a random
97 seed file at least for key creation, DSA signing, and for DH exchanges;
99e87569 98 for RSA signatures we could do without one.
a31011e8
BM
99
100 gendh and gendsa (unlike genrsa) used to read only the first byte
101 of each file listed in the `-rand' option. The function as previously
102 found in genrsa is now in app_rand.c and is used by all programs
103 that support `-rand'.
104 [Bodo Moeller]
105
106 *) In RAND_write_file, use mode 0600 for creating files;
107 don't just chmod when it may be too late.
108 [Bodo Moeller]
109
110 *) Report an error from X509_STORE_load_locations
111 when X509_LOOKUP_load_file or X509_LOOKUP_add_dir failed.
112 [Bill Perry]
113
462f79ec
DSH
114 *) New function ASN1_mbstring_copy() this copies a string in either
115 ASCII, Unicode, Universal (4 bytes per character) or UTF8 format
116 into an ASN1_STRING type. A mask of permissible types is passed
117 and it chooses the "minimal" type to use or an error if not type
118 is suitable.
119 [Steve Henson]
120
08e9c1af
DSH
121 *) Add function equivalents to the various macros in asn1.h. The old
122 macros are retained with an M_ prefix. Code inside the library can
123 use the M_ macros. External code (including the openssl utility)
124 should *NOT* in order to be "shared library friendly".
125 [Steve Henson]
126
673b102c
DSH
127 *) Add various functions that can check a certificate's extensions
128 to see if it usable for various purposes such as SSL client,
129 server or S/MIME and CAs of these types. This is currently
130 VERY EXPERIMENTAL but will ultimately be used for certificate chain
131 verification. Also added a -purpose flag to x509 utility to
132 print out all the purposes.
133 [Steve Henson]
134
56a3fec1
DSH
135 *) Add a CRYPTO_EX_DATA to X509 certificate structure and associated
136 functions.
137 [Steve Henson]
138
4654ef98
DSH
139 *) New X509V3_{X509,CRL,REVOKED}_get_d2i() functions. These will search
140 for, obtain and decode and extension and obtain its critical flag.
141 This allows all the necessary extension code to be handled in a
142 single function call.
143 [Steve Henson]
144
7e102e28
AP
145 *) RC4 tune-up featuring 30-40% performance improvement on most RISC
146 platforms. See crypto/rc4/rc4_enc.c for further details.
147 [Andy Polyakov]
148
d71c6bc5
DSH
149 *) New -noout option to asn1parse. This causes no output to be produced
150 its main use is when combined with -strparse and -out to extract data
151 from a file (which may not be in ASN.1 format).
152 [Steve Henson]
153
2d681b77
DSH
154 *) Fix for pkcs12 program. It was hashing an invalid certificate pointer
155 when producing the local key id.
156 [Richard Levitte <levitte@stacken.kth.se>]
157
3908cdf4
DSH
158 *) New option -dhparam in s_server. This allows a DH parameter file to be
159 stated explicitly. If it is not stated then it tries the first server
160 certificate file. The previous behaviour hard coded the filename
161 "server.pem".
162 [Steve Henson]
163
3ea23631
DSH
164 *) Add -pubin and -pubout options to the rsa and dsa commands. These allow
165 a public key to be input or output. For example:
166 openssl rsa -in key.pem -pubout -out pubkey.pem
167 Also added necessary DSA public key functions to handle this.
168 [Steve Henson]
169
393f2c65
DSH
170 *) Fix so PKCS7_dataVerify() doesn't crash if no certificates are contained
171 in the message. This was handled by allowing
172 X509_find_by_issuer_and_serial() to tolerate a NULL passed to it.
173 [Steve Henson, reported by Sampo Kellomaki <sampo@mail.neuronio.pt>]
174
175 *) Fix for bug in d2i_ASN1_bytes(): other ASN1 functions add an extra null
176 to the end of the strings whereas this didn't. This would cause problems
177 if strings read with d2i_ASN1_bytes() were later modified.
178 [Steve Henson, reported by Arne Ansper <arne@ats.cyber.ee>]
179
4579dd5d
DSH
180 *) Fix for base64 decode bug. When a base64 bio reads only one line of
181 data and it contains EOF it will end up returning an error. This is
182 caused by input 46 bytes long. The cause is due to the way base64
183 BIOs find the start of base64 encoded data. They do this by trying a
184 trial decode on each line until they find one that works. When they
185 do a flag is set and it starts again knowing it can pass all the
186 data directly through the decoder. Unfortunately it doesn't reset
187 the context it uses. This means that if EOF is reached an attempt
188 is made to pass two EOFs through the context and this causes the
189 resulting error. This can also cause other problems as well. As is
190 usual with these problems it takes *ages* to find and the fix is
191 trivial: move one line.
192 [Steve Henson, reported by ian@uns.ns.ac.yu (Ivan Nejgebauer) ]
193
06f4536a
DSH
194 *) Ugly workaround to get s_client and s_server working under Windows. The
195 old code wouldn't work because it needed to select() on sockets and the
196 tty (for keypresses and to see if data could be written). Win32 only
197 supports select() on sockets so we select() with a 1s timeout on the
198 sockets and then see if any characters are waiting to be read, if none
199 are present then we retry, we also assume we can always write data to
200 the tty. This isn't nice because the code then blocks until we've
201 received a complete line of data and it is effectively polling the
202 keyboard at 1s intervals: however it's quite a bit better than not
203 working at all :-) A dedicated Windows application might handle this
204 with an event loop for example.
205 [Steve Henson]
206
1c80019a
DSH
207 *) Enhance RSA_METHOD structure. Now there are two extra methods, rsa_sign
208 and rsa_verify. When the RSA_FLAGS_SIGN_VER option is set these functions
209 will be called when RSA_sign() and RSA_verify() are used. This is useful
210 if rsa_pub_dec() and rsa_priv_enc() equivalents are not available.
211 For this to work properly RSA_public_decrypt() and RSA_private_encrypt()
212 should *not* be used: RSA_sign() and RSA_verify() must be used instead.
213 This necessitated the support of an extra signature type NID_md5_sha1
214 for SSL signatures and modifications to the SSL library to use it instead
215 of calling RSA_public_decrypt() and RSA_private_encrypt().
216 [Steve Henson]
217
090d848e
DSH
218 *) Add new -verify -CAfile and -CApath options to the crl program, these
219 will lookup a CRL issuers certificate and verify the signature in a
220 similar way to the verify program. Tidy up the crl program so it
221 no longer acesses structures directly. Make the ASN1 CRL parsing a bit
222 less strict. It will now permit CRL extensions even if it is not
223 a V2 CRL: this will allow it to tolerate some broken CRLs.
224 [Steve Henson]
225
396f6314
BM
226 *) Initialize all non-automatic variables each time one of the openssl
227 sub-programs is started (this is necessary as they may be started
228 multiple times from the "OpenSSL>" prompt).
229 [Lennart Bang, Bodo Moeller]
230
4a61a64f
DSH
231 *) Preliminary compilation option RSA_NULL which disables RSA crypto without
232 removing all other RSA functionality (this is what NO_RSA does). This
233 is so (for example) those in the US can disable those operations covered
234 by the RSA patent while allowing storage and parsing of RSA keys and RSA
235 key generation.
236 [Steve Henson]
237
c1082a90 238 *) Non-copying interface to BIO pairs.
6f7af152 239 (still largely untested)
c1082a90
BM
240 [Bodo Moeller]
241
a785abc3
DSH
242 *) New function ANS1_tag2str() to convert an ASN1 tag to a descriptive
243 ASCII string. This was handled independently in various places before.
244 [Steve Henson]
245
aef838fc
DSH
246 *) New functions UTF8_getc() and UTF8_putc() that parse and generate
247 UTF8 strings a character at a time.
248 [Steve Henson]
249
074309b7
BM
250 *) Use client_version from client hello to select the protocol
251 (s23_srvr.c) and for RSA client key exchange verification
252 (s3_srvr.c), as required by the SSL 3.0/TLS 1.0 specifications.
253 [Bodo Moeller]
254
8ce97163
DSH
255 *) Add various utility functions to handle SPKACs, these were previously
256 handled by poking round in the structure internals. Added new function
257 NETSCAPE_SPKI_print() to print out SPKAC and a new utility 'spkac' to
258 print, verify and generate SPKACs. Based on an original idea from
259 Massimiliano Pala <madwolf@comune.modena.it> but extensively modified.
260 [Steve Henson]
261
2d4287da
AP
262 *) RIPEMD160 is operational on all platforms and is back in 'make test'.
263 [Andy Polyakov]
264
87a25f90
DSH
265 *) Allow the config file extension section to be overwritten on the
266 command line. Based on an original idea from Massimiliano Pala
267 <madwolf@comune.modena.it>. The new option is called -extensions
268 and can be applied to ca, req and x509. Also -reqexts to override
269 the request extensions in req and -crlexts to override the crl extensions
270 in ca.
271 [Steve Henson]
272
f9150e54
DSH
273 *) Add new feature to the SPKAC handling in ca. Now you can include
274 the same field multiple times by preceding it by "XXXX." for example:
275 1.OU="Unit name 1"
276 2.OU="Unit name 2"
277 this is the same syntax as used in the req config file.
278 [Steve Henson]
279
c79b16e1
DSH
280 *) Allow certificate extensions to be added to certificate requests. These
281 are specified in a 'req_extensions' option of the req section of the
282 config file. They can be printed out with the -text option to req but
283 are otherwise ignored at present.
284 [Steve Henson]
285
96c2201b 286 *) Fix a horrible bug in enc_read() in crypto/evp/bio_enc.c: if the first
0f7e6fe1 287 data read consists of only the final block it would not decrypted because
7b65c329
DSH
288 EVP_CipherUpdate() would correctly report zero bytes had been decrypted.
289 A misplaced 'break' also meant the decrypted final block might not be
290 copied until the next read.
291 [Steve Henson]
292
13066cee
DSH
293 *) Initial support for DH_METHOD. Again based on RSA_METHOD. Also added
294 a few extra parameters to the DH structure: these will be useful if
295 for example we want the value of 'q' or implement X9.42 DH.
296 [Steve Henson]
297
c0711f7f
DSH
298 *) Initial support for DSA_METHOD. This is based on the RSA_METHOD and
299 provides hooks that allow the default DSA functions or functions on a
300 "per key" basis to be replaced. This allows hardware acceleration and
301 hardware key storage to be handled without major modification to the
302 library. Also added low level modexp hooks and CRYPTO_EX structure and
303 associated functions.
304 [Steve Henson]
305
8484721a
DSH
306 *) Add a new flag to memory BIOs, BIO_FLAG_MEM_RDONLY. This marks the BIO
307 as "read only": it can't be written to and the buffer it points to will
308 not be freed. Reading from a read only BIO is much more efficient than
309 a normal memory BIO. This was added because there are several times when
310 an area of memory needs to be read from a BIO. The previous method was
311 to create a memory BIO and write the data to it, this results in two
312 copies of the data and an O(n^2) reading algorithm. There is a new
313 function BIO_new_mem_buf() which creates a read only memory BIO from
314 an area of memory. Also modified the PKCS#7 routines to use read only
315 memory BIOSs.
316 [Steve Henson]
317
de1915e4
BM
318 *) Bugfix: ssl23_get_client_hello did not work properly when called in
319 state SSL23_ST_SR_CLNT_HELLO_B, i.e. when the first 7 bytes of
320 a SSLv2-compatible client hello for SSLv3 or TLSv1 could be read,
321 but a retry condition occured while trying to read the rest.
322 [Bodo Moeller]
323
c6c34506
DSH
324 *) The PKCS7_ENC_CONTENT_new() function was setting the content type as
325 NID_pkcs7_encrypted by default: this was wrong since this should almost
326 always be NID_pkcs7_data. Also modified the PKCS7_set_type() to handle
327 the encrypted data type: this is a more sensible place to put it and it
328 allows the PKCS#12 code to be tidied up that duplicated this
329 functionality.
330 [Steve Henson]
331
fd520577
DSH
332 *) Changed obj_dat.pl script so it takes its input and output files on
333 the command line. This should avoid shell escape redirection problems
334 under Win32.
335 [Steve Henson]
336
87c49f62 337 *) Initial support for certificate extension requests, these are included
fd520577
DSH
338 in things like Xenroll certificate requests. Included functions to allow
339 extensions to be obtained and added.
87c49f62
DSH
340 [Steve Henson]
341
1b1a6e78
BM
342 *) -crlf option to s_client and s_server for sending newlines as
343 CRLF (as required by many protocols).
344 [Bodo Moeller]
345
9a577e29 346 Changes between 0.9.3a and 0.9.4 [09 Aug 1999]
dfbaf956 347
9a577e29 348 *) Install libRSAglue.a when OpenSSL is built with RSAref.
dfbaf956 349 [Ralf S. Engelschall]
74678cc2 350
96395158
RE
351 *) A few more ``#ifndef NO_FP_API / #endif'' pairs for consistency.
352 [Andrija Antonijevic <TheAntony2@bigfoot.com>]
353
ed7f60fb
DSH
354 *) Fix -startdate and -enddate (which was missing) arguments to 'ca'
355 program.
356 [Steve Henson]
357
48c843c3
BM
358 *) New function DSA_dup_DH, which duplicates DSA parameters/keys as
359 DH parameters/keys (q is lost during that conversion, but the resulting
360 DH parameters contain its length).
361
362 For 1024-bit p, DSA_generate_parameters followed by DSA_dup_DH is
363 much faster than DH_generate_parameters (which creates parameters
364 where p = 2*q + 1), and also the smaller q makes DH computations
365 much more efficient (160-bit exponentiation instead of 1024-bit
366 exponentiation); so this provides a convenient way to support DHE
367 ciphersuites in SSL/TLS servers (see ssl/ssltest.c). It is of
368 utter importance to use
369 SSL_CTX_set_options(s_ctx, SSL_OP_SINGLE_DH_USE);
370 or
371 SSL_set_options(s_ctx, SSL_OP_SINGLE_DH_USE);
372 when such DH parameters are used, because otherwise small subgroup
373 attacks may become possible!
374 [Bodo Moeller]
375
376 *) Avoid memory leak in i2d_DHparams.
377 [Bodo Moeller]
378
922180d7
DSH
379 *) Allow the -k option to be used more than once in the enc program:
380 this allows the same encrypted message to be read by multiple recipients.
381 [Steve Henson]
382
3e3d2ea2
DSH
383 *) New function OBJ_obj2txt(buf, buf_len, a, no_name), this converts
384 an ASN1_OBJECT to a text string. If the "no_name" parameter is set then
385 it will always use the numerical form of the OID, even if it has a short
386 or long name.
387 [Steve Henson]
388
770d19b8
DSH
389 *) Added an extra RSA flag: RSA_FLAG_EXT_PKEY. Previously the rsa_mod_exp
390 method only got called if p,q,dmp1,dmq1,iqmp components were present,
391 otherwise bn_mod_exp was called. In the case of hardware keys for example
392 no private key components need be present and it might store extra data
96c2201b
BM
393 in the RSA structure, which cannot be accessed from bn_mod_exp.
394 By setting RSA_FLAG_EXT_PKEY rsa_mod_exp will always be called for
395 private key operations.
770d19b8
DSH
396 [Steve Henson]
397
a0618e3e
AP
398 *) Added support for SPARC Linux.
399 [Andy Polyakov]
400
74678cc2
BM
401 *) pem_password_cb function type incompatibly changed from
402 typedef int pem_password_cb(char *buf, int size, int rwflag);
403 to
404 ....(char *buf, int size, int rwflag, void *userdata);
405 so that applications can pass data to their callbacks:
406 The PEM[_ASN1]_{read,write}... functions and macros now take an
407 additional void * argument, which is just handed through whenever
408 the password callback is called.
96c2201b 409 [Damien Miller <dmiller@ilogic.com.au>; tiny changes by Bodo Moeller]
74678cc2
BM
410
411 New function SSL_CTX_set_default_passwd_cb_userdata.
412
413 Compatibility note: As many C implementations push function arguments
414 onto the stack in reverse order, the new library version is likely to
415 interoperate with programs that have been compiled with the old
416 pem_password_cb definition (PEM_whatever takes some data that
417 happens to be on the stack as its last argument, and the callback
418 just ignores this garbage); but there is no guarantee whatsoever that
419 this will work.
0cceb1c7 420
664b9985
BM
421 *) The -DPLATFORM="\"$(PLATFORM)\"" definition and the similar -DCFLAGS=...
422 (both in crypto/Makefile.ssl for use by crypto/cversion.c) caused
423 problems not only on Windows, but also on some Unix platforms.
2e0fc875 424 To avoid problematic command lines, these definitions are now in an
57119943
BM
425 auto-generated file crypto/buildinf.h (created by crypto/Makefile.ssl
426 for standard "make" builds, by util/mk1mf.pl for "mk1mf" builds).
664b9985
BM
427 [Bodo Moeller]
428
7363455f
AP
429 *) MIPS III/IV assembler module is reimplemented.
430 [Andy Polyakov]
431
6434450c
UM
432 *) More DES library cleanups: remove references to srand/rand and
433 delete an unused file.
434