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