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