]>
Commit | Line | Data |
---|---|---|
f1c236f8 | 1 | OpenSSL CHANGES |
651d0aff RE |
2 | _______________ |
3 | ||
c5e8580e RL |
4 | Changes between 0.9.6 and 0.9.7 [xx XXX 2000] |
5 | ||
9b4dc830 DSH |
6 | *) Initial code to implement OCSP basic response verify. This |
7 | is currently incomplete. Currently just finds the signer's | |
8 | certificate and verifies the signature on the response. | |
9 | [Steve Henson] | |
10 | ||
673b3fde BM |
11 | *) New SSLeay_version code SSLEAY_DIR to determine the compiled-in |
12 | value of OPENSSLDIR. This is available via the new '-d' option | |
13 | to 'openssl version', and is also included in 'openssl version -a'. | |
14 | [Bodo Moeller] | |
15 | ||
c06648f7 BM |
16 | *) Fix C code generated by 'openssl dsaparam -C': If a BN_bin2bn |
17 | call failed, free the DSA structure. | |
18 | [Bodo Moeller] | |
19 | ||
a5435e8b BM |
20 | *) Allowing defining memory allocation callbacks that will be given |
21 | file name and line number information in additional arguments | |
22 | (a const char* and an int). The basic functionality remains, as | |
23 | well as the original possibility to just replace malloc(), | |
24 | realloc() and free() by functions that do not know about these | |
25 | additional arguments. To register and find out the current | |
26 | settings for extended allocation functions, the following | |
27 | functions are provided: | |
65a22e8e RL |
28 | |
29 | CRYPTO_set_mem_ex_functions | |
30 | CRYPTO_set_locked_mem_ex_functions | |
31 | CRYPTO_get_mem_ex_functions | |
32 | CRYPTO_get_locked_mem_ex_functions | |
33 | ||
a5435e8b BM |
34 | These work the same way as CRYPTO_set_mem_functions and friends. |
35 | CRYPTO_get_[locked_]mem_functions now writes 0 where such an | |
36 | extended allocation function is enabled. | |
37 | Similarly, CRYPTO_get_[locked_]mem_ex_functions writes 0 where | |
38 | a conventional allocation function is enabled. | |
39 | [Richard Levitte, Bodo Moeller] | |
65a22e8e | 40 | |
cbf0f45f DSH |
41 | *) Fix to uni2asc() to cope with zero length Unicode strings. |
42 | These are present in some PKCS#12 files. | |
43 | [Steve Henson] | |
44 | ||
3c914840 GT |
45 | *) Finish off removing the remaining LHASH function pointer casts. |
46 | There should no longer be any prototype-casting required when using | |
56a67adb GT |
47 | the LHASH abstraction, and any casts that remain are "bugs". See |
48 | the callback types and macros at the head of lhash.h for details | |
49 | (and "OBJ_cleanup" in crypto/objects/obj_dat.c as an example). | |
3c914840 GT |
50 | [Geoff Thorpe] |
51 | ||
599c0353 LJ |
52 | *) Add automatic query of EGD sockets in RAND_poll() for the unix variant. |
53 | If an EGD or PRNGD is running and enough entropy is returned, automatic | |
54 | seeding like with /dev/[u]random will be performed. | |
55 | Positions tried are: /etc/entropy, /var/run/egd-pool. | |
56 | [Lutz Jaenicke] | |
57 | ||
0c61e299 RL |
58 | *) Change the Unix RAND_poll() variant to be able to poll several |
59 | random devices and only read data for a small fragment of time | |
60 | to avoid hangs. Also separate out the Unix variant to it's own | |
61 | file, rand_unix.c. For VMS, there's a currently-empty rand_vms.c. | |
62 | [Richard Levitte] | |
63 | ||
0b33bc65 DSH |
64 | *) Move OCSP client related routines to ocsp_cl.c. These |
65 | provide utility functions which an application needing | |
66 | to issue a request to an OCSP responder and analyse the | |
67 | response will typically need: as opposed to those which an | |
68 | OCSP responder itself would need which will be added later. | |
69 | ||
70 | OCSP_request_sign() signs an OCSP request with an API similar | |
71 | to PKCS7_sign(). OCSP_response_status() returns status of OCSP | |
72 | response. OCSP_response_get1_basic() extracts basic response | |
73 | from response. OCSP_resp_find_status(): finds and extracts status | |
74 | information from an OCSP_CERTID structure (which will be created | |
75 | when the request structure is built). These are built from lower | |
76 | level functions which work on OCSP_SINGLERESP structures but | |
77 | wont normally be used unless the application wishes to examine | |
78 | extensions in the OCSP response for example. | |
79 | ||
80 | Replace nonce routines with a pair of functions. | |
81 | OCSP_request_add1_nonce() adds a nonce value and optionally | |
82 | generates a random value. OCSP_check_nonce() checks the | |
83 | validity of the nonce in an OCSP response. | |
84 | [Steve Henson] | |
85 | ||
86 | *) Change function OCSP_request_add() to OCSP_request_add0_id(). | |
8e961835 DSH |
87 | This doesn't copy the supplied OCSP_CERTID and avoids the |
88 | need to free up the newly created id. Change return type | |
89 | to OCSP_ONEREQ to return the internal OCSP_ONEREQ structure. | |
90 | This can then be used to add extensions to the request. | |
91 | Deleted OCSP_request_new(), since most of its functionality | |
92 | is now in OCSP_REQUEST_new() (and the case insensitive name | |
93 | clash) apart from the ability to set the request name which | |
94 | will be added elsewhere. | |
95 | [Steve Henson] | |
96 | ||
bf0d176e DSH |
97 | *) Update OCSP API. Remove obsolete extensions argument from |
98 | various functions. Extensions are now handled using the new | |
99 | OCSP extension code. New simple OCSP HTTP function which | |
100 | can be used to send requests and parse the response. | |
101 | [Steve Henson] | |
102 | ||
ec5add87 DSH |
103 | *) Fix the PKCS#7 (S/MIME) code to work with new ASN1. Two new |
104 | ASN1_ITEM structures help with sign and verify. PKCS7_ATTR_SIGN | |
105 | uses the special reorder version of SET OF to sort the attributes | |
106 | and reorder them to match the encoded order. This resolves a long | |
107 | standing problem: a verify on a PKCS7 structure just after signing | |
108 | it used to fail because the attribute order did not match the | |
109 | encoded order. PKCS7_ATTR_VERIFY does not reorder the attributes: | |
110 | it uses the received order. This is necessary to tolerate some broken | |
111 | software that does not order SET OF. This is handled by encoding | |
112 | as a SEQUENCE OF but using implicit tagging (with UNIVERSAL class) | |
113 | to produce the required SET OF. | |
114 | [Steve Henson] | |
115 | ||
a6574c21 RL |
116 | *) Have mk1mf.pl generate the macros OPENSSL_BUILD_SHLIBCRYPTO and |
117 | OPENSSL_BUILD_SHLIBSSL and use them appropriately in the header | |
118 | files to get correct declarations of the ASN.1 item variables. | |
119 | [Richard Levitte] | |
120 | ||
ecbe0781 DSH |
121 | *) Rewrite of PKCS#12 code to use new ASN1 functionality. Replace many |
122 | PKCS#12 macros with real functions. Fix two unrelated ASN1 bugs: | |
123 | asn1_check_tlen() would sometimes attempt to use 'ctx' when it was | |
124 | NULL and ASN1_TYPE was not dereferenced properly in asn1_ex_c2i(). | |
125 | New ASN1 macro: DECLARE_ASN1_ITEM() which just declares the relevant | |
126 | ASN1_ITEM and no wrapper functions. | |
127 | [Steve Henson] | |
128 | ||
4e1209eb DSH |
129 | *) New functions or ASN1_item_d2i_fp() and ASN1_item_d2i_bio(). These |
130 | replace the old function pointer based I/O routines. Change most of | |
131 | the *_d2i_bio() and *_d2i_fp() functions to use these. | |
132 | [Steve Henson] | |
133 | ||
3f07fe09 RL |
134 | *) Enhance mkdef.pl to be more accepting about spacing in C preprocessor |
135 | lines, recognice more "algorithms" that can be deselected, and make | |
136 | it complain about algorithm deselection that isn't recognised. | |
137 | [Richard Levitte] | |
138 | ||
78d3b819 | 139 | *) New ASN1 functions to handle dup, sign, verify, digest, pack and |
73e92de5 DSH |
140 | unpack operations in terms of ASN1_ITEM. Modify existing wrappers |
141 | to use new functions. Add NO_ASN1_OLD which can be set to remove | |
142 | some old style ASN1 functions: this can be used to determine if old | |
143 | code will still work when these eventually go away. | |
09ab755c DSH |
144 | [Steve Henson] |
145 | ||
ec558b65 DSH |
146 | *) New extension functions for OCSP structures, these follow the |
147 | same conventions as certificates and CRLs. | |
148 | [Steve Henson] | |
149 | ||
57d2f217 DSH |
150 | *) New function X509V3_add1_i2d(). This automatically encodes and |
151 | adds an extension. Its behaviour can be customised with various | |
152 | flags to append, replace or delete. Various wrappers added for | |
153 | certifcates and CRLs. | |
154 | [Steve Henson] | |
155 | ||
5755cab4 DSH |
156 | *) Fix to avoid calling the underlying ASN1 print routine when |
157 | an extension cannot be parsed. Correct a typo in the | |
158 | OCSP_SERVICELOC extension. Tidy up print OCSP format. | |
159 | [Steve Henson] | |
160 | ||
3880cd35 BM |
161 | *) Increase s2->wbuf allocation by one byte in ssl2_new (ssl/s2_lib.c). |
162 | Otherwise do_ssl_write (ssl/s2_pkt.c) will write beyond buffer limits | |
163 | when writing a 32767 byte record. | |
164 | [Bodo Moeller; problem reported by Eric Day <eday@concentric.net>] | |
165 | ||
f640ee90 | 166 | *) In RSA_eay_public_{en,ed}crypt and RSA_eay_mod_exp (rsa_eay.c), |
126fe085 | 167 | obtain lock CRYPTO_LOCK_RSA before setting rsa->_method_mod_{n,p,q}. |
f640ee90 BM |
168 | |
169 | (RSA objects have a reference count access to which is protected | |
170 | by CRYPTO_LOCK_RSA [see rsa_lib.c, s3_srvr.c, ssl_cert.c, ssl_rsa.c], | |
171 | so they are meant to be shared between threads.) | |
126fe085 BM |
172 | [Bodo Moeller, Geoff Thorpe; original patch submitted by |
173 | "Reddie, Steven" <Steven.Reddie@ca.com>] | |
f640ee90 | 174 | |
9c67ab2f DSH |
175 | *) Make mkdef.pl parse some of the ASN1 macros and add apropriate |
176 | entries for variables. | |
5755cab4 | 177 | [Steve Henson] |
9c67ab2f | 178 | |
1456d186 BM |
179 | *) Fix a deadlock in CRYPTO_mem_leaks(). |
180 | [Bodo Moeller] | |
181 | ||
3ac82faa BM |
182 | *) Add functionality to apps/openssl.c for detecting locking |
183 | problems: As the program is single-threaded, all we have | |
184 | to do is register a locking callback using an array for | |
185 | storing which locks are currently held by the program. | |
3ac82faa BM |
186 | [Bodo Moeller] |
187 | ||
188 | *) Use a lock around the call to CRYPTO_get_ex_new_index() in | |
189 | SSL_get_ex_data_X509_STORE_idx(), which is used in | |
190 | ssl_verify_cert_chain() and thus can be called at any time | |
191 | during TLS/SSL handshakes so that thread-safety is essential. | |
192 | Unfortunately, the ex_data design is not at all suited | |
193 | for multi-threaded use, so it probably should be abolished. | |
194 | [Bodo Moeller] | |
195 | ||
2a86064f GT |
196 | *) Added Broadcom "ubsec" ENGINE to OpenSSL. |
197 | [Broadcom, tweaked and integrated by Geoff Thorpe] | |
198 | ||
2c15d426 DSH |
199 | *) Move common extension printing code to new function |
200 | X509V3_print_extensions(). Reorganise OCSP print routines and | |
c08523d8 | 201 | implement some needed OCSP ASN1 functions. Add OCSP extensions. |
2c15d426 DSH |
202 | [Steve Henson] |
203 | ||
de487514 DSH |
204 | *) New function X509_signature_print() to remove duplication in some |
205 | print routines. | |
206 | [Steve Henson] | |
207 | ||
06db4253 DSH |
208 | *) Add a special meaning when SET OF and SEQUENCE OF flags are both |
209 | set (this was treated exactly the same as SET OF previously). This | |
210 | is used to reorder the STACK representing the structure to match the | |
211 | encoding. This will be used to get round a problem where a PKCS7 | |
212 | structure which was signed could not be verified because the STACK | |
213 | order did not reflect the encoded order. | |
214 | [Steve Henson] | |
215 | ||
36f554d4 DSH |
216 | *) Reimplement the OCSP ASN1 module using the new code. |
217 | [Steve Henson] | |
218 | ||
2aff7727 DSH |
219 | *) Update the X509V3 code to permit the use of an ASN1_ITEM structure |
220 | for its ASN1 operations. The old style function pointers still exist | |
221 | for now but they will eventually go away. | |
222 | [Steve Henson] | |
223 | ||
9d6b1ce6 | 224 | *) Merge in replacement ASN1 code from the ASN1 branch. This almost |
5755cab4 DSH |
225 | completely replaces the old ASN1 functionality with a table driven |
226 | encoder and decoder which interprets an ASN1_ITEM structure describing | |
227 | the ASN1 module. Compatibility with the existing ASN1 API (i2d,d2i) is | |
228 | largely maintained. Almost all of the old asn1_mac.h macro based ASN1 | |
229 | has also been converted to the new form. | |
9d6b1ce6 DSH |
230 | [Steve Henson] |
231 | ||
8dea52fa BM |
232 | *) Change BN_mod_exp_recp so that negative moduli are tolerated |
233 | (the sign is ignored). Similarly, ignore the sign in BN_MONT_CTX_set | |
234 | so that BN_mod_exp_mont and BN_mod_exp_mont_word work | |
235 | for negative moduli. | |
236 | [Bodo Moeller] | |
237 | ||
238 | *) Fix BN_uadd and BN_usub: Always return non-negative results instead | |
239 | of not touching the result's sign bit. | |
240 | [Bodo Moeller] | |
241 | ||
80d89e6a BM |
242 | *) BN_div bugfix: If the result is 0, the sign (res->neg) must not be |
243 | set. | |
244 | [Bodo Moeller] | |
245 | ||
f1919c3d GT |
246 | *) Changed the LHASH code to use prototypes for callbacks, and created |
247 | macros to declare and implement thin (optionally static) functions | |
248 | that provide type-safety and avoid function pointer casting for the | |
249 | type-specific callbacks. | |
250 | [Geoff Thorpe] | |
251 | ||
1946cd8b UM |
252 | *) Use better test patterns in bntest. |
253 |