10Sstevel@tonic-gate 20Sstevel@tonic-gate OpenSSL CHANGES 30Sstevel@tonic-gate _______________ 40Sstevel@tonic-gate 5*2139Sjp161948 Changes between 0.9.8 and 0.9.8a [11 Oct 2005] 6*2139Sjp161948 7*2139Sjp161948 *) Remove the functionality of SSL_OP_MSIE_SSLV2_RSA_PADDING 8*2139Sjp161948 (part of SSL_OP_ALL). This option used to disable the 9*2139Sjp161948 countermeasure against man-in-the-middle protocol-version 10*2139Sjp161948 rollback in the SSL 2.0 server implementation, which is a bad 11*2139Sjp161948 idea. (CAN-2005-2969) 12*2139Sjp161948 13*2139Sjp161948 [Bodo Moeller; problem pointed out by Yutaka Oiwa (Research Center 14*2139Sjp161948 for Information Security, National Institute of Advanced Industrial 15*2139Sjp161948 Science and Technology [AIST], Japan)] 16*2139Sjp161948 17*2139Sjp161948 *) Add two function to clear and return the verify parameter flags. 18*2139Sjp161948 [Steve Henson] 19*2139Sjp161948 20*2139Sjp161948 *) Keep cipherlists sorted in the source instead of sorting them at 21*2139Sjp161948 runtime, thus removing the need for a lock. 22*2139Sjp161948 [Nils Larsch] 23*2139Sjp161948 24*2139Sjp161948 *) Avoid some small subgroup attacks in Diffie-Hellman. 25*2139Sjp161948 [Nick Mathewson and Ben Laurie] 26*2139Sjp161948 27*2139Sjp161948 *) Add functions for well-known primes. 28*2139Sjp161948 [Nick Mathewson] 29*2139Sjp161948 30*2139Sjp161948 *) Extended Windows CE support. 31*2139Sjp161948 [Satoshi Nakamura and Andy Polyakov] 32*2139Sjp161948 33*2139Sjp161948 *) Initialize SSL_METHOD structures at compile time instead of during 34*2139Sjp161948 runtime, thus removing the need for a lock. 35*2139Sjp161948 [Steve Henson] 36*2139Sjp161948 37*2139Sjp161948 *) Make PKCS7_decrypt() work even if no certificate is supplied by 38*2139Sjp161948 attempting to decrypt each encrypted key in turn. Add support to 39*2139Sjp161948 smime utility. 40*2139Sjp161948 [Steve Henson] 41*2139Sjp161948 42*2139Sjp161948 Changes between 0.9.7h and 0.9.8 [05 Jul 2005] 43*2139Sjp161948 44*2139Sjp161948 *) Add libcrypto.pc and libssl.pc for those who feel they need them. 45*2139Sjp161948 [Richard Levitte] 46*2139Sjp161948 47*2139Sjp161948 *) Change CA.sh and CA.pl so they don't bundle the CSR and the private 48*2139Sjp161948 key into the same file any more. 49*2139Sjp161948 [Richard Levitte] 50*2139Sjp161948 51*2139Sjp161948 *) Add initial support for Win64, both IA64 and AMD64/x64 flavors. 52*2139Sjp161948 [Andy Polyakov] 53*2139Sjp161948 54*2139Sjp161948 *) Add -utf8 command line and config file option to 'ca'. 55*2139Sjp161948 [Stefan <stf@udoma.org] 56*2139Sjp161948 57*2139Sjp161948 *) Removed the macro des_crypt(), as it seems to conflict with some 58*2139Sjp161948 libraries. Use DES_crypt(). 59*2139Sjp161948 [Richard Levitte] 60*2139Sjp161948 61*2139Sjp161948 *) Correct naming of the 'chil' and '4758cca' ENGINEs. This 62*2139Sjp161948 involves renaming the source and generated shared-libs for 63*2139Sjp161948 both. The engines will accept the corrected or legacy ids 64*2139Sjp161948 ('ncipher' and '4758_cca' respectively) when binding. NB, 65*2139Sjp161948 this only applies when building 'shared'. 66*2139Sjp161948 [Corinna Vinschen <vinschen@redhat.com> and Geoff Thorpe] 67*2139Sjp161948 68*2139Sjp161948 *) Add attribute functions to EVP_PKEY structure. Modify 69*2139Sjp161948 PKCS12_create() to recognize a CSP name attribute and 70*2139Sjp161948 use it. Make -CSP option work again in pkcs12 utility. 71*2139Sjp161948 [Steve Henson] 72*2139Sjp161948 73*2139Sjp161948 *) Add new functionality to the bn blinding code: 74*2139Sjp161948 - automatic re-creation of the BN_BLINDING parameters after 75*2139Sjp161948 a fixed number of uses (currently 32) 76*2139Sjp161948 - add new function for parameter creation 77*2139Sjp161948 - introduce flags to control the update behaviour of the 78*2139Sjp161948 BN_BLINDING parameters 79*2139Sjp161948 - hide BN_BLINDING structure 80*2139Sjp161948 Add a second BN_BLINDING slot to the RSA structure to improve 81*2139Sjp161948 performance when a single RSA object is shared among several 82*2139Sjp161948 threads. 83*2139Sjp161948 [Nils Larsch] 84*2139Sjp161948 85*2139Sjp161948 *) Add support for DTLS. 86*2139Sjp161948 [Nagendra Modadugu <nagendra@cs.stanford.edu> and Ben Laurie] 87*2139Sjp161948 88*2139Sjp161948 *) Add support for DER encoded private keys (SSL_FILETYPE_ASN1) 89*2139Sjp161948 to SSL_CTX_use_PrivateKey_file() and SSL_use_PrivateKey_file() 90*2139Sjp161948 [Walter Goulet] 91*2139Sjp161948 92*2139Sjp161948 *) Remove buggy and incompletet DH cert support from 93*2139Sjp161948 ssl/ssl_rsa.c and ssl/s3_both.c 94*2139Sjp161948 [Nils Larsch] 95*2139Sjp161948 96*2139Sjp161948 *) Use SHA-1 instead of MD5 as the default digest algorithm for 97*2139Sjp161948 the apps/openssl applications. 98*2139Sjp161948 [Nils Larsch] 99*2139Sjp161948 100*2139Sjp161948 *) Compile clean with "-Wall -Wmissing-prototypes 101*2139Sjp161948 -Wstrict-prototypes -Wmissing-declarations -Werror". Currently 102*2139Sjp161948 DEBUG_SAFESTACK must also be set. 103*2139Sjp161948 [Ben Laurie] 104*2139Sjp161948 105*2139Sjp161948 *) Change ./Configure so that certain algorithms can be disabled by default. 106*2139Sjp161948 The new counterpiece to "no-xxx" is "enable-xxx". 107*2139Sjp161948 108*2139Sjp161948 The patented RC5 and MDC2 algorithms will now be disabled unless 109*2139Sjp161948 "enable-rc5" and "enable-mdc2", respectively, are specified. 110*2139Sjp161948 111*2139Sjp161948 (IDEA remains enabled despite being patented. This is because IDEA 112*2139Sjp161948 is frequently required for interoperability, and there is no license 113*2139Sjp161948 fee for non-commercial use. As before, "no-idea" can be used to 114*2139Sjp161948 avoid this algorithm.) 115*2139Sjp161948 116*2139Sjp161948 [Bodo Moeller] 117*2139Sjp161948 118*2139Sjp161948 *) Add processing of proxy certificates (see RFC 3820). This work was 119*2139Sjp161948 sponsored by KTH (The Royal Institute of Technology in Stockholm) and 120*2139Sjp161948 EGEE (Enabling Grids for E-science in Europe). 121*2139Sjp161948 [Richard Levitte] 122*2139Sjp161948 123*2139Sjp161948 *) RC4 performance overhaul on modern architectures/implementations, such 124*2139Sjp161948 as Intel P4, IA-64 and AMD64. 125*2139Sjp161948 [Andy Polyakov] 126*2139Sjp161948 127*2139Sjp161948 *) New utility extract-section.pl. This can be used specify an alternative 128*2139Sjp161948 section number in a pod file instead of having to treat each file as 129*2139Sjp161948 a separate case in Makefile. This can be done by adding two lines to the 130*2139Sjp161948 pod file: 131*2139Sjp161948 132*2139Sjp161948 =for comment openssl_section:XXX 133*2139Sjp161948 134*2139Sjp161948 The blank line is mandatory. 135*2139Sjp161948 136*2139Sjp161948 [Steve Henson] 137*2139Sjp161948 138*2139Sjp161948 *) New arguments -certform, -keyform and -pass for s_client and s_server 139*2139Sjp161948 to allow alternative format key and certificate files and passphrase 140*2139Sjp161948 sources. 141*2139Sjp161948 [Steve Henson] 142*2139Sjp161948 143*2139Sjp161948 *) New structure X509_VERIFY_PARAM which combines current verify parameters, 144*2139Sjp161948 update associated structures and add various utility functions. 145*2139Sjp161948 146*2139Sjp161948 Add new policy related verify parameters, include policy checking in 147*2139Sjp161948 standard verify code. Enhance 'smime' application with extra parameters 148*2139Sjp161948 to support policy checking and print out. 149*2139Sjp161948 [Steve Henson] 150*2139Sjp161948 151*2139Sjp161948 *) Add a new engine to support VIA PadLock ACE extensions in the VIA C3 152*2139Sjp161948 Nehemiah processors. These extensions support AES encryption in hardware 153*2139Sjp161948 as well as RNG (though RNG support is currently disabled). 154*2139Sjp161948 [Michal Ludvig <michal@logix.cz>, with help from Andy Polyakov] 155*2139Sjp161948 156*2139Sjp161948 *) Deprecate BN_[get|set]_params() functions (they were ignored internally). 157*2139Sjp161948 [Geoff Thorpe] 158*2139Sjp161948 159*2139Sjp161948 *) New FIPS 180-2 algorithms, SHA-224/-256/-384/-512 are implemented. 160*2139Sjp161948 [Andy Polyakov and a number of other people] 161*2139Sjp161948 162*2139Sjp161948 *) Improved PowerPC platform support. Most notably BIGNUM assembler 163*2139Sjp161948 implementation contributed by IBM. 164*2139Sjp161948 [Suresh Chari, Peter Waltenberg, Andy Polyakov] 165*2139Sjp161948 166*2139Sjp161948 *) The new 'RSA_generate_key_ex' function now takes a BIGNUM for the public 167*2139Sjp161948 exponent rather than 'unsigned long'. There is a corresponding change to 168*2139Sjp161948 the new 'rsa_keygen' element of the RSA_METHOD structure. 169*2139Sjp161948 [Jelte Jansen, Geoff Thorpe] 170*2139Sjp161948 171*2139Sjp161948 *) Functionality for creating the initial serial number file is now 172*2139Sjp161948 moved from CA.pl to the 'ca' utility with a new option -create_serial. 173*2139Sjp161948 174*2139Sjp161948 (Before OpenSSL 0.9.7e, CA.pl used to initialize the serial 175*2139Sjp161948 number file to 1, which is bound to cause problems. To avoid 176*2139Sjp161948 the problems while respecting compatibility between different 0.9.7 177*2139Sjp161948 patchlevels, 0.9.7e employed 'openssl x509 -next_serial' in 178*2139Sjp161948 CA.pl for serial number initialization. With the new release 0.9.8, 179*2139Sjp161948 we can fix the problem directly in the 'ca' utility.) 180*2139Sjp161948 [Steve Henson] 181*2139Sjp161948 182*2139Sjp161948 *) Reduced header interdepencies by declaring more opaque objects in 183*2139Sjp161948 ossl_typ.h. As a consequence, including some headers (eg. engine.h) will 184*2139Sjp161948 give fewer recursive includes, which could break lazy source code - so 185*2139Sjp161948 this change is covered by the OPENSSL_NO_DEPRECATED symbol. As always, 186*2139Sjp161948 developers should define this symbol when building and using openssl to 187*2139Sjp161948 ensure they track the recommended behaviour, interfaces, [etc], but 188*2139Sjp161948 backwards-compatible behaviour prevails when this isn't defined. 189*2139Sjp161948 [Geoff Thorpe] 190*2139Sjp161948 191*2139Sjp161948 *) New function X509_POLICY_NODE_print() which prints out policy nodes. 192*2139Sjp161948 [Steve Henson] 193*2139Sjp161948 194*2139Sjp161948 *) Add new EVP function EVP_CIPHER_CTX_rand_key and associated functionality. 195*2139Sjp161948 This will generate a random key of the appropriate length based on the 196*2139Sjp161948 cipher context. The EVP_CIPHER can provide its own random key generation 197*2139Sjp161948 routine to support keys of a specific form. This is used in the des and 198*2139Sjp161948 3des routines to generate a key of the correct parity. Update S/MIME 199*2139Sjp161948 code to use new functions and hence generate correct parity DES keys. 200*2139Sjp161948 Add EVP_CHECK_DES_KEY #define to return an error if the key is not 201*2139Sjp161948 valid (weak or incorrect parity). 202*2139Sjp161948 [Steve Henson] 203*2139Sjp161948 204*2139Sjp161948 *) Add a local set of CRLs that can be used by X509_verify_cert() as well 205*2139Sjp161948 as looking them up. This is useful when the verified structure may contain 206*2139Sjp161948 CRLs, for example PKCS#7 signedData. Modify PKCS7_verify() to use any CRLs 207*2139Sjp161948 present unless the new PKCS7_NO_CRL flag is asserted. 208*2139Sjp161948 [Steve Henson] 209*2139Sjp161948 210*2139Sjp161948 *) Extend ASN1 oid configuration module. It now additionally accepts the 211*2139Sjp161948 syntax: 212*2139Sjp161948 213*2139Sjp161948 shortName = some long name, 1.2.3.4 214*2139Sjp161948 [Steve Henson] 215*2139Sjp161948 216*2139Sjp161948 *) Reimplemented the BN_CTX implementation. There is now no more static 217*2139Sjp161948 limitation on the number of variables it can handle nor the depth of the 218*2139Sjp161948 "stack" handling for BN_CTX_start()/BN_CTX_end() pairs. The stack 219*2139Sjp161948 information can now expand as required, and rather than having a single 220*2139Sjp161948 static array of bignums, BN_CTX now uses a linked-list of such arrays 221*2139Sjp161948 allowing it to expand on demand whilst maintaining the usefulness of 222*2139Sjp161948 BN_CTX's "bundling". 223*2139Sjp161948 [Geoff Thorpe] 224*2139Sjp161948 225*2139Sjp161948 *) Add a missing BN_CTX parameter to the 'rsa_mod_exp' callback in RSA_METHOD 226*2139Sjp161948 to allow all RSA operations to function using a single BN_CTX. 227*2139Sjp161948 [Geoff Thorpe] 228*2139Sjp161948 229*2139Sjp161948 *) Preliminary support for certificate policy evaluation and checking. This 230*2139Sjp161948 is initially intended to pass the tests outlined in "Conformance Testing 231*2139Sjp161948 of Relying Party Client Certificate Path Processing Logic" v1.07. 232*2139Sjp161948 [Steve Henson] 233*2139Sjp161948 234*2139Sjp161948 *) bn_dup_expand() has been deprecated, it was introduced in 0.9.7 and 235*2139Sjp161948 remained unused and not that useful. A variety of other little bignum 236*2139Sjp161948 tweaks and fixes have also been made continuing on from the audit (see 237*2139Sjp161948 below). 238*2139Sjp161948 [Geoff Thorpe] 239*2139Sjp161948 240*2139Sjp161948 *) Constify all or almost all d2i, c2i, s2i and r2i functions, along with 241*2139Sjp161948 associated ASN1, EVP and SSL functions and old ASN1 macros. 242*2139Sjp161948 [Richard Levitte] 243*2139Sjp161948 244*2139Sjp161948 *) BN_zero() only needs to set 'top' and 'neg' to zero for correct results, 245*2139Sjp161948 and this should never fail. So the return value from the use of 246*2139Sjp161948 BN_set_word() (which can fail due to needless expansion) is now deprecated; 247*2139Sjp161948 if OPENSSL_NO_DEPRECATED is defined, BN_zero() is a void macro. 248*2139Sjp161948 [Geoff Thorpe] 249*2139Sjp161948 250*2139Sjp161948 *) BN_CTX_get() should return zero-valued bignums, providing the same 251*2139Sjp161948 initialised value as BN_new(). 252*2139Sjp161948 [Geoff Thorpe, suggested by Ulf M�ller] 253*2139Sjp161948 254*2139Sjp161948 *) Support for inhibitAnyPolicy certificate extension. 255*2139Sjp161948 [Steve Henson] 256*2139Sjp161948 257*2139Sjp161948 *) An audit of the BIGNUM code is underway, for which debugging code is 258*2139Sjp161948 enabled when BN_DEBUG is defined. This makes stricter enforcements on what 259*2139Sjp161948 is considered valid when processing BIGNUMs, and causes execution to 260*2139Sjp161948 assert() when a problem is discovered. If BN_DEBUG_RAND is defined, 261*2139Sjp161948 further steps are taken to deliberately pollute unused data in BIGNUM 262*2139Sjp161948 structures to try and expose faulty code further on. For now, openssl will 263*2139Sjp161948 (in its default mode of operation) continue to tolerate the inconsistent 264*2139Sjp161948 forms that it has tolerated in the past, but authors and packagers should 265*2139Sjp161948 consider trying openssl and their own applications when compiled with 266*2139Sjp161948 these debugging symbols defined. It will help highlight potential bugs in 267*2139Sjp161948 their own code, and will improve the test coverage for OpenSSL itself. At 268*2139Sjp161948 some point, these tighter rules will become openssl's default to improve 269*2139Sjp161948 maintainability, though the assert()s and other overheads will remain only 270*2139Sjp161948 in debugging configurations. See bn.h for more details. 271*2139Sjp161948 [Geoff Thorpe, Nils Larsch, Ulf M�ller] 272*2139Sjp161948 273*2139Sjp161948 *) BN_CTX_init() has been deprecated, as BN_CTX is an opaque structure 274*2139Sjp161948 that can only be obtained through BN_CTX_new() (which implicitly 275*2139Sjp161948 initialises it). The presence of this function only made it possible 276*2139Sjp161948 to overwrite an existing structure (and cause memory leaks). 277*2139Sjp161948 [Geoff Thorpe] 278*2139Sjp161948 279*2139Sjp161948 *) Because of the callback-based approach for implementing LHASH as a 280*2139Sjp161948 template type, lh_insert() adds opaque objects to hash-tables and 281*2139Sjp161948 lh_doall() or lh_doall_arg() are typically used with a destructor callback 282*2139Sjp161948 to clean up those corresponding objects before destroying the hash table 283*2139Sjp161948 (and losing the object pointers). So some over-zealous constifications in 284*2139Sjp161948 LHASH have been relaxed so that lh_insert() does not take (nor store) the 285*2139Sjp161948 objects as "const" and the lh_doall[_arg] callback wrappers are not 286*2139Sjp161948 prototyped to have "const" restrictions on the object pointers they are 287*2139Sjp161948 given (and so aren't required to cast them away any more). 288*2139Sjp161948 [Geoff Thorpe] 289*2139Sjp161948 290*2139Sjp161948 *) The tmdiff.h API was so ugly and minimal that our own timing utility 291*2139Sjp161948 (speed) prefers to use its own implementation. The two implementations 292*2139Sjp161948 haven't been consolidated as yet (volunteers?) but the tmdiff API has had 293*2139Sjp161948 its object type properly exposed (MS_TM) instead of casting to/from "char 294*2139Sjp161948 *". This may still change yet if someone realises MS_TM and "ms_time_***" 295*2139Sjp161948 aren't necessarily the greatest nomenclatures - but this is what was used 296*2139Sjp161948 internally to the implementation so I've used that for now. 297*2139Sjp161948 [Geoff Thorpe] 298*2139Sjp161948 299*2139Sjp161948 *) Ensure that deprecated functions do not get compiled when 300*2139Sjp161948 OPENSSL_NO_DEPRECATED is defined. Some "openssl" subcommands and a few of 301*2139Sjp161948 the self-tests were still using deprecated key-generation functions so 302*2139Sjp161948 these have been updated also. 303*2139Sjp161948 [Geoff Thorpe] 304*2139Sjp161948 305*2139Sjp161948 *) Reorganise PKCS#7 code to separate the digest location functionality 306*2139Sjp161948 into PKCS7_find_digest(), digest addtion into PKCS7_bio_add_digest(). 307*2139Sjp161948 New function PKCS7_set_digest() to set the digest type for PKCS#7 308*2139Sjp161948 digestedData type. Add additional code to correctly generate the 309*2139Sjp161948 digestedData type and add support for this type in PKCS7 initialization 310*2139Sjp161948 functions. 311*2139Sjp161948 [Steve Henson] 312*2139Sjp161948 313*2139Sjp161948 *) New function PKCS7_set0_type_other() this initializes a PKCS7 314*2139Sjp161948 structure of type "other". 315*2139Sjp161948 [Steve Henson] 316*2139Sjp161948 317*2139Sjp161948 *) Fix prime generation loop in crypto/bn/bn_prime.pl by making 318*2139Sjp161948 sure the loop does correctly stop and breaking ("division by zero") 319*2139Sjp161948 modulus operations are not performed. The (pre-generated) prime 320*2139Sjp161948 table crypto/bn/bn_prime.h was already correct, but it could not be 321*2139Sjp161948 re-generated on some platforms because of the "division by zero" 322*2139Sjp161948 situation in the script. 323*2139Sjp161948 [Ralf S. Engelschall] 324*2139Sjp161948 325*2139Sjp161948 *) Update support for ECC-based TLS ciphersuites according to 326*2139Sjp161948 draft-ietf-tls-ecc-03.txt: the KDF1 key derivation function with 327*2139Sjp161948 SHA-1 now is only used for "small" curves (where the 328*2139Sjp161948 representation of a field element takes up to 24 bytes); for 329*2139Sjp161948 larger curves, the field element resulting from ECDH is directly 330*2139Sjp161948 used as premaster secret. 331*2139Sjp161948 [Douglas Stebila (Sun Microsystems Laboratories)] 332*2139Sjp161948 333*2139Sjp161948 *) Add code for kP+lQ timings to crypto/ec/ectest.c, and add SEC2 334*2139Sjp161948 curve secp160r1 to the tests. 335*2139Sjp161948 [Douglas Stebila (Sun Microsystems Laboratories)] 336*2139Sjp161948 337*2139Sjp161948 *) Add the possibility to load symbols globally with DSO. 338*2139Sjp161948 [G�tz Babin-Ebell <babin-ebell@trustcenter.de> via Richard Levitte] 339*2139Sjp161948 340*2139Sjp161948 *) Add the functions ERR_set_mark() and ERR_pop_to_mark() for better 341*2139Sjp161948 control of the error stack. 342*2139Sjp161948 [Richard Levitte] 343*2139Sjp161948 344*2139Sjp161948 *) Add support for STORE in ENGINE. 345*2139Sjp161948 [Richard Levitte] 346*2139Sjp161948 347*2139Sjp161948 *) Add the STORE type. The intention is to provide a common interface 348*2139Sjp161948 to certificate and key stores, be they simple file-based stores, or 349*2139Sjp161948 HSM-type store, or LDAP stores, or... 350*2139Sjp161948 NOTE: The code is currently UNTESTED and isn't really used anywhere. 351*2139Sjp161948 [Richard Levitte] 352*2139Sjp161948 353*2139Sjp161948 *) Add a generic structure called OPENSSL_ITEM. This can be used to 354*2139Sjp161948 pass a list of arguments to any function as well as provide a way 355*2139Sjp161948 for a function to pass data back to the caller. 356*2139Sjp161948 [Richard Levitte] 357*2139Sjp161948 358*2139Sjp161948 *) Add the functions BUF_strndup() and BUF_memdup(). BUF_strndup() 359*2139Sjp161948 works like BUF_strdup() but can be used to duplicate a portion of 360*2139Sjp161948 a string. The copy gets NUL-terminated. BUF_memdup() duplicates 361*2139Sjp161948 a memory area. 362*2139Sjp161948 [Richard Levitte] 363*2139Sjp161948 364*2139Sjp161948 *) Add the function sk_find_ex() which works like sk_find(), but will 365*2139Sjp161948 return an index to an element even if an exact match couldn't be 366*2139Sjp161948 found. The index is guaranteed to point at the element where the 367*2139Sjp161948 searched-for key would be inserted to preserve sorting order. 368*2139Sjp161948 [Richard Levitte] 369*2139Sjp161948 370*2139Sjp161948 *) Add the function OBJ_bsearch_ex() which works like OBJ_bsearch() but 371*2139Sjp161948 takes an extra flags argument for optional functionality. Currently, 372*2139Sjp161948 the following flags are defined: 373*2139Sjp161948 374*2139Sjp161948 OBJ_BSEARCH_VALUE_ON_NOMATCH 375*2139Sjp161948 This one gets OBJ_bsearch_ex() to return a pointer to the first 376*2139Sjp161948 element where the comparing function returns a negative or zero 377*2139Sjp161948 number. 378*2139Sjp161948 379*2139Sjp161948 OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 380*2139Sjp161948 This one gets OBJ_bsearch_ex() to return a pointer to the first 381*2139Sjp161948 element where the comparing function returns zero. This is useful 382*2139Sjp161948 if there are more than one element where the comparing function 383*2139Sjp161948 returns zero. 384*2139Sjp161948 [Richard Levitte] 385*2139Sjp161948 386*2139Sjp161948 *) Make it possible to create self-signed certificates with 'openssl ca' 387*2139Sjp161948 in such a way that the self-signed certificate becomes part of the 388*2139Sjp161948 CA database and uses the same mechanisms for serial number generation 389*2139Sjp161948 as all other certificate signing. The new flag '-selfsign' enables 390*2139Sjp161948 this functionality. Adapt CA.sh and CA.pl.in. 391*2139Sjp161948 [Richard Levitte] 392*2139Sjp161948 393*2139Sjp161948 *) Add functionality to check the public key of a certificate request 394*2139Sjp161948 against a given private. This is useful to check that a certificate 395*2139Sjp161948 request can be signed by that key (self-signing). 396*2139Sjp161948 [Richard Levitte] 397*2139Sjp161948 398*2139Sjp161948 *) Make it possible to have multiple active certificates with the same 399*2139Sjp161948 subject in the CA index file. This is done only if the keyword 400*2139Sjp161948 'unique_subject' is set to 'no' in the main CA section (default 401*2139Sjp161948 if 'CA_default') of the configuration file. The value is saved 402*2139Sjp161948 with the database itself in a separate index attribute file, 403*2139Sjp161948 named like the index file with '.attr' appended to the name. 404*2139Sjp161948 [Richard Levitte] 405*2139Sjp161948 406*2139Sjp161948 *) Generate muti valued AVAs using '+' notation in config files for 407*2139Sjp161948 req and dirName. 408*2139Sjp161948 [Steve Henson] 409*2139Sjp161948 410*2139Sjp161948 *) Support for nameConstraints certificate extension. 411*2139Sjp161948 [Steve Henson] 412*2139Sjp161948 413*2139Sjp161948 *) Support for policyConstraints certificate extension. 414*2139Sjp161948 [Steve Henson] 415*2139Sjp161948 416*2139Sjp161948 *) Support for policyMappings certificate extension. 417*2139Sjp161948 [Steve Henson] 418*2139Sjp161948 419*2139Sjp161948 *) Make sure the default DSA_METHOD implementation only uses its 420*2139Sjp161948 dsa_mod_exp() and/or bn_mod_exp() handlers if they are non-NULL, 421*2139Sjp161948 and change its own handlers to be NULL so as to remove unnecessary 422*2139Sjp161948 indirection. This lets alternative implementations fallback to the 423*2139Sjp161948 default implementation more easily. 424*2139Sjp161948 [Geoff Thorpe] 425*2139Sjp161948 426*2139Sjp161948 *) Support for directoryName in GeneralName related extensions 427*2139Sjp161948 in config files. 428*2139Sjp161948 [Steve Henson] 429*2139Sjp161948 430*2139Sjp161948 *) Make it possible to link applications using Makefile.shared. 431*2139Sjp161948 Make that possible even when linking against static libraries! 432*2139Sjp161948 [Richard Levitte] 433*2139Sjp161948 434*2139Sjp161948 *) Support for single pass processing for S/MIME signing. This now 435*2139Sjp161948 means that S/MIME signing can be done from a pipe, in addition 436*2139Sjp161948 cleartext signing (multipart/signed type) is effectively streaming 437*2139Sjp161948 and the signed data does not need to be all held in memory. 438*2139Sjp161948 439*2139Sjp161948 This is done with a new flag PKCS7_STREAM. When this flag is set 440*2139Sjp161948 PKCS7_sign() only initializes the PKCS7 structure and the actual signing 441*2139Sjp161948 is done after the data is output (and digests calculated) in 442*2139Sjp161948 SMIME_write_PKCS7(). 443*2139Sjp161948 [Steve Henson] 444*2139Sjp161948 445*2139Sjp161948 *) Add full support for -rpath/-R, both in shared libraries and 446*2139Sjp161948 applications, at least on the platforms where it's known how 447*2139Sjp161948 to do it. 448*2139Sjp161948 [Richard Levitte] 449*2139Sjp161948 450*2139Sjp161948 *) In crypto/ec/ec_mult.c, implement fast point multiplication with 451*2139Sjp161948 precomputation, based on wNAF splitting: EC_GROUP_precompute_mult() 452*2139Sjp161948 will now compute a table of multiples of the generator that 453*2139Sjp161948 makes subsequent invocations of EC_POINTs_mul() or EC_POINT_mul() 454*2139Sjp161948 faster (notably in the case of a single point multiplication, 455*2139Sjp161948 scalar * generator). 456*2139Sjp161948 [Nils Larsch, Bodo Moeller] 457*2139Sjp161948 458*2139Sjp161948 *) IPv6 support for certificate extensions. The various extensions 459*2139Sjp161948 which use the IP:a.b.c.d can now take IPv6 addresses using the 460*2139Sjp161948 formats of RFC1884 2.2 . IPv6 addresses are now also displayed 461*2139Sjp161948 correctly. 462*2139Sjp161948 [Steve Henson] 463*2139Sjp161948 464*2139Sjp161948 *) Added an ENGINE that implements RSA by performing private key 465*2139Sjp161948 exponentiations with the GMP library. The conversions to and from 466*2139Sjp161948 GMP's mpz_t format aren't optimised nor are any montgomery forms 467*2139Sjp161948 cached, and on x86 it appears OpenSSL's own performance has caught up. 468*2139Sjp161948 However there are likely to be other architectures where GMP could 469*2139Sjp161948 provide a boost. This ENGINE is not built in by default, but it can be 470*2139Sjp161948 specified at Configure time and should be accompanied by the necessary 471*2139Sjp161948 linker additions, eg; 472*2139Sjp161948 ./config -DOPENSSL_USE_GMP -lgmp 473*2139Sjp161948 [Geoff Thorpe] 474*2139Sjp161948 475*2139Sjp161948 *) "openssl engine" will not display ENGINE/DSO load failure errors when 476*2139Sjp161948 testing availability of engines with "-t" - the old behaviour is 477*2139Sjp161948 produced by increasing the feature's verbosity with "-tt". 478*2139Sjp161948 [Geoff Thorpe] 479*2139Sjp161948 480*2139Sjp161948 *) ECDSA routines: under certain error conditions uninitialized BN objects 481*2139Sjp161948 could be freed. Solution: make sure initialization is performed early 482*2139Sjp161948 enough. (Reported and fix supplied by Nils Larsch <nla@trustcenter.de> 483*2139Sjp161948 via PR#459) 484*2139Sjp161948 [Lutz Jaenicke] 485*2139Sjp161948 486*2139Sjp161948 *) Key-generation can now be implemented in RSA_METHOD, DSA_METHOD 487*2139Sjp161948 and DH_METHOD (eg. by ENGINE implementations) to override the normal 488*2139Sjp161948 software implementations. For DSA and DH, parameter generation can 489*2139Sjp161948 also be overriden by providing the appropriate method callbacks. 490*2139Sjp161948 [Geoff Thorpe] 491*2139Sjp161948 492*2139Sjp161948 *) Change the "progress" mechanism used in key-generation and 493*2139Sjp161948 primality testing to functions that take a new BN_GENCB pointer in 494*2139Sjp161948 place of callback/argument pairs. The new API functions have "_ex" 495*2139Sjp161948 postfixes and the older functions are reimplemented as wrappers for 496*2139Sjp161948 the new ones. The OPENSSL_NO_DEPRECATED symbol can be used to hide 497*2139Sjp161948 declarations of the old functions to help (graceful) attempts to 498*2139Sjp161948 migrate to the new functions. Also, the new key-generation API 499*2139Sjp161948 functions operate on a caller-supplied key-structure and return 500*2139Sjp161948 success/failure rather than returning a key or NULL - this is to 501*2139Sjp161948 help make "keygen" another member function of RSA_METHOD etc. 502*2139Sjp161948 503*2139Sjp161948 Example for using the new callback interface: 504*2139Sjp161948 505*2139Sjp161948 int (*my_callback)(int a, int b, BN_GENCB *cb) = ...; 506*2139Sjp161948 void *my_arg = ...; 507*2139Sjp161948 BN_GENCB my_cb; 508*2139Sjp161948 509*2139Sjp161948 BN_GENCB_set(&my_cb, my_callback, my_arg); 510*2139Sjp161948 511*2139Sjp161948 return BN_is_prime_ex(some_bignum, BN_prime_checks, NULL, &cb); 512*2139Sjp161948 /* For the meaning of a, b in calls to my_callback(), see the 513*2139Sjp161948 * documentation of the function that calls the callback. 514*2139Sjp161948 * cb will point to my_cb; my_arg can be retrieved as cb->arg. 515*2139Sjp161948 * my_callback should return 1 if it wants BN_is_prime_ex() 516*2139Sjp161948 * to continue, or 0 to stop. 517*2139Sjp161948 */ 518*2139Sjp161948 519*2139Sjp161948 [Geoff Thorpe] 520*2139Sjp161948 521*2139Sjp161948 *) Change the ZLIB compression method to be stateful, and make it 522*2139Sjp161948 available to TLS with the number defined in 523*2139Sjp161948 draft-ietf-tls-compression-04.txt. 524*2139Sjp161948 [Richard Levitte] 525*2139Sjp161948 526*2139Sjp161948 *) Add the ASN.1 structures and functions for CertificatePair, which 527*2139Sjp161948 is defined as follows (according to X.509_4thEditionDraftV6.pdf): 528*2139Sjp161948 529*2139Sjp161948 CertificatePair ::= SEQUENCE { 530*2139Sjp161948 forward [0] Certificate OPTIONAL, 531*2139Sjp161948 reverse [1] Certificate OPTIONAL, 532*2139Sjp161948 -- at least one of the pair shall be present -- } 533*2139Sjp161948 534*2139Sjp161948 Also implement the PEM functions to read and write certificate 535*2139Sjp161948 pairs, and defined the PEM tag as "CERTIFICATE PAIR". 536*2139Sjp161948 537*2139Sjp161948 This needed to be defined, mostly for the sake of the LDAP 538*2139Sjp161948 attribute crossCertificatePair, but may prove useful elsewhere as 539*2139Sjp161948 well. 540*2139Sjp161948 [Richard Levitte] 541*2139Sjp161948 542*2139Sjp161948 *) Make it possible to inhibit symlinking of shared libraries in 543*2139Sjp161948 Makefile.shared, for Cygwin's sake. 544*2139Sjp161948 [Richard Levitte] 545*2139Sjp161948 546*2139Sjp161948 *) Extend the BIGNUM API by creating a function 547*2139Sjp161948 void BN_set_negative(BIGNUM *a, int neg); 548*2139Sjp161948 and a macro that behave like 549*2139Sjp161948 int BN_is_negative(const BIGNUM *a); 550*2139Sjp161948 551*2139Sjp161948 to avoid the need to access 'a->neg' directly in applications. 552*2139Sjp161948 [Nils Larsch] 553*2139Sjp161948 554*2139Sjp161948 *) Implement fast modular reduction for pseudo-Mersenne primes 555*2139Sjp161948 used in NIST curves (crypto/bn/bn_nist.c, crypto/ec/ecp_nist.c). 556*2139Sjp161948 EC_GROUP_new_curve_GFp() will now automatically use this 557*2139Sjp161948 if applicable. 558*2139Sjp161948 [Nils Larsch <nla@trustcenter.de>] 559*2139Sjp161948 560*2139Sjp161948 *) Add new lock type (CRYPTO_LOCK_BN). 561*2139Sjp161948 [Bodo Moeller] 562*2139Sjp161948 563*2139Sjp161948 *) Change the ENGINE framework to automatically load engines 564*2139Sjp161948 dynamically from specific directories unless they could be 565*2139Sjp161948 found to already be built in or loaded. Move all the 566*2139Sjp161948 current engines except for the cryptodev one to a new 567*2139Sjp161948 directory engines/. 568*2139Sjp161948 The engines in engines/ are built as shared libraries if 569*2139Sjp161948 the "shared" options was given to ./Configure or ./config. 570*2139Sjp161948 Otherwise, they are inserted in libcrypto.a. 571*2139Sjp161948 /usr/local/ssl/engines is the default directory for dynamic 572*2139Sjp161948 engines, but that can be overriden at configure time through 573*2139Sjp161948 the usual use of --prefix and/or --openssldir, and at run 574*2139Sjp161948 time with the environment variable OPENSSL_ENGINES. 575*2139Sjp161948 [Geoff Thorpe and Richard Levitte] 576*2139Sjp161948 577*2139Sjp161948 *) Add Makefile.shared, a helper makefile to build shared 578*2139Sjp161948 libraries. Addapt Makefile.org. 579*2139Sjp161948 [Richard Levitte] 580*2139Sjp161948 581*2139Sjp161948 *) Add version info to Win32 DLLs. 582*2139Sjp161948 [Peter 'Luna' Runestig" <peter@runestig.com>] 583*2139Sjp161948 584*2139Sjp161948 *) Add new 'medium level' PKCS#12 API. Certificates and keys 585*2139Sjp161948 can be added using this API to created arbitrary PKCS#12 586*2139Sjp161948 files while avoiding the low level API. 587*2139Sjp161948 588*2139Sjp161948 New options to PKCS12_create(), key or cert can be NULL and 589*2139Sjp161948 will then be omitted from the output file. The encryption 590*2139Sjp161948 algorithm NIDs can be set to -1 for no encryption, the mac 591*2139Sjp161948 iteration count can be set to 0 to omit the mac. 592*2139Sjp161948 593*2139Sjp161948 Enhance pkcs12 utility by making the -nokeys and -nocerts 594*2139Sjp161948 options work when creating a PKCS#12 file. New option -nomac 595*2139Sjp161948 to omit the mac, NONE can be set for an encryption algorithm. 596*2139Sjp161948 New code is modified to use the enhanced PKCS12_create() 597*2139Sjp161948 instead of the low level API. 598*2139Sjp161948 [Steve Henson] 599*2139Sjp161948 600*2139Sjp161948 *) Extend ASN1 encoder to support indefinite length constructed 601*2139Sjp161948 encoding. This can output sequences tags and octet strings in 602*2139Sjp161948 this form. Modify pk7_asn1.c to support indefinite length 603*2139Sjp161948 encoding. This is experimental and needs additional code to 604*2139Sjp161948 be useful, such as an ASN1 bio and some enhanced streaming 605*2139Sjp161948 PKCS#7 code. 606*2139Sjp161948 607*2139Sjp161948 Extend template encode functionality so that tagging is passed 608*2139Sjp161948 down to the template encoder. 609*2139Sjp161948 [Steve Henson] 610*2139Sjp161948 611*2139Sjp161948 *) Let 'openssl req' fail if an argument to '-newkey' is not 612*2139Sjp161948 recognized instead of using RSA as a default. 613*2139Sjp161948 [Bodo Moeller] 614*2139Sjp161948 615*2139Sjp161948 *) Add support for ECC-based ciphersuites from draft-ietf-tls-ecc-01.txt. 616*2139Sjp161948 As these are not official, they are not included in "ALL"; 617*2139Sjp161948 the "ECCdraft" ciphersuite group alias can be used to select them. 618*2139Sjp161948 [Vipul Gupta and Sumit Gupta (Sun Microsystems Laboratories)] 619*2139Sjp161948 620*2139Sjp161948 *) Add ECDH engine support. 621*2139Sjp161948 [Nils Gura and Douglas Stebila (Sun Microsystems Laboratories)] 622*2139Sjp161948 623*2139Sjp161948 *) Add ECDH in new directory crypto/ecdh/. 624*2139Sjp161948 [Douglas Stebila (Sun Microsystems Laboratories)] 625*2139Sjp161948 626*2139Sjp161948 *) Let BN_rand_range() abort with an error after 100 iterations 627*2139Sjp161948 without success (which indicates a broken PRNG). 628*2139Sjp161948 [Bodo Moeller] 629*2139Sjp161948 630*2139Sjp161948 *) Change BN_mod_sqrt() so that it verifies that the input value 631*2139Sjp161948 is really the square of the return value. (Previously, 632*2139Sjp161948 BN_mod_sqrt would show GIGO behaviour.) 633*2139Sjp161948 [Bodo Moeller] 634*2139Sjp161948 635*2139Sjp161948 *) Add named elliptic curves over binary fields from X9.62, SECG, 636*2139Sjp161948 and WAP/WTLS; add OIDs that were still missing. 637*2139Sjp161948 638*2139Sjp161948 [Sheueling Chang Shantz and Douglas Stebila 639*2139Sjp161948 (Sun Microsystems Laboratories)] 640*2139Sjp161948 641*2139Sjp161948 *) Extend the EC library for elliptic curves over binary fields 642*2139Sjp161948 (new files ec2_smpl.c, ec2_smpt.c, ec2_mult.c in crypto/ec/). 643*2139Sjp161948 New EC_METHOD: 644*2139Sjp161948 645*2139Sjp161948 EC_GF2m_simple_method 646*2139Sjp161948 647*2139Sjp161948 New API functions: 648*2139Sjp161948 649*2139Sjp161948 EC_GROUP_new_curve_GF2m 650*2139Sjp161948 EC_GROUP_set_curve_GF2m 651*2139Sjp161948 EC_GROUP_get_curve_GF2m 652*2139Sjp161948 EC_POINT_set_affine_coordinates_GF2m 653*2139Sjp161948 EC_POINT_get_affine_coordinates_GF2m 654*2139Sjp161948 EC_POINT_set_compressed_coordinates_GF2m 655*2139Sjp161948 656*2139Sjp161948 Point compression for binary fields is disabled by default for 657*2139Sjp161948 patent reasons (compile with OPENSSL_EC_BIN_PT_COMP defined to 658*2139Sjp161948 enable it). 659*2139Sjp161948 660*2139Sjp161948 As binary polynomials are represented as BIGNUMs, various members 661*2139Sjp161948 of the EC_GROUP and EC_POINT data structures can be shared 662*2139Sjp161948 between the implementations for prime fields and binary fields; 663*2139Sjp161948 the above ..._GF2m functions (except for EX_GROUP_new_curve_GF2m) 664*2139Sjp161948 are essentially identical to their ..._GFp counterparts. 665*2139Sjp161948 (For simplicity, the '..._GFp' prefix has been dropped from 666*2139Sjp161948 various internal method names.) 667*2139Sjp161948 668*2139Sjp161948 An internal 'field_div' method (similar to 'field_mul' and 669*2139Sjp161948 'field_sqr') has been added; this is used only for binary fields. 670*2139Sjp161948 671*2139Sjp161948 [Sheueling Chang Shantz and Douglas Stebila 672*2139Sjp161948 (Sun Microsystems Laboratories)] 673*2139Sjp161948 674*2139Sjp161948 *) Optionally dispatch EC_POINT_mul(), EC_POINT_precompute_mult() 675*2139Sjp161948 through methods ('mul', 'precompute_mult'). 676*2139Sjp161948 677*2139Sjp161948 The generic implementations (now internally called 'ec_wNAF_mul' 678*2139Sjp161948 and 'ec_wNAF_precomputed_mult') remain the default if these 679*2139Sjp161948 methods are undefined. 680*2139Sjp161948 681*2139Sjp161948 [Sheueling Chang Shantz and Douglas Stebila 682*2139Sjp161948 (Sun Microsystems Laboratories)] 683*2139Sjp161948 684*2139Sjp161948 *) New function EC_GROUP_get_degree, which is defined through 685*2139Sjp161948 EC_METHOD. For curves over prime fields, this returns the bit 686*2139Sjp161948 length of the modulus. 687*2139Sjp161948 688*2139Sjp161948 [Sheueling Chang Shantz and Douglas Stebila 689*2139Sjp161948 (Sun Microsystems Laboratories)] 690*2139Sjp161948 691*2139Sjp161948 *) New functions EC_GROUP_dup, EC_POINT_dup. 692*2139Sjp161948 (These simply call ..._new and ..._copy). 693*2139Sjp161948 694*2139Sjp161948 [Sheueling Chang Shantz and Douglas Stebila 695*2139Sjp161948 (Sun Microsystems Laboratories)] 696*2139Sjp161948 697*2139Sjp161948 *) Add binary polynomial arithmetic software in crypto/bn/bn_gf2m.c. 698*2139Sjp161948 Polynomials are represented as BIGNUMs (where the sign bit is not 699*2139Sjp161948 used) in the following functions [macros]: 700*2139Sjp161948 701*2139Sjp161948 BN_GF2m_add 702*2139Sjp161948 BN_GF2m_sub [= BN_GF2m_add] 703*2139Sjp161948 BN_GF2m_mod [wrapper for BN_GF2m_mod_arr] 704*2139Sjp161948 BN_GF2m_mod_mul [wrapper for BN_GF2m_mod_mul_arr] 705*2139Sjp161948 BN_GF2m_mod_sqr [wrapper for BN_GF2m_mod_sqr_arr] 706*2139Sjp161948 BN_GF2m_mod_inv 707*2139Sjp161948 BN_GF2m_mod_exp [wrapper for BN_GF2m_mod_exp_arr] 708*2139Sjp161948 BN_GF2m_mod_sqrt [wrapper for BN_GF2m_mod_sqrt_arr] 709*2139Sjp161948 BN_GF2m_mod_solve_quad [wrapper for BN_GF2m_mod_solve_quad_arr] 710*2139Sjp161948 BN_GF2m_cmp [= BN_ucmp] 711*2139Sjp161948 712*2139Sjp161948 (Note that only the 'mod' functions are actually for fields GF(2^m). 713*2139Sjp161948 BN_GF2m_add() is misnomer, but this is for the sake of consistency.) 714*2139Sjp161948 715*2139Sjp161948 For some functions, an the irreducible polynomial defining a 716*2139Sjp161948 field can be given as an 'unsigned int[]' with strictly 717*2139Sjp161948 decreasing elements giving the indices of those bits that are set; 718*2139Sjp161948 i.e., p[] represents the polynomial 719*2139Sjp161948 f(t) = t^p[0] + t^p[1] + ... + t^p[k] 720*2139Sjp161948 where 721*2139Sjp161948 p[0] > p[1] > ... > p[k] = 0. 722*2139Sjp161948 This applies to the following functions: 723*2139Sjp161948 724*2139Sjp161948 BN_GF2m_mod_arr 725*2139Sjp161948 BN_GF2m_mod_mul_arr 726*2139Sjp161948 BN_GF2m_mod_sqr_arr 727*2139Sjp161948 BN_GF2m_mod_inv_arr [wrapper for BN_GF2m_mod_inv] 728*2139Sjp161948 BN_GF2m_mod_div_arr [wrapper for BN_GF2m_mod_div] 729*2139Sjp161948 BN_GF2m_mod_exp_arr 730*2139Sjp161948 BN_GF2m_mod_sqrt_arr 731*2139Sjp161948 BN_GF2m_mod_solve_quad_arr 732*2139Sjp161948 BN_GF2m_poly2arr 733*2139Sjp161948 BN_GF2m_arr2poly 734*2139Sjp161948 735*2139Sjp161948 Conversion can be performed by the following functions: 736*2139Sjp161948 737*2139Sjp161948 BN_GF2m_poly2arr 738*2139Sjp161948 BN_GF2m_arr2poly 739*2139Sjp161948 740*2139Sjp161948 bntest.c has additional tests for binary polynomial arithmetic. 741*2139Sjp161948 742*2139Sjp161948 Two implementations for BN_GF2m_mod_div() are available. 743*2139Sjp161948 The default algorithm simply uses BN_GF2m_mod_inv() and 744*2139Sjp161948 BN_GF2m_mod_mul(). The alternative algorithm is compiled in only 745*2139Sjp161948 if OPENSSL_SUN_GF2M_DIV is defined (patent pending; read the 746*2139Sjp161948 copyright notice in crypto/bn/bn_gf2m.c before enabling it). 747*2139Sjp161948 748*2139Sjp161948 [Sheueling Chang Shantz and Douglas Stebila 749*2139Sjp161948 (Sun Microsystems Laboratories)] 750*2139Sjp161948 751*2139Sjp161948 *) Add new error code 'ERR_R_DISABLED' that can be used when some 752*2139Sjp161948 functionality is disabled at compile-time. 753*2139Sjp161948 [Douglas Stebila <douglas.stebila@sun.com>] 754*2139Sjp161948 755*2139Sjp161948 *) Change default behaviour of 'openssl asn1parse' so that more 756*2139Sjp161948 information is visible when viewing, e.g., a certificate: 757*2139Sjp161948 758*2139Sjp161948 Modify asn1_parse2 (crypto/asn1/asn1_par.c) so that in non-'dump' 759*2139Sjp161948 mode the content of non-printable OCTET STRINGs is output in a 760*2139Sjp161948 style similar to INTEGERs, but with '[HEX DUMP]' prepended to 761*2139Sjp161948 avoid the appearance of a printable string. 762*2139Sjp161948 [Nils Larsch <nla@trustcenter.de>] 763*2139Sjp161948 764*2139Sjp161948 *) Add 'asn1_flag' and 'asn1_form' member to EC_GROUP with access 765*2139Sjp161948 functions 766*2139Sjp161948 EC_GROUP_set_asn1_flag() 767*2139Sjp161948 EC_GROUP_get_asn1_flag() 768*2139Sjp161948 EC_GROUP_set_point_conversion_form() 769*2139Sjp161948 EC_GROUP_get_point_conversion_form() 770*2139Sjp161948 These control ASN1 encoding details: 771*2139Sjp161948 - Curves (i.e., groups) are encoded explicitly unless asn1_flag 772*2139Sjp161948 has been set to OPENSSL_EC_NAMED_CURVE. 773*2139Sjp161948 - Points are encoded in uncompressed form by default; options for 774*2139Sjp161948 asn1_for are as for point2oct, namely 775*2139Sjp161948 POINT_CONVERSION_COMPRESSED 776*2139Sjp161948 POINT_CONVERSION_UNCOMPRESSED 777*2139Sjp161948 POINT_CONVERSION_HYBRID 778*2139Sjp161948 779*2139Sjp161948 Also add 'seed' and 'seed_len' members to EC_GROUP with access 780*2139Sjp161948 functions 781*2139Sjp161948 EC_GROUP_set_seed() 782*2139Sjp161948 EC_GROUP_get0_seed() 783*2139Sjp161948 EC_GROUP_get_seed_len() 784*2139Sjp161948 This is used only for ASN1 purposes (so far). 785*2139Sjp161948 [Nils Larsch <nla@trustcenter.de>] 786*2139Sjp161948 787*2139Sjp161948 *) Add 'field_type' member to EC_METHOD, which holds the NID 788*2139Sjp161948 of the appropriate field type OID. The new function 789*2139Sjp161948 EC_METHOD_get_field_type() returns this value. 790*2139Sjp161948 [Nils Larsch <nla@trustcenter.de>] 791*2139Sjp161948 792*2139Sjp161948 *) Add functions 793*2139Sjp161948 EC_POINT_point2bn() 794*2139Sjp161948 EC_POINT_bn2point() 795*2139Sjp161948 EC_POINT_point2hex() 796*2139Sjp161948 EC_POINT_hex2point() 797*2139Sjp161948 providing useful interfaces to EC_POINT_point2oct() and 798*2139Sjp161948 EC_POINT_oct2point(). 799*2139Sjp161948 [Nils Larsch <nla@trustcenter.de>] 800*2139Sjp161948 801*2139Sjp161948 *) Change internals of the EC library so that the functions 802*2139Sjp161948 EC_GROUP_set_generator() 803*2139Sjp161948 EC_GROUP_get_generator() 804*2139Sjp161948 EC_GROUP_get_order() 805*2139Sjp161948 EC_GROUP_get_cofactor() 806*2139Sjp161948 are implemented directly in crypto/ec/ec_lib.c and not dispatched 807*2139Sjp161948 to methods, which would lead to unnecessary code duplication when 808*2139Sjp161948 adding different types of curves. 809*2139Sjp161948 [Nils Larsch <nla@trustcenter.de> with input by Bodo Moeller] 810*2139Sjp161948 811*2139Sjp161948 *) Implement compute_wNAF (crypto/ec/ec_mult.c) without BIGNUM 812*2139Sjp161948 arithmetic, and such that modified wNAFs are generated 813*2139Sjp161948 (which avoid length expansion in many cases). 814*2139Sjp161948 [Bodo Moeller] 815*2139Sjp161948 816*2139Sjp161948 *) Add a function EC_GROUP_check_discriminant() (defined via 817*2139Sjp161948 EC_METHOD) that verifies that the curve discriminant is non-zero. 818*2139Sjp161948 819*2139Sjp161948 Add a function EC_GROUP_check() that makes some sanity tests 820*2139Sjp161948 on a EC_GROUP, its generator and order. This includes 821*2139Sjp161948 EC_GROUP_check_discriminant(). 822*2139Sjp161948 [Nils Larsch <nla@trustcenter.de>] 823*2139Sjp161948 824*2139Sjp161948 *) Add ECDSA in new directory crypto/ecdsa/. 825*2139Sjp161948 826*2139Sjp161948 Add applications 'openssl ecparam' and 'openssl ecdsa' 827*2139Sjp161948 (these are based on 'openssl dsaparam' and 'openssl dsa'). 828*2139Sjp161948 829*2139Sjp161948 ECDSA support is also included in various other files across the 830*2139Sjp161948 library. Most notably, 831*2139Sjp161948 - 'openssl req' now has a '-newkey ecdsa:file' option; 832*2139Sjp161948 - EVP_PKCS82PKEY (crypto/evp/evp_pkey.c) now can handle ECDSA; 833*2139Sjp161948 - X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and 834*2139Sjp161948 d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make 835*2139Sjp161948 them suitable for ECDSA where domain parameters must be 836*2139Sjp161948 extracted before the specific public key; 837*2139Sjp161948 - ECDSA engine support has been added. 838*2139Sjp161948 [Nils Larsch <nla@trustcenter.de>] 839*2139Sjp161948 840*2139Sjp161948 *) Include some named elliptic curves, and add OIDs from X9.62, 841*2139Sjp161948 SECG, and WAP/WTLS. Each curve can be obtained from the new 842*2139Sjp161948 function 843*2139Sjp161948 EC_GROUP_new_by_curve_name(), 844*2139Sjp161948 and the list of available named curves can be obtained with 845*2139Sjp161948 EC_get_builtin_curves(). 846*2139Sjp161948 Also add a 'curve_name' member to EC_GROUP objects, which can be 847*2139Sjp161948 accessed via 848*2139Sjp161948 EC_GROUP_set_curve_name() 849*2139Sjp161948 EC_GROUP_get_curve_name() 850*2139Sjp161948 [Nils Larsch <larsch@trustcenter.de, Bodo Moeller] 851*2139Sjp161948 852*2139Sjp161948 *) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there 853*2139Sjp161948 was actually never needed) and in BN_mul(). The removal in BN_mul() 854*2139Sjp161948 required a small change in bn_mul_part_recursive() and the addition 855*2139Sjp161948 of the functions bn_cmp_part_words(), bn_sub_part_words() and 856*2139Sjp161948 bn_add_part_words(), which do the same thing as bn_cmp_words(), 857*2139Sjp161948 bn_sub_words() and bn_add_words() except they take arrays with 858*2139Sjp161948 differing sizes. 859*2139Sjp161948 [Richard Levitte] 860*2139Sjp161948 861*2139Sjp161948 Changes between 0.9.7g and 0.9.7h [11 Oct 2005] 862*2139Sjp161948 863*2139Sjp161948 *) Remove the functionality of SSL_OP_MSIE_SSLV2_RSA_PADDING 864*2139Sjp161948 (part of SSL_OP_ALL). This option used to disable the 865*2139Sjp161948 countermeasure against man-in-the-middle protocol-version 866*2139Sjp161948 rollback in the SSL 2.0 server implementation, which is a bad 867*2139Sjp161948 idea. 868*2139Sjp161948 869*2139Sjp161948 [Bodo Moeller; problem pointed out by Yutaka Oiwa (Research Center 870*2139Sjp161948 for Information Security, National Institute of Advanced Industrial 871*2139Sjp161948 Science and Technology [AIST], Japan)] 872*2139Sjp161948 873*2139Sjp161948 *) Minimal support for X9.31 signatures and PSS padding modes. This is 874*2139Sjp161948 mainly for FIPS compliance and not fully integrated at this stage. 875*2139Sjp161948 [Steve Henson] 876*2139Sjp161948 877*2139Sjp161948 *) For DSA signing, unless DSA_FLAG_NO_EXP_CONSTTIME is set, perform 878*2139Sjp161948 the exponentiation using a fixed-length exponent. (Otherwise, 879*2139Sjp161948 the information leaked through timing could expose the secret key 880*2139Sjp161948 after many signatures; cf. Bleichenbacher's attack on DSA with 881*2139Sjp161948 biased k.) 882*2139Sjp161948 [Bodo Moeller] 883*2139Sjp161948 884*2139Sjp161948 *) Make a new fixed-window mod_exp implementation the default for 885*2139Sjp161948 RSA, DSA, and DH private-key operations so that the sequence of 886*2139Sjp161948 squares and multiplies and the memory access pattern are 887*2139Sjp161948 independent of the particular secret key. This will mitigate 888*2139Sjp161948 cache-timing and potential related attacks. 889*2139Sjp161948 890*2139Sjp161948 BN_mod_exp_mont_consttime() is the new exponentiation implementation, 891*2139Sjp161948 and this is automatically used by BN_mod_exp_mont() if the new flag 892*2139Sjp161948 BN_FLG_EXP_CONSTTIME is set for the exponent. RSA, DSA, and DH 893*2139Sjp161948 will use this BN flag for private exponents unless the flag 894*2139Sjp161948 RSA_FLAG_NO_EXP_CONSTTIME, DSA_FLAG_NO_EXP_CONSTTIME, or 895*2139Sjp161948 DH_FLAG_NO_EXP_CONSTTIME, respectively, is set. 896*2139Sjp161948 897*2139Sjp161948 [Matthew D Wood (Intel Corp), with some changes by Bodo Moeller] 898*2139Sjp161948 899*2139Sjp161948 *) Change the client implementation for SSLv23_method() and 900*2139Sjp161948 SSLv23_client_method() so that is uses the SSL 3.0/TLS 1.0 901*2139Sjp161948 Client Hello message format if the SSL_OP_NO_SSLv2 option is set. 902*2139Sjp161948 (Previously, the SSL 2.0 backwards compatible Client Hello 903*2139Sjp161948 message format would be used even with SSL_OP_NO_SSLv2.) 904*2139Sjp161948 [Bodo Moeller] 905*2139Sjp161948 906*2139Sjp161948 *) Add support for smime-type MIME parameter in S/MIME messages which some 907*2139Sjp161948 clients need. 908*2139Sjp161948 [Steve Henson] 909*2139Sjp161948 910*2139Sjp161948 *) New function BN_MONT_CTX_set_locked() to set montgomery parameters in 911*2139Sjp161948 a threadsafe manner. Modify rsa code to use new function and add calls 912*2139Sjp161948 to dsa and dh code (which had race conditions before). 913*2139Sjp161948 [Steve Henson] 914*2139Sjp161948 915*2139Sjp161948 *) Include the fixed error library code in the C error file definitions 916*2139Sjp161948 instead of fixing them up at runtime. This keeps the error code 917*2139Sjp161948 structures constant. 918*2139Sjp161948 [Steve Henson] 919*2139Sjp161948 920*2139Sjp161948 Changes between 0.9.7f and 0.9.7g [11 Apr 2005] 921*2139Sjp161948 922*2139Sjp161948 [NB: OpenSSL 0.9.7h and later 0.9.7 patch levels were released after 923*2139Sjp161948 OpenSSL 0.9.8.] 924*2139Sjp161948 925*2139Sjp161948 *) Fixes for newer kerberos headers. NB: the casts are needed because 926*2139Sjp161948 the 'length' field is signed on one version and unsigned on another 927*2139Sjp161948 with no (?) obvious way to tell the difference, without these VC++ 928*2139Sjp161948 complains. Also the "definition" of FAR (blank) is no longer included 929*2139Sjp161948 nor is the error ENOMEM. KRB5_PRIVATE has to be set to 1 to pick up 930*2139Sjp161948 some needed definitions. 931*2139Sjp161948 [Steve Henson] 932*2139Sjp161948 933*2139Sjp161948 *) Undo Cygwin change. 934*2139Sjp161948 [Ulf M�ller] 935*2139Sjp161948 936*2139Sjp161948 *) Added support for proxy certificates according to RFC 3820. 937*2139Sjp161948 Because they may be a security thread to unaware applications, 938*2139Sjp161948 they must be explicitely allowed in run-time. See 939*2139Sjp161948 docs/HOWTO/proxy_certificates.txt for further information. 940*2139Sjp161948 [Richard Levitte] 941*2139Sjp161948 942*2139Sjp161948 Changes between 0.9.7e and 0.9.7f [22 Mar 2005] 943*2139Sjp161948 944*2139Sjp161948 *) Use (SSL_RANDOM_VALUE - 4) bytes of pseudo random data when generating 945*2139Sjp161948 server and client random values. Previously 946*2139Sjp161948 (SSL_RANDOM_VALUE - sizeof(time_t)) would be used which would result in 947*2139Sjp161948 less random data when sizeof(time_t) > 4 (some 64 bit platforms). 948*2139Sjp161948 949*2139Sjp161948 This change has negligible security impact because: 950*2139Sjp161948 951*2139Sjp161948 1. Server and client random values still have 24 bytes of pseudo random 952*2139Sjp161948 data. 953*2139Sjp161948 954*2139Sjp161948 2. Server and client random values are sent in the clear in the initial 955*2139Sjp161948 handshake. 956*2139Sjp161948 957*2139Sjp161948 3. The master secret is derived using the premaster secret (48 bytes in 958*2139Sjp161948 size for static RSA ciphersuites) as well as client server and random 959*2139Sjp161948 values. 960*2139Sjp161948 961*2139Sjp161948 The OpenSSL team would like to thank the UK NISCC for bringing this issue 962*2139Sjp161948 to our attention. 963*2139Sjp161948 964*2139Sjp161948 [Stephen Henson, reported by UK NISCC] 965*2139Sjp161948 966*2139Sjp161948 *) Use Windows randomness collection on Cygwin. 967*2139Sjp161948 [Ulf M�ller] 968*2139Sjp161948 969*2139Sjp161948 *) Fix hang in EGD/PRNGD query when communication socket is closed 970*2139Sjp161948 prematurely by EGD/PRNGD. 971*2139Sjp161948 [Darren Tucker <dtucker@zip.com.au> via Lutz J�nicke, resolves #1014] 972*2139Sjp161948 973*2139Sjp161948 *) Prompt for pass phrases when appropriate for PKCS12 input format. 974*2139Sjp161948 [Steve Henson] 975*2139Sjp161948 976*2139Sjp161948 *) Back-port of selected performance improvements from development 977*2139Sjp161948 branch, as well as improved support for PowerPC platforms. 978*2139Sjp161948 [Andy Polyakov] 979*2139Sjp161948 980*2139Sjp161948 *) Add lots of checks for memory allocation failure, error codes to indicate 981*2139Sjp161948 failure and freeing up memory if a failure occurs. 982*2139Sjp161948 [Nauticus Networks SSL Team <openssl@nauticusnet.com>, Steve Henson] 983*2139Sjp161948 984*2139Sjp161948 *) Add new -passin argument to dgst. 985*2139Sjp161948 [Steve Henson] 986*2139Sjp161948 987*2139Sjp161948 *) Perform some character comparisons of different types in X509_NAME_cmp: 988*2139Sjp161948 this is needed for some certificates that reencode DNs into UTF8Strings 989*2139Sjp161948 (in violation of RFC3280) and can't or wont issue name rollover 990*2139Sjp161948 certificates. 991*2139Sjp161948 [Steve Henson] 992*2139Sjp161948 993*2139Sjp161948 *) Make an explicit check during certificate validation to see that 994*2139Sjp161948 the CA setting in each certificate on the chain is correct. As a 995*2139Sjp161948 side effect always do the following basic checks on extensions, 996*2139Sjp161948 not just when there's an associated purpose to the check: 997*2139Sjp161948 998*2139Sjp161948 - if there is an unhandled critical extension (unless the user 999*2139Sjp161948 has chosen to ignore this fault) 1000*2139Sjp161948 - if the path length has been exceeded (if one is set at all) 1001*2139Sjp161948 - that certain extensions fit the associated purpose (if one has 1002*2139Sjp161948 been given) 1003*2139Sjp161948 [Richard Levitte] 1004*2139Sjp161948 1005*2139Sjp161948 Changes between 0.9.7d and 0.9.7e [25 Oct 2004] 1006*2139Sjp161948 1007*2139Sjp161948 *) Avoid a race condition when CRLs are checked in a multi threaded 1008*2139Sjp161948 environment. This would happen due to the reordering of the revoked 1009*2139Sjp161948 entries during signature checking and serial number lookup. Now the 1010*2139Sjp161948 encoding is cached and the serial number sort performed under a lock. 1011*2139Sjp161948 Add new STACK function sk_is_sorted(). 1012*2139Sjp161948 [Steve Henson] 1013*2139Sjp161948 1014*2139Sjp161948 *) Add Delta CRL to the extension code. 1015*2139Sjp161948 [Steve Henson] 1016*2139Sjp161948 1017*2139Sjp161948 *) Various fixes to s3_pkt.c so alerts are sent properly. 1018*2139Sjp161948 [David Holmes <d.holmes@f5.com>] 1019*2139Sjp161948 1020*2139Sjp161948 *) Reduce the chances of duplicate issuer name and serial numbers (in 1021*2139Sjp161948 violation of RFC3280) using the OpenSSL certificate creation utilities. 1022*2139Sjp161948 This is done by creating a random 64 bit value for the initial serial 1023*2139Sjp161948 number when a serial number file is created or when a self signed 1024*2139Sjp161948 certificate is created using 'openssl req -x509'. The initial serial 1025*2139Sjp161948 number file is created using 'openssl x509 -next_serial' in CA.pl 1026*2139Sjp161948 rather than being initialized to 1. 1027*2139Sjp161948 [Steve Henson] 1028*2139Sjp161948 10290Sstevel@tonic-gate Changes between 0.9.7c and 0.9.7d [17 Mar 2004] 10300Sstevel@tonic-gate 10310Sstevel@tonic-gate *) Fix null-pointer assignment in do_change_cipher_spec() revealed 10320Sstevel@tonic-gate by using the Codenomicon TLS Test Tool (CAN-2004-0079) 10330Sstevel@tonic-gate [Joe Orton, Steve Henson] 10340Sstevel@tonic-gate 10350Sstevel@tonic-gate *) Fix flaw in SSL/TLS handshaking when using Kerberos ciphersuites 10360Sstevel@tonic-gate (CAN-2004-0112) 10370Sstevel@tonic-gate [Joe Orton, Steve Henson] 10380Sstevel@tonic-gate 10390Sstevel@tonic-gate *) Make it possible to have multiple active certificates with the same 10400Sstevel@tonic-gate subject in the CA index file. This is done only if the keyword 10410Sstevel@tonic-gate 'unique_subject' is set to 'no' in the main CA section (default 10420Sstevel@tonic-gate if 'CA_default') of the configuration file. The value is saved 10430Sstevel@tonic-gate with the database itself in a separate index attribute file, 10440Sstevel@tonic-gate named like the index file with '.attr' appended to the name. 10450Sstevel@tonic-gate [Richard Levitte] 10460Sstevel@tonic-gate 10470Sstevel@tonic-gate *) X509 verify fixes. Disable broken certificate workarounds when 10480Sstevel@tonic-gate X509_V_FLAGS_X509_STRICT is set. Check CRL issuer has cRLSign set if 10490Sstevel@tonic-gate keyUsage extension present. Don't accept CRLs with unhandled critical 10500Sstevel@tonic-gate extensions: since verify currently doesn't process CRL extensions this 10510Sstevel@tonic-gate rejects a CRL with *any* critical extensions. Add new verify error codes 10520Sstevel@tonic-gate for these cases. 10530Sstevel@tonic-gate [Steve Henson] 10540Sstevel@tonic-gate 10550Sstevel@tonic-gate *) When creating an OCSP nonce use an OCTET STRING inside the extnValue. 10560Sstevel@tonic-gate A clarification of RFC2560 will require the use of OCTET STRINGs and 10570Sstevel@tonic-gate some implementations cannot handle the current raw format. Since OpenSSL 10580Sstevel@tonic-gate copies and compares OCSP nonces as opaque blobs without any attempt at 10590Sstevel@tonic-gate parsing them this should not create any compatibility issues. 10600Sstevel@tonic-gate [Steve Henson] 10610Sstevel@tonic-gate 10620Sstevel@tonic-gate *) New md flag EVP_MD_CTX_FLAG_REUSE this allows md_data to be reused when 10630Sstevel@tonic-gate calling EVP_MD_CTX_copy_ex() to avoid calling OPENSSL_malloc(). Without 10640Sstevel@tonic-gate this HMAC (and other) operations are several times slower than OpenSSL 10650Sstevel@tonic-gate < 0.9.7. 10660Sstevel@tonic-gate [Steve Henson] 10670Sstevel@tonic-gate 10680Sstevel@tonic-gate *) Print out GeneralizedTime and UTCTime in ASN1_STRING_print_ex(). 10690Sstevel@tonic-gate [Peter Sylvester <Peter.Sylvester@EdelWeb.fr>] 10700Sstevel@tonic-gate 10710Sstevel@tonic-gate *) Use the correct content when signing type "other". 10720Sstevel@tonic-gate [Steve Henson] 10730Sstevel@tonic-gate 10740Sstevel@tonic-gate Changes between 0.9.7b and 0.9.7c [30 Sep 2003] 10750Sstevel@tonic-gate 10760Sstevel@tonic-gate *) Fix various bugs revealed by running the NISCC test suite: 10770Sstevel@tonic-gate 10780Sstevel@tonic-gate Stop out of bounds reads in the ASN1 code when presented with 10790Sstevel@tonic-gate invalid tags (CAN-2003-0543 and CAN-2003-0544). 10800Sstevel@tonic-gate 10810Sstevel@tonic-gate Free up ASN1_TYPE correctly if ANY type is invalid (CAN-2003-0545). 10820Sstevel@tonic-gate 10830Sstevel@tonic-gate If verify callback ignores invalid public key errors don't try to check 10840Sstevel@tonic-gate certificate signature with the NULL public key. 10850Sstevel@tonic-gate 10860Sstevel@tonic-gate [Steve Henson] 10870Sstevel@tonic-gate 10880Sstevel@tonic-gate *) New -ignore_err option in ocsp application to stop the server 10890Sstevel@tonic-gate exiting on the first error in a request. 10900Sstevel@tonic-gate [Steve Henson] 10910Sstevel@tonic-gate 10920Sstevel@tonic-gate *) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate 10930Sstevel@tonic-gate if the server requested one: as stated in TLS 1.0 and SSL 3.0 10940Sstevel@tonic-gate specifications. 10950Sstevel@tonic-gate [Steve Henson] 10960Sstevel@tonic-gate 10970Sstevel@tonic-gate *) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional 10980Sstevel@tonic-gate extra data after the compression methods not only for TLS 1.0 10990Sstevel@tonic-gate but also for SSL 3.0 (as required by the specification). 11000Sstevel@tonic-gate [Bodo Moeller; problem pointed out by Matthias Loepfe] 11010Sstevel@tonic-gate 11020Sstevel@tonic-gate *) Change X509_certificate_type() to mark the key as exported/exportable 11030Sstevel@tonic-gate when it's 512 *bits* long, not 512 bytes. 11040Sstevel@tonic-gate [Richard Levitte] 11050Sstevel@tonic-gate 11060Sstevel@tonic-gate *) Change AES_cbc_encrypt() so it outputs exact multiple of 11070Sstevel@tonic-gate blocks during encryption. 11080Sstevel@tonic-gate [Richard Levitte] 11090Sstevel@tonic-gate 11100Sstevel@tonic-gate *) Various fixes to base64 BIO and non blocking I/O. On write 11110Sstevel@tonic-gate flushes were not handled properly if the BIO retried. On read 11120Sstevel@tonic-gate data was not being buffered properly and had various logic bugs. 11130Sstevel@tonic-gate This also affects blocking I/O when the data being decoded is a 11140Sstevel@tonic-gate certain size. 11150Sstevel@tonic-gate [Steve Henson] 11160Sstevel@tonic-gate 11170Sstevel@tonic-gate *) Various S/MIME bugfixes and compatibility changes: 11180Sstevel@tonic-gate output correct application/pkcs7 MIME type if 11190Sstevel@tonic-gate PKCS7_NOOLDMIMETYPE is set. Tolerate some broken signatures. 11200Sstevel@tonic-gate Output CR+LF for EOL if PKCS7_CRLFEOL is set (this makes opening 11210Sstevel@tonic-gate of files as .eml work). Correctly handle very long lines in MIME 11220Sstevel@tonic-gate parser. 11230Sstevel@tonic-gate [Steve Henson] 11240Sstevel@tonic-gate 11250Sstevel@tonic-gate Changes between 0.9.7a and 0.9.7b [10 Apr 2003] 11260Sstevel@tonic-gate 11270Sstevel@tonic-gate *) Countermeasure against the Klima-Pokorny-Rosa extension of 11280Sstevel@tonic-gate Bleichbacher's attack on PKCS #1 v1.5 padding: treat 11290Sstevel@tonic-gate a protocol version number mismatch like a decryption error 11300Sstevel@tonic-gate in ssl3_get_client_key_exchange (ssl/s3_srvr.c). 11310Sstevel@tonic-gate [Bodo Moeller] 11320Sstevel@tonic-gate 11330Sstevel@tonic-gate *) Turn on RSA blinding by default in the default implementation 11340Sstevel@tonic-gate to avoid a timing attack. Applications that don't want it can call 11350Sstevel@tonic-gate RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING. 11360Sstevel@tonic-gate They would be ill-advised to do so in most cases. 11370Sstevel@tonic-gate [Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller] 11380Sstevel@tonic-gate 11390Sstevel@tonic-gate *) Change RSA blinding code so that it works when the PRNG is not 11400Sstevel@tonic-gate seeded (in this case, the secret RSA exponent is abused as 11410Sstevel@tonic-gate an unpredictable seed -- if it is not unpredictable, there 11420Sstevel@tonic-gate is no point in blinding anyway). Make RSA blinding thread-safe 11430Sstevel@tonic-gate by remembering the creator's thread ID in rsa->blinding and 11440Sstevel@tonic-gate having all other threads use local one-time blinding factors 11450Sstevel@tonic-gate (this requires more computation than sharing rsa->blinding, but 11460Sstevel@tonic-gate avoids excessive locking; and if an RSA object is not shared 11470Sstevel@tonic-gate between threads, blinding will still be very fast). 11480Sstevel@tonic-gate [Bodo Moeller] 11490Sstevel@tonic-gate 11500Sstevel@tonic-gate *) Fixed a typo bug that would cause ENGINE_set_default() to set an 11510Sstevel@tonic-gate ENGINE as defaults for all supported algorithms irrespective of 11520Sstevel@tonic-gate the 'flags' parameter. 'flags' is now honoured, so applications 11530Sstevel@tonic-gate should make sure they are passing it correctly. 11540Sstevel@tonic-gate [Geoff Thorpe] 11550Sstevel@tonic-gate 11560Sstevel@tonic-gate *) Target "mingw" now allows native Windows code to be generated in 11570Sstevel@tonic-gate the Cygwin environment as well as with the MinGW compiler. 11580Sstevel@tonic-gate [Ulf Moeller] 11590Sstevel@tonic-gate 11600Sstevel@tonic-gate Changes between 0.9.7 and 0.9.7a [19 Feb 2003] 11610Sstevel@tonic-gate 11620Sstevel@tonic-gate *) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked 11630Sstevel@tonic-gate via timing by performing a MAC computation even if incorrrect 11640Sstevel@tonic-gate block cipher padding has been found. This is a countermeasure 11650Sstevel@tonic-gate against active attacks where the attacker has to distinguish 11660Sstevel@tonic-gate between bad padding and a MAC verification error. (CAN-2003-0078) 11670Sstevel@tonic-gate 11680Sstevel@tonic-gate [Bodo Moeller; problem pointed out by Brice Canvel (EPFL), 11690Sstevel@tonic-gate Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and 11700Sstevel@tonic-gate Martin Vuagnoux (EPFL, Ilion)] 11710Sstevel@tonic-gate 11720Sstevel@tonic-gate *) Make the no-err option work as intended. The intention with no-err 11730Sstevel@tonic-gate is not to have the whole error stack handling routines removed from 11740Sstevel@tonic-gate libcrypto, it's only intended to remove all the function name and 11750Sstevel@tonic-gate reason texts, thereby removing some of the footprint that may not 11760Sstevel@tonic-gate be interesting if those errors aren't displayed anyway. 11770Sstevel@tonic-gate 11780Sstevel@tonic-gate NOTE: it's still possible for any application or module to have it's 11790Sstevel@tonic-gate own set of error texts inserted. The routines are there, just not 11800Sstevel@tonic-gate used by default when no-err is given. 11810Sstevel@tonic-gate [Richard Levitte] 11820Sstevel@tonic-gate 11830Sstevel@tonic-gate *) Add support for FreeBSD on IA64. 11840Sstevel@tonic-gate [dirk.meyer@dinoex.sub.org via Richard Levitte, resolves #454] 11850Sstevel@tonic-gate 11860Sstevel@tonic-gate *) Adjust DES_cbc_cksum() so it returns the same value as the MIT 11870Sstevel@tonic-gate Kerberos function mit_des_cbc_cksum(). Before this change, 11880Sstevel@tonic-gate the value returned by DES_cbc_cksum() was like the one from 11890Sstevel@tonic-gate mit_des_cbc_cksum(), except the bytes were swapped. 11900Sstevel@tonic-gate [Kevin Greaney <Kevin.Greaney@hp.com> and Richard Levitte] 11910Sstevel@tonic-gate 11920Sstevel@tonic-gate *) Allow an application to disable the automatic SSL chain building. 11930Sstevel@tonic-gate Before this a rather primitive chain build was always performed in 11940Sstevel@tonic-gate ssl3_output_cert_chain(): an application had no way to send the 11950Sstevel@tonic-gate correct chain if the automatic operation produced an incorrect result. 11960Sstevel@tonic-gate 11970Sstevel@tonic-gate Now the chain builder is disabled if either: 11980Sstevel@tonic-gate 11990Sstevel@tonic-gate 1. Extra certificates are added via SSL_CTX_add_extra_chain_cert(). 12000Sstevel@tonic-gate 12010Sstevel@tonic-gate 2. The mode flag SSL_MODE_NO_AUTO_CHAIN is set. 12020Sstevel@tonic-gate 12030Sstevel@tonic-gate The reasoning behind this is that an application would not want the 12040Sstevel@tonic-gate auto chain building to take place if extra chain certificates are 12050Sstevel@tonic-gate present and it might also want a means of sending no additional 12060Sstevel@tonic-gate certificates (for example the chain has two certificates and the 12070Sstevel@tonic-gate root is omitted). 12080Sstevel@tonic-gate [Steve Henson] 12090Sstevel@tonic-gate 12100Sstevel@tonic-gate *) Add the possibility to build without the ENGINE framework. 12110Sstevel@tonic-gate [Steven Reddie <smr@essemer.com.au> via Richard Levitte] 12120Sstevel@tonic-gate 12130Sstevel@tonic-gate *) Under Win32 gmtime() can return NULL: check return value in 12140Sstevel@tonic-gate OPENSSL_gmtime(). Add error code for case where gmtime() fails. 12150Sstevel@tonic-gate [Steve Henson] 12160Sstevel@tonic-gate 12170Sstevel@tonic-gate *) DSA routines: under certain error conditions uninitialized BN objects 12180Sstevel@tonic-gate could be freed. Solution: make sure initialization is performed early 12190Sstevel@tonic-gate enough. (Reported and fix supplied by Ivan D Nestlerode <nestler@MIT.EDU>, 12200Sstevel@tonic-gate Nils Larsch <nla@trustcenter.de> via PR#459) 12210Sstevel@tonic-gate [Lutz Jaenicke] 12220Sstevel@tonic-gate 12230Sstevel@tonic-gate *) Another fix for SSLv2 session ID handling: the session ID was incorrectly 12240Sstevel@tonic-gate checked on reconnect on the client side, therefore session resumption 12250Sstevel@tonic-gate could still fail with a "ssl session id is different" error. This 12260Sstevel@tonic-gate behaviour is masked when SSL_OP_ALL is used due to 12270Sstevel@tonic-gate SSL_OP_MICROSOFT_SESS_ID_BUG being set. 12280Sstevel@tonic-gate Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as 12290Sstevel@tonic-gate followup to PR #377. 12300Sstevel@tonic-gate [Lutz Jaenicke] 12310Sstevel@tonic-gate 12320Sstevel@tonic-gate *) IA-32 assembler support enhancements: unified ELF targets, support 12330Sstevel@tonic-gate for SCO/Caldera platforms, fix for Cygwin shared build. 12340Sstevel@tonic-gate [Andy Polyakov] 12350Sstevel@tonic-gate 12360Sstevel@tonic-gate *) Add support for FreeBSD on sparc64. As a consequence, support for 12370Sstevel@tonic-gate FreeBSD on non-x86 processors is separate from x86 processors on 12380Sstevel@tonic-gate the config script, much like the NetBSD support. 12390Sstevel@tonic-gate [Richard Levitte & Kris Kennaway <kris@obsecurity.org>] 12400Sstevel@tonic-gate 12410Sstevel@tonic-gate Changes between 0.9.6h and 0.9.7 [31 Dec 2002] 12420Sstevel@tonic-gate 12430Sstevel@tonic-gate [NB: OpenSSL 0.9.6i and later 0.9.6 patch levels were released after 12440Sstevel@tonic-gate OpenSSL 0.9.7.] 12450Sstevel@tonic-gate 12460Sstevel@tonic-gate *) Fix session ID handling in SSLv2 client code: the SERVER FINISHED 12470Sstevel@tonic-gate code (06) was taken as the first octet of the session ID and the last 12480Sstevel@tonic-gate octet was ignored consequently. As a result SSLv2 client side session 12490Sstevel@tonic-gate caching could not have worked due to the session ID mismatch between 12500Sstevel@tonic-gate client and server. 12510Sstevel@tonic-gate Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as 12520Sstevel@tonic-gate PR #377. 12530Sstevel@tonic-gate [Lutz Jaenicke] 12540Sstevel@tonic-gate 12550Sstevel@tonic-gate *) Change the declaration of needed Kerberos libraries to use EX_LIBS 12560Sstevel@tonic-gate instead of the special (and badly supported) LIBKRB5. LIBKRB5 is 12570Sstevel@tonic-gate removed entirely. 12580Sstevel@tonic-gate [Richard Levitte] 12590Sstevel@tonic-gate 12600Sstevel@tonic-gate *) The hw_ncipher.c engine requires dynamic locks. Unfortunately, it 12610Sstevel@tonic-gate seems that in spite of existing for more than a year, many application 12620Sstevel@tonic-gate author have done nothing to provide the necessary callbacks, which 12630Sstevel@tonic-gate means that this particular engine will not work properly anywhere. 12640Sstevel@tonic-gate This is a very unfortunate situation which forces us, in the name 12650Sstevel@tonic-gate of usability, to give the hw_ncipher.c a static lock, which is part 12660Sstevel@tonic-gate of libcrypto. 12670Sstevel@tonic-gate NOTE: This is for the 0.9.7 series ONLY. This hack will never 12680Sstevel@tonic-gate appear in 0.9.8 or later. We EXPECT application authors to have 12690Sstevel@tonic-gate dealt properly with this when 0.9.8 is released (unless we actually 12700Sstevel@tonic-gate make such changes in the libcrypto locking code that changes will 12710Sstevel@tonic-gate have to be made anyway). 12720Sstevel@tonic-gate [Richard Levitte] 12730Sstevel@tonic-gate 12740Sstevel@tonic-gate *) In asn1_d2i_read_bio() repeatedly call BIO_read() until all content 12750Sstevel@tonic-gate octets have been read, EOF or an error occurs. Without this change 12760Sstevel@tonic-gate some truncated ASN1 structures will not produce an error. 12770Sstevel@tonic-gate [Steve Henson] 12780Sstevel@tonic-gate 12790Sstevel@tonic-gate *) Disable Heimdal support, since it hasn't been fully implemented. 12800Sstevel@tonic-gate Still give the possibility to force the use of Heimdal, but with 12810Sstevel@tonic-gate warnings and a request that patches get sent to openssl-dev. 12820Sstevel@tonic-gate [Richard Levitte] 12830Sstevel@tonic-gate 12840Sstevel@tonic-gate *) Add the VC-CE target, introduce the WINCE sysname, and add 12850Sstevel@tonic-gate INSTALL.WCE and appropriate conditionals to make it build. 12860Sstevel@tonic-gate [Steven Reddie <smr@essemer.com.au> via Richard Levitte] 12870Sstevel@tonic-gate 12880Sstevel@tonic-gate *) Change the DLL names for Cygwin to cygcrypto-x.y.z.dll and 12890Sstevel@tonic-gate cygssl-x.y.z.dll, where x, y and z are the major, minor and 12900Sstevel@tonic-gate edit numbers of the version. 12910Sstevel@tonic-gate [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte] 12920Sstevel@tonic-gate 12930Sstevel@tonic-gate *) Introduce safe string copy and catenation functions 12940Sstevel@tonic-gate (BUF_strlcpy() and BUF_strlcat()). 12950Sstevel@tonic-gate [Ben Laurie (CHATS) and Richard Levitte] 12960Sstevel@tonic-gate 12970Sstevel@tonic-gate *) Avoid using fixed-size buffers for one-line DNs. 12980Sstevel@tonic-gate [Ben Laurie (CHATS)] 12990Sstevel@tonic-gate 13000Sstevel@tonic-gate *) Add BUF_MEM_grow_clean() to avoid information leakage when 13010Sstevel@tonic-gate resizing buffers containing secrets, and use where appropriate. 13020Sstevel@tonic-gate [Ben Laurie (CHATS)] 13030Sstevel@tonic-gate 13040Sstevel@tonic-gate *) Avoid using fixed size buffers for configuration file location. 13050Sstevel@tonic-gate [Ben Laurie (CHATS)] 13060Sstevel@tonic-gate 13070Sstevel@tonic-gate *) Avoid filename truncation for various CA files. 13080Sstevel@tonic-gate [Ben Laurie (CHATS)] 13090Sstevel@tonic-gate 13100Sstevel@tonic-gate *) Use sizeof in preference to magic numbers. 13110Sstevel@tonic-gate [Ben Laurie (CHATS)] 13120Sstevel@tonic-gate 13130Sstevel@tonic-gate *) Avoid filename truncation in cert requests. 13140Sstevel@tonic-gate [Ben Laurie (CHATS)] 13150Sstevel@tonic-gate 13160Sstevel@tonic-gate *) Add assertions to check for (supposedly impossible) buffer 13170Sstevel@tonic-gate overflows. 13180Sstevel@tonic-gate [Ben Laurie (CHATS)] 13190Sstevel@tonic-gate 13200Sstevel@tonic-gate *) Don't cache truncated DNS entries in the local cache (this could 13210Sstevel@tonic-gate potentially lead to a spoofing attack). 13220Sstevel@tonic-gate [Ben Laurie (CHATS)] 13230Sstevel@tonic-gate 13240Sstevel@tonic-gate *) Fix various buffers to be large enough for hex/decimal 13250Sstevel@tonic-gate representations in a platform independent manner. 13260Sstevel@tonic-gate [Ben Laurie (CHATS)] 13270Sstevel@tonic-gate 13280Sstevel@tonic-gate *) Add CRYPTO_realloc_clean() to avoid information leakage when 13290Sstevel@tonic-gate resizing buffers containing secrets, and use where appropriate. 13300Sstevel@tonic-gate [Ben Laurie (CHATS)] 13310Sstevel@tonic-gate 13320Sstevel@tonic-gate *) Add BIO_indent() to avoid much slightly worrying code to do 13330Sstevel@tonic-gate indents. 13340Sstevel@tonic-gate [Ben Laurie (CHATS)] 13350Sstevel@tonic-gate 13360Sstevel@tonic-gate *) Convert sprintf()/BIO_puts() to BIO_printf(). 13370Sstevel@tonic-gate [Ben Laurie (CHATS)] 13380Sstevel@tonic-gate 13390Sstevel@tonic-gate *) buffer_gets() could terminate with the buffer only half 13400Sstevel@tonic-gate full. Fixed. 13410Sstevel@tonic-gate [Ben Laurie (CHATS)] 13420Sstevel@tonic-gate 13430Sstevel@tonic-gate *) Add assertions to prevent user-supplied crypto functions from 13440Sstevel@tonic-gate overflowing internal buffers by having large block sizes, etc. 13450Sstevel@tonic-gate [Ben Laurie (CHATS)] 13460Sstevel@tonic-gate 13470Sstevel@tonic-gate *) New OPENSSL_assert() macro (similar to assert(), but enabled 13480Sstevel@tonic-gate unconditionally). 13490Sstevel@tonic-gate [Ben Laurie (CHATS)] 13500Sstevel@tonic-gate 13510Sstevel@tonic-gate *) Eliminate unused copy of key in RC4. 13520Sstevel@tonic-gate [Ben Laurie (CHATS)] 13530Sstevel@tonic-gate 13540Sstevel@tonic-gate *) Eliminate unused and incorrectly sized buffers for IV in pem.h. 13550Sstevel@tonic-gate [Ben Laurie (CHATS)] 13560Sstevel@tonic-gate 13570Sstevel@tonic-gate *) Fix off-by-one error in EGD path. 13580Sstevel@tonic-gate [Ben Laurie (CHATS)] 13590Sstevel@tonic-gate 13600Sstevel@tonic-gate *) If RANDFILE path is too long, ignore instead of truncating. 13610Sstevel@tonic-gate [Ben Laurie (CHATS)] 13620Sstevel@tonic-gate 13630Sstevel@tonic-gate *) Eliminate unused and incorrectly sized X.509 structure 13640Sstevel@tonic-gate CBCParameter. 13650Sstevel@tonic-gate [Ben Laurie (CHATS)] 13660Sstevel@tonic-gate 13670Sstevel@tonic-gate *) Eliminate unused and dangerous function knumber(). 13680Sstevel@tonic-gate [Ben Laurie (CHATS)] 13690Sstevel@tonic-gate 13700Sstevel@tonic-gate *) Eliminate unused and dangerous structure, KSSL_ERR. 13710Sstevel@tonic-gate [Ben Laurie (CHATS)] 13720Sstevel@tonic-gate 13730Sstevel@tonic-gate *) Protect against overlong session ID context length in an encoded 13740Sstevel@tonic-gate session object. Since these are local, this does not appear to be 13750Sstevel@tonic-gate exploitable. 13760Sstevel@tonic-gate [Ben Laurie (CHATS)] 13770Sstevel@tonic-gate 13780Sstevel@tonic-gate *) Change from security patch (see 0.9.6e below) that did not affect 13790Sstevel@tonic-gate the 0.9.6 release series: 13800Sstevel@tonic-gate 13810Sstevel@tonic-gate Remote buffer overflow in SSL3 protocol - an attacker could 13820Sstevel@tonic-gate supply an oversized master key in Kerberos-enabled versions. 13830Sstevel@tonic-gate (CAN-2002-0657) 13840Sstevel@tonic-gate [Ben Laurie (CHATS)] 13850Sstevel@tonic-gate 13860Sstevel@tonic-gate *) Change the SSL kerb5 codes to match RFC 2712. 13870Sstevel@tonic-gate [Richard Levitte] 13880Sstevel@tonic-gate 13890Sstevel@tonic-gate *) Make -nameopt work fully for req and add -reqopt switch. 13900Sstevel@tonic-gate [Michael Bell <michael.bell@rz.hu-berlin.de>, Steve Henson] 13910Sstevel@tonic-gate 13920Sstevel@tonic-gate *) The "block size" for block ciphers in CFB and OFB mode should be 1. 13930Sstevel@tonic-gate [Steve Henson, reported by Yngve Nysaeter Pettersen <yngve@opera.com>] 13940Sstevel@tonic-gate 13950Sstevel@tonic-gate *) Make sure tests can be performed even if the corresponding algorithms 13960Sstevel@tonic-gate have been removed entirely. This was also the last step to make 13970Sstevel@tonic-gate OpenSSL compilable with DJGPP under all reasonable conditions. 13980Sstevel@tonic-gate [Richard Levitte, Doug Kaufman <dkaufman@rahul.net>] 13990Sstevel@tonic-gate 14000Sstevel@tonic-gate *) Add cipher selection rules COMPLEMENTOFALL and COMPLEMENTOFDEFAULT 14010Sstevel@tonic-gate to allow version independent disabling of normally unselected ciphers, 14020Sstevel@tonic-gate which may be activated as a side-effect of selecting a single cipher. 14030Sstevel@tonic-gate 14040Sstevel@tonic-gate (E.g., cipher list string "RSA" enables ciphersuites that are left 14050Sstevel@tonic-gate out of "ALL" because they do not provide symmetric encryption. 14060Sstevel@tonic-gate "RSA:!COMPLEMEMENTOFALL" avoids these unsafe ciphersuites.) 14070Sstevel@tonic-gate [Lutz Jaenicke, Bodo Moeller] 14080Sstevel@tonic-gate 14090Sstevel@tonic-gate *) Add appropriate support for separate platform-dependent build 14100Sstevel@tonic-gate directories. The recommended way to make a platform-dependent 14110Sstevel@tonic-gate build directory is the following (tested on Linux), maybe with 14120Sstevel@tonic-gate some local tweaks: 14130Sstevel@tonic-gate 14140Sstevel@tonic-gate # Place yourself outside of the OpenSSL source tree. In 14150Sstevel@tonic-gate # this example, the environment variable OPENSSL_SOURCE 14160Sstevel@tonic-gate # is assumed to contain the absolute OpenSSL source directory. 14170Sstevel@tonic-gate mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`" 14180Sstevel@tonic-gate cd objtree/"`uname -s`-`uname -r`-`uname -m`" 14190Sstevel@tonic-gate (cd $OPENSSL_SOURCE; find . -type f) | while read F; do 14200Sstevel@tonic-gate mkdir -p `dirname $F` 14210Sstevel@tonic-gate ln -s $OPENSSL_SOURCE/$F $F 14220Sstevel@tonic-gate done 14230Sstevel@tonic-gate 14240Sstevel@tonic-gate To be absolutely sure not to disturb the source tree, a "make clean" 14250Sstevel@tonic-gate is a good thing. If it isn't successfull, don't worry about it, 14260Sstevel@tonic-gate it probably means the source directory is very clean. 14270Sstevel@tonic-gate [Richard Levitte] 14280Sstevel@tonic-gate 14290Sstevel@tonic-gate *) Make sure any ENGINE control commands make local copies of string 14300Sstevel@tonic-gate pointers passed to them whenever necessary. Otherwise it is possible 14310Sstevel@tonic-gate the caller may have overwritten (or deallocated) the original string 14320Sstevel@tonic-gate data when a later ENGINE operation tries to use the stored values. 14330Sstevel@tonic-gate [G�tz Babin-Ebell <babinebell@trustcenter.de>] 14340Sstevel@tonic-gate 14350Sstevel@tonic-gate *) Improve diagnostics in file reading and command-line digests. 14360Sstevel@tonic-gate [Ben Laurie aided and abetted by Solar Designer <solar@openwall.com>] 14370Sstevel@tonic-gate 14380Sstevel@tonic-gate *) Add AES modes CFB and OFB to the object database. Correct an 14390Sstevel@tonic-gate error in AES-CFB decryption. 14400Sstevel@tonic-gate [Richard Levitte] 14410Sstevel@tonic-gate 14420Sstevel@tonic-gate *) Remove most calls to EVP_CIPHER_CTX_cleanup() in evp_enc.c, this 14430Sstevel@tonic-gate allows existing EVP_CIPHER_CTX structures to be reused after 14440Sstevel@tonic-gate calling EVP_*Final(). This behaviour is used by encryption 14450Sstevel@tonic-gate BIOs and some applications. This has the side effect that 14460Sstevel@tonic-gate applications must explicitly clean up cipher contexts with 14470Sstevel@tonic-gate EVP_CIPHER_CTX_cleanup() or they will leak memory. 14480Sstevel@tonic-gate [Steve Henson] 14490Sstevel@tonic-gate 14500Sstevel@tonic-gate *) Check the values of dna and dnb in bn_mul_recursive before calling 14510Sstevel@tonic-gate bn_mul_comba (a non zero value means the a or b arrays do not contain 14520Sstevel@tonic-gate n2 elements) and fallback to bn_mul_normal if either is not zero. 14530Sstevel@tonic-gate [Steve Henson] 14540Sstevel@tonic-gate 14550Sstevel@tonic-gate *) Fix escaping of non-ASCII characters when using the -subj option 14560Sstevel@tonic-gate of the "openssl req" command line tool. (Robert Joop <joop@fokus.gmd.de>) 14570Sstevel@tonic-gate [Lutz Jaenicke] 14580Sstevel@tonic-gate 14590Sstevel@tonic-gate *) Make object definitions compliant to LDAP (RFC2256): SN is the short 14600Sstevel@tonic-gate form for "surname", serialNumber has no short form. 14610Sstevel@tonic-gate Use "mail" as the short name for "rfc822Mailbox" according to RFC2798; 14620Sstevel@tonic-gate therefore remove "mail" short name for "internet 7". 14630Sstevel@tonic-gate The OID for unique identifiers in X509 certificates is 14640Sstevel@tonic-gate x500UniqueIdentifier, not uniqueIdentifier. 14650Sstevel@tonic-gate Some more OID additions. (Michael Bell <michael.bell@rz.hu-berlin.de>) 14660Sstevel@tonic-gate [Lutz Jaenicke] 14670Sstevel@tonic-gate 14680Sstevel@tonic-gate *) Add an "init" command to the ENGINE config module and auto initialize 14690Sstevel@tonic-gate ENGINEs. Without any "init" command the ENGINE will be initialized 14700Sstevel@tonic-gate after all ctrl commands have been executed on it. If init=1 the 14710Sstevel@tonic-gate ENGINE is initailized at that point (ctrls before that point are run 14720Sstevel@tonic-gate on the uninitialized ENGINE and after on the initialized one). If 14730Sstevel@tonic-gate init=0 then the ENGINE will not be iniatialized at all. 14740Sstevel@tonic-gate [Steve Henson] 14750Sstevel@tonic-gate 14760Sstevel@tonic-gate *) Fix the 'app_verify_callback' interface so that the user-defined 14770Sstevel@tonic-gate argument is actually passed to the callback: In the 14780Sstevel@tonic-gate SSL_CTX_set_cert_verify_callback() prototype, the callback 14790Sstevel@tonic-gate declaration has been changed from 14800Sstevel@tonic-gate int (*cb)() 14810Sstevel@tonic-gate into 14820Sstevel@tonic-gate int (*cb)(X509_STORE_CTX *,void *); 14830Sstevel@tonic-gate in ssl_verify_cert_chain (ssl/ssl_cert.c), the call 14840Sstevel@tonic-gate i=s->ctx->app_verify_callback(&ctx) 14850Sstevel@tonic-gate has been changed into 14860Sstevel@tonic-gate i=s->ctx->app_verify_callback(&ctx, s->ctx->app_verify_arg). 14870Sstevel@tonic-gate 14880Sstevel@tonic-gate To update applications using SSL_CTX_set_cert_verify_callback(), 14890Sstevel@tonic-gate a dummy argument can be added to their callback functions. 14900Sstevel@tonic-gate [D. K. Smetters <smetters@parc.xerox.com>] 14910Sstevel@tonic-gate 14920Sstevel@tonic-gate *) Added the '4758cca' ENGINE to support IBM 4758 cards. 14930Sstevel@tonic-gate [Maurice Gittens <maurice@gittens.nl>, touchups by Geoff Thorpe] 14940Sstevel@tonic-gate 14950Sstevel@tonic-gate *) Add and OPENSSL_LOAD_CONF define which will cause 14960Sstevel@tonic-gate OpenSSL_add_all_algorithms() to load the openssl.cnf config file. 14970Sstevel@tonic-gate This allows older applications to transparently support certain 14980Sstevel@tonic-gate OpenSSL features: such as crypto acceleration and dynamic ENGINE loading. 14990Sstevel@tonic-gate Two new functions OPENSSL_add_all_algorithms_noconf() which will never 15000Sstevel@tonic-gate load the config file and OPENSSL_add_all_algorithms_conf() which will 15010Sstevel@tonic-gate always load it have also been added. 15020Sstevel@tonic-gate [Steve Henson] 15030Sstevel@tonic-gate 15040Sstevel@tonic-gate *) Add the OFB, CFB and CTR (all with 128 bit feedback) to AES. 15050Sstevel@tonic-gate Adjust NIDs and EVP layer. 15060Sstevel@tonic-gate [Stephen Sprunk <stephen@sprunk.org> and Richard Levitte] 15070Sstevel@tonic-gate 15080Sstevel@tonic-gate *) Config modules support in openssl utility. 15090Sstevel@tonic-gate 15100Sstevel@tonic-gate Most commands now load modules from the config file, 15110Sstevel@tonic-gate though in a few (such as version) this isn't done 15120Sstevel@tonic-gate because it couldn't be used for anything. 15130Sstevel@tonic-gate 15140Sstevel@tonic-gate In the case of ca and req the config file used is 15150Sstevel@tonic-gate the same as the utility itself: that is the -config 15160Sstevel@tonic-gate command line option can be used to specify an 15170Sstevel@tonic-gate alternative file. 15180Sstevel@tonic-gate [Steve Henson] 15190Sstevel@tonic-gate 15200Sstevel@tonic-gate *) Move default behaviour from OPENSSL_config(). If appname is NULL 15210Sstevel@tonic-gate use "openssl_conf" if filename is NULL use default openssl config file. 15220Sstevel@tonic-gate [Steve Henson] 15230Sstevel@tonic-gate 15240Sstevel@tonic-gate *) Add an argument to OPENSSL_config() to allow the use of an alternative 15250Sstevel@tonic-gate config section name. Add a new flag to tolerate a missing config file 15260Sstevel@tonic-gate and move code to CONF_modules_load_file(). 15270Sstevel@tonic-gate [Steve Henson] 15280Sstevel@tonic-gate 15290Sstevel@tonic-gate *) Support for crypto accelerator cards from Accelerated Encryption 15300Sstevel@tonic-gate Processing, www.aep.ie. (Use engine 'aep') 15310Sstevel@tonic-gate The support was copied from 0.9.6c [engine] and adapted/corrected 15320Sstevel@tonic-gate to work with the new engine framework. 15330Sstevel@tonic-gate [AEP Inc. and Richard Levitte] 15340Sstevel@tonic-gate 15350Sstevel@tonic-gate *) Support for SureWare crypto accelerator cards from Baltimore 15360Sstevel@tonic-gate Technologies. (Use engine 'sureware') 15370Sstevel@tonic-gate The support was copied from 0.9.6c [engine] and adapted 15380Sstevel@tonic-gate to work with the new engine framework. 15390Sstevel@tonic-gate [Richard Levitte] 15400Sstevel@tonic-gate 15410Sstevel@tonic-gate *) Have the CHIL engine fork-safe (as defined by nCipher) and actually 15420Sstevel@tonic-gate make the newer ENGINE framework commands for the CHIL engine work. 15430Sstevel@tonic-gate [Toomas Kiisk <vix@cyber.ee> and Richard Levitte] 15440Sstevel@tonic-gate 15450Sstevel@tonic-gate *) Make it possible to produce shared libraries on ReliantUNIX. 15460Sstevel@tonic-gate [Robert Dahlem <Robert.Dahlem@ffm2.siemens.de> via Richard Levitte] 15470Sstevel@tonic-gate 15480Sstevel@tonic-gate *) Add the configuration target debug-linux-ppro. 15490Sstevel@tonic-gate Make 'openssl rsa' use the general key loading routines 15500Sstevel@tonic-gate implemented in apps.c, and make those routines able to 15510Sstevel@tonic-gate handle the key format FORMAT_NETSCAPE and the variant 15520Sstevel@tonic-gate FORMAT_IISSGC. 15530Sstevel@tonic-gate [Toomas Kiisk <vix@cyber.ee> via Richard Levitte] 15540Sstevel@tonic-gate 15550Sstevel@tonic-gate *) Fix a crashbug and a logic bug in hwcrhk_load_pubkey(). 15560Sstevel@tonic-gate [Toomas Kiisk <vix@cyber.ee> via Richard Levitte] 15570Sstevel@tonic-gate 15580Sstevel@tonic-gate *) Add -keyform to rsautl, and document -engine. 15590Sstevel@tonic-gate [Richard Levitte, inspired by Toomas Kiisk <vix@cyber.ee>] 15600Sstevel@tonic-gate 15610Sstevel@tonic-gate *) Change BIO_new_file (crypto/bio/bss_file.c) to use new 15620Sstevel@tonic-gate BIO_R_NO_SUCH_FILE error code rather than the generic 15630Sstevel@tonic-gate ERR_R_SYS_LIB error code if fopen() fails with ENOENT. 15640Sstevel@tonic-gate [Ben Laurie] 15650Sstevel@tonic-gate 15660Sstevel@tonic-gate *) Add new functions 15670Sstevel@tonic-gate ERR_peek_last_error 15680Sstevel@tonic-gate ERR_peek_last_error_line 15690Sstevel@tonic-gate ERR_peek_last_error_line_data. 15700Sstevel@tonic-gate These are similar to 15710Sstevel@tonic-gate ERR_peek_error 15720Sstevel@tonic-gate ERR_peek_error_line 15730Sstevel@tonic-gate ERR_peek_error_line_data, 15740Sstevel@tonic-gate but report on the latest error recorded rather than the first one 15750Sstevel@tonic-gate still in the error queue. 15760Sstevel@tonic-gate [Ben Laurie, Bodo Moeller] 15770Sstevel@tonic-gate 15780Sstevel@tonic-gate *) default_algorithms option in ENGINE config module. This allows things 15790Sstevel@tonic-gate like: 15800Sstevel@tonic-gate default_algorithms = ALL 15810Sstevel@tonic-gate default_algorithms = RSA, DSA, RAND, CIPHERS, DIGESTS 15820Sstevel@tonic-gate [Steve Henson] 15830Sstevel@tonic-gate 15840Sstevel@tonic-gate *) Prelminary ENGINE config module. 15850Sstevel@tonic-gate [Steve Henson] 15860Sstevel@tonic-gate 15870Sstevel@tonic-gate *) New experimental application configuration code. 15880Sstevel@tonic-gate [Steve Henson] 15890Sstevel@tonic-gate 15900Sstevel@tonic-gate *) Change the AES code to follow the same name structure as all other 15910Sstevel@tonic-gate symmetric ciphers, and behave the same way. Move everything to 15920Sstevel@tonic-gate the directory crypto/aes, thereby obsoleting crypto/rijndael. 15930Sstevel@tonic-gate [Stephen Sprunk <stephen@sprunk.org> and Richard Levitte] 15940Sstevel@tonic-gate 15950Sstevel@tonic-gate *) SECURITY: remove unsafe setjmp/signal interaction from ui_openssl.c. 15960Sstevel@tonic-gate [Ben Laurie and Theo de Raadt] 15970Sstevel@tonic-gate 15980Sstevel@tonic-gate *) Add option to output public keys in req command. 15990Sstevel@tonic-gate [Massimiliano Pala madwolf@openca.org] 16000Sstevel@tonic-gate 16010Sstevel@tonic-gate *) Use wNAFs in EC_POINTs_mul() for improved efficiency 16020Sstevel@tonic-gate (up to about 10% better than before for P-192 and P-224). 16030Sstevel@tonic-gate [Bodo Moeller] 16040Sstevel@tonic-gate 16050Sstevel@tonic-gate *) New functions/macros 16060Sstevel@tonic-gate 16070Sstevel@tonic-gate SSL_CTX_set_msg_callback(ctx, cb) 16080Sstevel@tonic-gate SSL_CTX_set_msg_callback_arg(ctx, arg) 16090Sstevel@tonic-gate SSL_set_msg_callback(ssl, cb) 16100Sstevel@tonic-gate SSL_set_msg_callback_arg(ssl, arg) 16110Sstevel@tonic-gate 16120Sstevel@tonic-gate to request calling a callback function 16130Sstevel@tonic-gate 16140Sstevel@tonic-gate void cb(int write_p, int version, int content_type, 16150Sstevel@tonic-gate const void *buf, size_t len, SSL *ssl, void *arg) 16160Sstevel@tonic-gate 16170Sstevel@tonic-gate whenever a protocol message has been completely received 16180Sstevel@tonic-gate (write_p == 0) or sent (write_p == 1). Here 'version' is the 16190Sstevel@tonic-gate protocol version according to which the SSL library interprets 16200Sstevel@tonic-gate the current protocol message (SSL2_VERSION, SSL3_VERSION, or 16210Sstevel@tonic-gate TLS1_VERSION). 'content_type' is 0 in the case of SSL 2.0, or 16220Sstevel@tonic-gate the content type as defined in the SSL 3.0/TLS 1.0 protocol 16230Sstevel@tonic-gate specification (change_cipher_spec(20), alert(21), handshake(22)). 16240Sstevel@tonic-gate 'buf' and 'len' point to the actual message, 'ssl' to the 16250Sstevel@tonic-gate SSL object, and 'arg' is the application-defined value set by 16260Sstevel@tonic-gate SSL[_CTX]_set_msg_callback_arg(). 16270Sstevel@tonic-gate 16280Sstevel@tonic-gate 'openssl s_client' and 'openssl s_server' have new '-msg' options 16290Sstevel@tonic-gate to enable a callback that displays all protocol messages. 16300Sstevel@tonic-gate [Bodo Moeller] 16310Sstevel@tonic-gate 16320Sstevel@tonic-gate *) Change the shared library support so shared libraries are built as 16330Sstevel@tonic-gate soon as the corresponding static library is finished, and thereby get 16340Sstevel@tonic-gate openssl and the test programs linked against the shared library. 16350Sstevel@tonic-gate This still only happens when the keyword "shard" has been given to 16360Sstevel@tonic-gate the configuration scripts. 16370Sstevel@tonic-gate 16380Sstevel@tonic-gate NOTE: shared library support is still an experimental thing, and 16390Sstevel@tonic-gate backward binary compatibility is still not guaranteed. 16400Sstevel@tonic-gate ["Maciej W. Rozycki" <macro@ds2.pg.gda.pl> and Richard Levitte] 16410Sstevel@tonic-gate 16420Sstevel@tonic-gate *) Add support for Subject Information Access extension. 16430Sstevel@tonic-gate [Peter Sylvester <Peter.Sylvester@EdelWeb.fr>] 16440Sstevel@tonic-gate 16450Sstevel@tonic-gate *) Make BUF_MEM_grow() behaviour more consistent: Initialise to zero 16460Sstevel@tonic-gate additional bytes when new memory had to be allocated, not just 16470Sstevel@tonic-gate when reusing an existing buffer. 16480Sstevel@tonic-gate [Bodo Moeller] 16490Sstevel@tonic-gate 16500Sstevel@tonic-gate *) New command line and configuration option 'utf8' for the req command. 16510Sstevel@tonic-gate This allows field values to be specified as UTF8 strings. 16520Sstevel@tonic-gate [Steve Henson] 16530Sstevel@tonic-gate 16540Sstevel@tonic-gate *) Add -multi and -mr options to "openssl speed" - giving multiple parallel 16550Sstevel@tonic-gate runs for the former and machine-readable output for the latter. 16560Sstevel@tonic-gate [Ben Laurie] 16570Sstevel@tonic-gate 16580Sstevel@tonic-gate *) Add '-noemailDN' option to 'openssl ca'. This prevents inclusion 16590Sstevel@tonic-gate of the e-mail address in the DN (i.e., it will go into a certificate 16600Sstevel@tonic-gate extension only). The new configuration file option 'email_in_dn = no' 16610Sstevel@tonic-gate has the same effect. 16620Sstevel@tonic-gate [Massimiliano Pala madwolf@openca.org] 16630Sstevel@tonic-gate 16640Sstevel@tonic-gate *) Change all functions with names starting with des_ to be starting 16650Sstevel@tonic-gate with DES_ instead. Add wrappers that are compatible with libdes, 16660Sstevel@tonic-gate but are named _ossl_old_des_*. Finally, add macros that map the 16670Sstevel@tonic-gate des_* symbols to the corresponding _ossl_old_des_* if libdes 16680Sstevel@tonic-gate compatibility is desired. If OpenSSL 0.9.6c compatibility is 16690Sstevel@tonic-gate desired, the des_* symbols will be mapped to DES_*, with one 16700Sstevel@tonic-gate exception. 16710Sstevel@tonic-gate 16720Sstevel@tonic-gate Since we provide two compatibility mappings, the user needs to 16730Sstevel@tonic-gate define the macro OPENSSL_DES_LIBDES_COMPATIBILITY if libdes 16740Sstevel@tonic-gate compatibility is desired. The default (i.e., when that macro 16750Sstevel@tonic-gate isn't defined) is OpenSSL 0.9.6c compatibility. 16760Sstevel@tonic-gate 16770Sstevel@tonic-gate There are also macros that enable and disable the support of old 16780Sstevel@tonic-gate des functions altogether. Those are OPENSSL_ENABLE_OLD_DES_SUPPORT 16790Sstevel@tonic-gate and OPENSSL_DISABLE_OLD_DES_SUPPORT. If none or both of those 16800Sstevel@tonic-gate are defined, the default will apply: to support the old des routines. 16810Sstevel@tonic-gate 16820Sstevel@tonic-gate In either case, one must include openssl/des.h to get the correct 16830Sstevel@tonic-gate definitions. Do not try to just include openssl/des_old.h, that 16840Sstevel@tonic-gate won't work. 16850Sstevel@tonic-gate 16860Sstevel@tonic-gate NOTE: This is a major break of an old API into a new one. Software 16870Sstevel@tonic-gate authors are encouraged to switch to the DES_ style functions. Some 16880Sstevel@tonic-gate time in the future, des_old.h and the libdes compatibility functions 16890Sstevel@tonic-gate will be disable (i.e. OPENSSL_DISABLE_OLD_DES_SUPPORT will be the 16900Sstevel@tonic-gate default), and then completely removed. 16910Sstevel@tonic-gate [Richard Levitte] 16920Sstevel@tonic-gate 16930Sstevel@tonic-gate *) Test for certificates which contain unsupported critical extensions. 16940Sstevel@tonic-gate If such a certificate is found during a verify operation it is 16950Sstevel@tonic-gate rejected by default: this behaviour can be overridden by either 16960Sstevel@tonic-gate handling the new error X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION or 16970Sstevel@tonic-gate by setting the verify flag X509_V_FLAG_IGNORE_CRITICAL. A new function 16980Sstevel@tonic-gate X509_supported_extension() has also been added which returns 1 if a 16990Sstevel@tonic-gate particular extension is supported. 17000Sstevel@tonic-gate [Steve Henson] 17010Sstevel@tonic-gate 17020Sstevel@tonic-gate *) Modify the behaviour of EVP cipher functions in similar way to digests 17030Sstevel@tonic-gate to retain compatibility with existing code. 17040Sstevel@tonic-gate [Steve Henson] 17050Sstevel@tonic-gate 17060Sstevel@tonic-gate *) Modify the behaviour of EVP_DigestInit() and EVP_DigestFinal() to retain 17070Sstevel@tonic-gate compatibility with existing code. In particular the 'ctx' parameter does 17080Sstevel@tonic-gate not have to be to be initialized before the call to EVP_DigestInit() and 17090Sstevel@tonic-gate it is tidied up after a call to EVP_DigestFinal(). New function 17100Sstevel@tonic-gate EVP_DigestFinal_ex() which does not tidy up the ctx. Similarly function 17110Sstevel@tonic-gate EVP_MD_CTX_copy() changed to not require the destination to be 17120Sstevel@tonic-gate initialized valid and new function EVP_MD_CTX_copy_ex() added which 17130Sstevel@tonic-gate requires the destination to be valid. 17140Sstevel@tonic-gate 17150Sstevel@tonic-gate Modify all the OpenSSL digest calls to use EVP_DigestInit_ex(), 17160Sstevel@tonic-gate EVP_DigestFinal_ex() and EVP_MD_CTX_copy_ex(). 17170Sstevel@tonic-gate [Steve Henson] 17180Sstevel@tonic-gate 17190Sstevel@tonic-gate *) Change ssl3_get_message (ssl/s3_both.c) and the functions using it 17200Sstevel@tonic-gate so that complete 'Handshake' protocol structures are kept in memory 17210Sstevel@tonic-gate instead of overwriting 'msg_type' and 'length' with 'body' data. 17220Sstevel@tonic-gate [Bodo Moeller] 17230Sstevel@tonic-gate 17240Sstevel@tonic-gate *) Add an implementation of SSL_add_dir_cert_subjects_to_stack for Win32. 17250Sstevel@tonic-gate [Massimo Santin via Richard Levitte] 17260Sstevel@tonic-gate 17270Sstevel@tonic-gate *) Major restructuring to the underlying ENGINE code. This includes 17280Sstevel@tonic-gate reduction of linker bloat, separation of pure "ENGINE" manipulation 17290Sstevel@tonic-gate (initialisation, etc) from functionality dealing with implementations 17300Sstevel@tonic-gate of specific crypto iterfaces. This change also introduces integrated 17310Sstevel@tonic-gate support for symmetric ciphers and digest implementations - so ENGINEs 17320Sstevel@tonic-gate can now accelerate these by providing EVP_CIPHER and EVP_MD 17330Sstevel@tonic-gate implementations of their own. This is detailed in crypto/engine/README 17340Sstevel@tonic-gate as it couldn't be adequately described here. However, there are a few 17350Sstevel@tonic-gate API changes worth noting - some RSA, DSA, DH, and RAND functions that 17360Sstevel@tonic-gate were changed in the original introduction of ENGINE code have now 17370Sstevel@tonic-gate reverted back - the hooking from this code to ENGINE is now a good 17380Sstevel@tonic-gate deal more passive and at run-time, operations deal directly with 17390Sstevel@tonic-gate RSA_METHODs, DSA_METHODs (etc) as they did before, rather than 17400Sstevel@tonic-gate dereferencing through an ENGINE pointer any more. Also, the ENGINE 17410Sstevel@tonic-gate functions dealing with BN_MOD_EXP[_CRT] handlers have been removed - 17420Sstevel@tonic-gate they were not being used by the framework as there is no concept of a 17430Sstevel@tonic-gate BIGNUM_METHOD and they could not be generalised to the new 17440Sstevel@tonic-gate 'ENGINE_TABLE' mechanism that underlies the new code. Similarly, 17450Sstevel@tonic-gate ENGINE_cpy() has been removed as it cannot be consistently defined in 17460Sstevel@tonic-gate the new code. 17470Sstevel@tonic-gate [Geoff Thorpe] 17480Sstevel@tonic-gate 17490Sstevel@tonic-gate *) Change ASN1_GENERALIZEDTIME_check() to allow fractional seconds. 17500Sstevel@tonic-gate [Steve Henson] 17510Sstevel@tonic-gate 17520Sstevel@tonic-gate *) Change mkdef.pl to sort symbols that get the same entry number, 17530Sstevel@tonic-gate and make sure the automatically generated functions ERR_load_* 17540Sstevel@tonic-gate become part of libeay.num as well. 17550Sstevel@tonic-gate [Richard Levitte] 17560Sstevel@tonic-gate 17570Sstevel@tonic-gate *) New function SSL_renegotiate_pending(). This returns true once 17580Sstevel@tonic-gate renegotiation has been requested (either SSL_renegotiate() call 17590Sstevel@tonic-gate or HelloRequest/ClientHello receveived from the peer) and becomes 17600Sstevel@tonic-gate false once a handshake has been completed. 17610Sstevel@tonic-gate (For servers, SSL_renegotiate() followed by SSL_do_handshake() 17620Sstevel@tonic-gate sends a HelloRequest, but does not ensure that a handshake takes 17630Sstevel@tonic-gate place. SSL_renegotiate_pending() is useful for checking if the 17640Sstevel@tonic-gate client has followed the request.) 17650Sstevel@tonic-gate [Bodo Moeller] 17660Sstevel@tonic-gate 17670Sstevel@tonic-gate *) New SSL option SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION. 17680Sstevel@tonic-gate By default, clients may request session resumption even during 17690Sstevel@tonic-gate renegotiation (if session ID contexts permit); with this option, 17700Sstevel@tonic-gate session resumption is possible only in the first handshake. 17710Sstevel@tonic-gate 17720Sstevel@tonic-gate SSL_OP_ALL is now 0x00000FFFL instead of 0x000FFFFFL. This makes 17730Sstevel@tonic-gate more bits available for options that should not be part of 17740Sstevel@tonic-gate SSL_OP_ALL (such as SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION). 17750Sstevel@tonic-gate [Bodo Moeller] 17760Sstevel@tonic-gate 17770Sstevel@tonic-gate *) Add some demos for certificate and certificate request creation. 17780Sstevel@tonic-gate [Steve Henson] 17790Sstevel@tonic-gate 17800Sstevel@tonic-gate *) Make maximum certificate chain size accepted from the peer application 17810Sstevel@tonic-gate settable (SSL*_get/set_max_cert_list()), as proposed by 17820Sstevel@tonic-gate "Douglas E. Engert" <deengert@anl.gov>. 17830Sstevel@tonic-gate [Lutz Jaenicke] 17840Sstevel@tonic-gate 17850Sstevel@tonic-gate *) Add support for shared libraries for Unixware-7 17860Sstevel@tonic-gate (Boyd Lynn Gerber <gerberb@zenez.com>). 17870Sstevel@tonic-gate [Lutz Jaenicke] 17880Sstevel@tonic-gate 17890Sstevel@tonic-gate *) Add a "destroy" handler to ENGINEs that allows structural cleanup to 17900Sstevel@tonic-gate be done prior to destruction. Use this to unload error strings from 17910Sstevel@tonic-gate ENGINEs that load their own error strings. NB: This adds two new API 17920Sstevel@tonic-gate functions to "get" and "set" this destroy handler in an ENGINE. 17930Sstevel@tonic-gate [Geoff Thorpe] 17940Sstevel@tonic-gate 17950Sstevel@tonic-gate *) Alter all existing ENGINE implementations (except "openssl" and 17960Sstevel@tonic-gate "openbsd") to dynamically instantiate their own error strings. This 17970Sstevel@tonic-gate makes them more flexible to be built both as statically-linked ENGINEs 17980Sstevel@tonic-gate and self-contained shared-libraries loadable via the "dynamic" ENGINE. 17990Sstevel@tonic-gate Also, add stub code to each that makes building them as self-contained 18000Sstevel@tonic-gate shared-libraries easier (see README.ENGINE). 18010Sstevel@tonic-gate [Geoff Thorpe] 18020Sstevel@tonic-gate 18030Sstevel@tonic-gate *) Add a "dynamic" ENGINE that provides a mechanism for binding ENGINE 18040Sstevel@tonic-gate implementations into applications that are completely implemented in 18050Sstevel@tonic-gate self-contained shared-libraries. The "dynamic" ENGINE exposes control 18060Sstevel@tonic-gate commands that can be used to configure what shared-library to load and 18070Sstevel@tonic-gate to control aspects of the way it is handled. Also, made an update to 18080Sstevel@tonic-gate the README.ENGINE file that brings its information up-to-date and 18090Sstevel@tonic-gate provides some information and instructions on the "dynamic" ENGINE 18100Sstevel@tonic-gate (ie. how to use it, how to build "dynamic"-loadable ENGINEs, etc). 18110Sstevel@tonic-gate [Geoff Thorpe] 18120Sstevel@tonic-gate 18130Sstevel@tonic-gate *) Make it possible to unload ranges of ERR strings with a new 18140Sstevel@tonic-gate "ERR_unload_strings" function. 18150Sstevel@tonic-gate [Geoff Thorpe] 18160Sstevel@tonic-gate 18170Sstevel@tonic-gate *) Add a copy() function to EVP_MD. 18180Sstevel@tonic-gate [Ben Laurie] 18190Sstevel@tonic-gate 18200Sstevel@tonic-gate *) Make EVP_MD routines take a context pointer instead of just the 18210Sstevel@tonic-gate md_data void pointer. 18220Sstevel@tonic-gate [Ben Laurie] 18230Sstevel@tonic-gate 18240Sstevel@tonic-gate *) Add flags to EVP_MD and EVP_MD_CTX. EVP_MD_FLAG_ONESHOT indicates 18250Sstevel@tonic-gate that the digest can only process a single chunk of data 18260Sstevel@tonic-gate (typically because it is provided by a piece of 18270Sstevel@tonic-gate hardware). EVP_MD_CTX_FLAG_ONESHOT indicates that the application 18280Sstevel@tonic-gate is only going to provide a single chunk of data, and hence the 18290Sstevel@tonic-gate framework needn't accumulate the data for oneshot drivers. 18300Sstevel@tonic-gate [Ben Laurie] 18310Sstevel@tonic-gate 18320Sstevel@tonic-gate *) As with "ERR", make it possible to replace the underlying "ex_data" 18330Sstevel@tonic-gate functions. This change also alters the storage and management of global 18340Sstevel@tonic-gate ex_data state - it's now all inside ex_data.c and all "class" code (eg. 18350Sstevel@tonic-gate RSA, BIO, SSL_CTX, etc) no longer stores its own STACKS and per-class 18360Sstevel@tonic-gate index counters. The API functions that use this state have been changed 18370Sstevel@tonic-gate to take a "class_index" rather than pointers to the class's local STACK 18380Sstevel@tonic-gate and counter, and there is now an API function to dynamically create new 18390Sstevel@tonic-gate classes. This centralisation allows us to (a) plug a lot of the 18400Sstevel@tonic-gate thread-safety problems that existed, and (b) makes it possible to clean 18410Sstevel@tonic-gate up all allocated state using "CRYPTO_cleanup_all_ex_data()". W.r.t. (b) 18420Sstevel@tonic-gate such data would previously have always leaked in application code and 18430Sstevel@tonic-gate workarounds were in place to make the memory debugging turn a blind eye 18440Sstevel@tonic-gate to it. Application code that doesn't use this new function will still 18450Sstevel@tonic-gate leak as before, but their memory debugging output will announce it now 18460Sstevel@tonic-gate rather than letting it slide. 18470Sstevel@tonic-gate 18480Sstevel@tonic-gate Besides the addition of CRYPTO_cleanup_all_ex_data(), another API change 18490Sstevel@tonic-gate induced by the "ex_data" overhaul is that X509_STORE_CTX_init() now 18500Sstevel@tonic-gate has a return value to indicate success or failure. 18510Sstevel@tonic-gate [Geoff Thorpe] 18520Sstevel@tonic-gate 18530Sstevel@tonic-gate *) Make it possible to replace the underlying "ERR" functions such that the 18540Sstevel@tonic-gate global state (2 LHASH tables and 2 locks) is only used by the "default" 18550Sstevel@tonic-gate implementation. This change also adds two functions to "get" and "set" 18560Sstevel@tonic-gate the implementation prior to it being automatically set the first time 18570Sstevel@tonic-gate any other ERR function takes place. Ie. an application can call "get", 18580Sstevel@tonic-gate pass the return value to a module it has just loaded, and that module 18590Sstevel@tonic-gate can call its own "set" function using that value. This means the 18600Sstevel@tonic-gate module's "ERR" operations will use (and modify) the error state in the 18610Sstevel@tonic-gate application and not in its own statically linked copy of OpenSSL code. 18620Sstevel@tonic-gate [Geoff Thorpe] 18630Sstevel@tonic-gate 18640Sstevel@tonic-gate *) Give DH, DSA, and RSA types their own "**_up_ref()" function to increment 18650Sstevel@tonic-gate reference counts. This performs normal REF_PRINT/REF_CHECK macros on 18660Sstevel@tonic-gate the operation, and provides a more encapsulated way for external code 18670Sstevel@tonic-gate (crypto/evp/ and ssl/) to do this. Also changed the evp and ssl code 18680Sstevel@tonic-gate to use these functions rather than manually incrementing the counts. 18690Sstevel@tonic-gate 18700Sstevel@tonic-gate Also rename "DSO_up()" function to more descriptive "DSO_up_ref()". 18710Sstevel@tonic-gate [Geoff Thorpe] 18720Sstevel@tonic-gate 18730Sstevel@tonic-gate *) Add EVP test program. 18740Sstevel@tonic-gate [Ben Laurie] 18750Sstevel@tonic-gate 18760Sstevel@tonic-gate *) Add symmetric cipher support to ENGINE. Expect the API to change! 18770Sstevel@tonic-gate [Ben Laurie] 18780Sstevel@tonic-gate 18790Sstevel@tonic-gate *) New CRL functions: X509_CRL_set_version(), X509_CRL_set_issuer_name() 18800Sstevel@tonic-gate X509_CRL_set_lastUpdate(), X509_CRL_set_nextUpdate(), X509_CRL_sort(), 18810Sstevel@tonic-gate X509_REVOKED_set_serialNumber(), and X509_REVOKED_set_revocationDate(). 18820Sstevel@tonic-gate These allow a CRL to be built without having to access X509_CRL fields 18830Sstevel@tonic-gate directly. Modify 'ca' application to use new functions. 18840Sstevel@tonic-gate [Steve Henson] 18850Sstevel@tonic-gate 18860Sstevel@tonic-gate *) Move SSL_OP_TLS_ROLLBACK_BUG out of the SSL_OP_ALL list of recommended 18870Sstevel@tonic-gate bug workarounds. Rollback attack detection is a security feature. 18880Sstevel@tonic-gate The problem will only arise on OpenSSL servers when TLSv1 is not 18890Sstevel@tonic-gate available (sslv3_server_method() or SSL_OP_NO_TLSv1). 18900Sstevel@tonic-gate Software authors not wanting to support TLSv1 will have special reasons 18910Sstevel@tonic-gate for their choice and can explicitly enable this option. 18920Sstevel@tonic-gate [Bodo Moeller, Lutz Jaenicke] 18930Sstevel@tonic-gate 18940Sstevel@tonic-gate *) Rationalise EVP so it can be extended: don't include a union of 18950Sstevel@tonic-gate cipher/digest structures, add init/cleanup functions for EVP_MD_CTX 18960Sstevel@tonic-gate (similar to those existing for EVP_CIPHER_CTX). 18970Sstevel@tonic-gate Usage example: 18980Sstevel@tonic-gate 18990Sstevel@tonic-gate EVP_MD_CTX md; 19000Sstevel@tonic-gate 19010Sstevel@tonic-gate EVP_MD_CTX_init(&md); /* new function call */ 19020Sstevel@tonic-gate EVP_DigestInit(&md, EVP_sha1()); 19030Sstevel@tonic-gate EVP_DigestUpdate(&md, in, len); 19040Sstevel@tonic-gate EVP_DigestFinal(&md, out, NULL); 19050Sstevel@tonic-gate EVP_MD_CTX_cleanup(&md); /* new function call */ 19060Sstevel@tonic-gate 19070Sstevel@tonic-gate [Ben Laurie] 19080Sstevel@tonic-gate 19090Sstevel@tonic-gate *) Make DES key schedule conform to the usual scheme, as well as 19100Sstevel@tonic-gate correcting its structure. This means that calls to DES functions 19110Sstevel@tonic-gate now have to pass a pointer to a des_key_schedule instead of a 19120Sstevel@tonic-gate plain des_key_schedule (which was actually always a pointer 19130Sstevel@tonic-gate anyway): E.g., 19140Sstevel@tonic-gate 19150Sstevel@tonic-gate des_key_schedule ks; 19160Sstevel@tonic-gate 19170Sstevel@tonic-gate des_set_key_checked(..., &ks); 19180Sstevel@tonic-gate des_ncbc_encrypt(..., &ks, ...); 19190Sstevel@tonic-gate 19200Sstevel@tonic-gate (Note that a later change renames 'des_...' into 'DES_...'.) 19210Sstevel@tonic-gate [Ben Laurie] 19220Sstevel@tonic-gate 19230Sstevel@tonic-gate *) Initial reduction of linker bloat: the use of some functions, such as 19240Sstevel@tonic-gate PEM causes large amounts of unused functions to be linked in due to 19250Sstevel@tonic-gate poor organisation. For example pem_all.c contains every PEM function 19260Sstevel@tonic-gate which has a knock on effect of linking in large amounts of (unused) 19270Sstevel@tonic-gate ASN1 code. Grouping together similar functions and splitting unrelated 19280Sstevel@tonic-gate functions prevents this. 19290Sstevel@tonic-gate [Steve Henson] 19300Sstevel@tonic-gate 19310Sstevel@tonic-gate *) Cleanup of EVP macros. 19320Sstevel@tonic-gate [Ben Laurie] 19330Sstevel@tonic-gate 19340Sstevel@tonic-gate *) Change historical references to {NID,SN,LN}_des_ede and ede3 to add the 19350Sstevel@tonic-gate correct _ecb suffix. 19360Sstevel@tonic-gate [Ben Laurie] 19370Sstevel@tonic-gate 19380Sstevel@tonic-gate *) Add initial OCSP responder support to ocsp application. The 19390Sstevel@tonic-gate revocation information is handled using the text based index 19400Sstevel@tonic-gate use by the ca application. The responder can either handle 19410Sstevel@tonic-gate requests generated internally, supplied in files (for example 19420Sstevel@tonic-gate via a CGI script) or using an internal minimal server. 19430Sstevel@tonic-gate [Steve Henson] 19440Sstevel@tonic-gate 19450Sstevel@tonic-gate *) Add configuration choices to get zlib compression for TLS. 19460Sstevel@tonic-gate [Richard Levitte] 19470Sstevel@tonic-gate 19480Sstevel@tonic-gate *) Changes to Kerberos SSL for RFC 2712 compliance: 19490Sstevel@tonic-gate 1. Implemented real KerberosWrapper, instead of just using 19500Sstevel@tonic-gate KRB5 AP_REQ message. [Thanks to Simon Wilkinson <sxw@sxw.org.uk>] 19510Sstevel@tonic-gate 2. Implemented optional authenticator field of KerberosWrapper. 19520Sstevel@tonic-gate 19530Sstevel@tonic-gate Added openssl-style ASN.1 macros for Kerberos ticket, ap_req, 19540Sstevel@tonic-gate and authenticator structs; see crypto/krb5/. 19550Sstevel@tonic-gate 19560Sstevel@tonic-gate Generalized Kerberos calls to support multiple Kerberos libraries. 19570Sstevel@tonic-gate [Vern Staats <staatsvr@asc.hpc.mil>, 19580Sstevel@tonic-gate Jeffrey Altman <jaltman@columbia.edu> 19590Sstevel@tonic-gate via Richard Levitte] 19600Sstevel@tonic-gate 19610Sstevel@tonic-gate *) Cause 'openssl speed' to use fully hard-coded DSA keys as it 19620Sstevel@tonic-gate already does with RSA. testdsa.h now has 'priv_key/pub_key' 19630Sstevel@tonic-gate values for each of the key sizes rather than having just 19640Sstevel@tonic-gate parameters (and 'speed' generating keys each time). 19650Sstevel@tonic-gate [Geoff Thorpe] 19660Sstevel@tonic-gate 19670Sstevel@tonic-gate *) Speed up EVP routines. 19680Sstevel@tonic-gate Before: 19690Sstevel@tonic-gateencrypt 19700Sstevel@tonic-gatetype 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 19710Sstevel@tonic-gatedes-cbc 4408.85k 5560.51k 5778.46k 5862.20k 5825.16k 19720Sstevel@tonic-gatedes-cbc 4389.55k 5571.17k 5792.23k 5846.91k 5832.11k 19730Sstevel@tonic-gatedes-cbc 4394.32k 5575.92k 5807.44k 5848.37k 5841.30k 19740Sstevel@tonic-gatedecrypt 19750Sstevel@tonic-gatedes-cbc 3482.66k 5069.49k 5496.39k 5614.16k 5639.28k 19760Sstevel@tonic-gatedes-cbc 3480.74k 5068.76k 5510.34k 5609.87k 5635.52k 19770Sstevel@tonic-gatedes-cbc 3483.72k 5067.62k 5504.60k 5708.01k 5724.80k 19780Sstevel@tonic-gate After: 19790Sstevel@tonic-gateencrypt 19800Sstevel@tonic-gatedes-cbc 4660.16k 5650.19k 5807.19k 5827.13k 5783.32k 19810Sstevel@tonic-gatedecrypt 19820Sstevel@tonic-gatedes-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k 19830Sstevel@tonic-gate [Ben Laurie] 19840Sstevel@tonic-gate 19850Sstevel@tonic-gate *) Added the OS2-EMX target. 19860Sstevel@tonic-gate ["Brian Havard" <brianh@kheldar.apana.org.au> and Richard Levitte] 19870Sstevel@tonic-gate 19880Sstevel@tonic-gate *) Rewrite apps to use NCONF routines instead of the old CONF. New functions 19890Sstevel@tonic-gate to support NCONF routines in extension code. New function CONF_set_nconf() 19900Sstevel@tonic-gate to allow functions which take an NCONF to also handle the old LHASH 19910Sstevel@tonic-gate structure: this means that the old CONF compatible routines can be 19920Sstevel@tonic-gate retained (in particular wrt extensions) without having to duplicate the 19930Sstevel@tonic-gate code. New function X509V3_add_ext_nconf_sk to add extensions to a stack. 19940Sstevel@tonic-gate [Steve Henson] 19950Sstevel@tonic-gate 19960Sstevel@tonic-gate *) Enhance the general user interface with mechanisms for inner control 19970Sstevel@tonic-gate and with possibilities to have yes/no kind of prompts. 19980Sstevel@tonic-gate [Richard Levitte] 19990Sstevel@tonic-gate 20000Sstevel@tonic-gate *) Change all calls to low level digest routines in the library and 20010Sstevel@tonic-gate applications to use EVP. Add missing calls to HMAC_cleanup() and 20020Sstevel@tonic-gate don't assume HMAC_CTX can be copied using memcpy(). 20030Sstevel@tonic-gate [Verdon Walker <VWalker@novell.com>, Steve Henson] 20040Sstevel@tonic-gate 20050Sstevel@tonic-gate *) Add the possibility to control engines through control names but with 20060Sstevel@tonic-gate arbitrary arguments instead of just a string. 20070Sstevel@tonic-gate Change the key loaders to take a UI_METHOD instead of a callback 20080Sstevel@tonic-gate function pointer. NOTE: this breaks binary compatibility with earlier 20090Sstevel@tonic-gate versions of OpenSSL [engine]. 20100Sstevel@tonic-gate Adapt the nCipher code for these new conditions and add a card insertion 20110Sstevel@tonic-gate callback. 20120Sstevel@tonic-gate [Richard Levitte] 20130Sstevel@tonic-gate 20140Sstevel@tonic-gate *) Enhance the general user interface with mechanisms to better support 20150Sstevel@tonic-gate dialog box interfaces, application-defined prompts, the possibility 20160Sstevel@tonic-gate to use defaults (for example default passwords from somewhere else) 20170Sstevel@tonic-gate and interrupts/cancellations. 20180Sstevel@tonic-gate [Richard Levitte] 20190Sstevel@tonic-gate 20200Sstevel@tonic-gate *) Tidy up PKCS#12 attribute handling. Add support for the CSP name 20210Sstevel@tonic-gate attribute in PKCS#12 files, add new -CSP option to pkcs12 utility. 20220Sstevel@tonic-gate [Steve Henson] 20230Sstevel@tonic-gate 20240Sstevel@tonic-gate *) Fix a memory leak in 'sk_dup()' in the case reallocation fails. (Also 20250Sstevel@tonic-gate tidy up some unnecessarily weird code in 'sk_new()'). 20260Sstevel@tonic-gate [Geoff, reported by Diego Tartara <dtartara@novamens.com>] 20270Sstevel@tonic-gate 20280Sstevel@tonic-gate *) Change the key loading routines for ENGINEs to use the same kind 20290Sstevel@tonic-gate callback (pem_password_cb) as all other routines that need this 20300Sstevel@tonic-gate kind of callback. 20310Sstevel@tonic-gate [Richard Levitte] 20320Sstevel@tonic-gate 20330Sstevel@tonic-gate *) Increase ENTROPY_NEEDED to 32 bytes, as Rijndael can operate with 20340Sstevel@tonic-gate 256 bit (=32 byte) keys. Of course seeding with more entropy bytes 20350Sstevel@tonic-gate than this minimum value is recommended. 20360Sstevel@tonic-gate [Lutz Jaenicke] 20370Sstevel@tonic-gate 20380Sstevel@tonic-gate *) New random seeder for OpenVMS, using the system process statistics 20390Sstevel@tonic-gate that are easily reachable. 20400Sstevel@tonic-gate [Richard Levitte] 20410Sstevel@tonic-gate 20420Sstevel@tonic-gate *) Windows apparently can't transparently handle global 20430Sstevel@tonic-gate variables defined in DLLs. Initialisations such as: 20440Sstevel@tonic-gate 20450Sstevel@tonic-gate const ASN1_ITEM *it = &ASN1_INTEGER_it; 20460Sstevel@tonic-gate 20470Sstevel@tonic-gate wont compile. This is used by the any applications that need to 20480Sstevel@tonic-gate declare their own ASN1 modules. This was fixed by adding the option 20490Sstevel@tonic-gate EXPORT_VAR_AS_FN to all Win32 platforms, although this isn't strictly 20500Sstevel@tonic-gate needed for static libraries under Win32. 20510Sstevel@tonic-gate [Steve Henson] 20520Sstevel@tonic-gate 20530Sstevel@tonic-gate *) New functions X509_PURPOSE_set() and X509_TRUST_set() to handle 20540Sstevel@tonic-gate setting of purpose and trust fields. New X509_STORE trust and 20550Sstevel@tonic-gate purpose functions and tidy up setting in other SSL functions. 20560Sstevel@tonic-gate [Steve Henson] 20570Sstevel@tonic-gate 20580Sstevel@tonic-gate *) Add copies of X509_STORE_CTX fields and callbacks to X509_STORE 20590Sstevel@tonic-gate structure. These are inherited by X509_STORE_CTX when it is 20600Sstevel@tonic-gate initialised. This allows various defaults to be set in the 20610Sstevel@tonic-gate X509_STORE structure (such as flags for CRL checking and custom 20620Sstevel@tonic-gate purpose or trust settings) for functions which only use X509_STORE_CTX 20630Sstevel@tonic-gate internally such as S/MIME. 20640Sstevel@tonic-gate 20650Sstevel@tonic-gate Modify X509_STORE_CTX_purpose_inherit() so it only sets purposes and 20660Sstevel@tonic-gate trust settings if they are not set in X509_STORE. This allows X509_STORE 20670Sstevel@tonic-gate purposes and trust (in S/MIME for example) to override any set by default. 20680Sstevel@tonic-gate 20690Sstevel@tonic-gate Add command line options for CRL checking to smime, s_client and s_server 20700Sstevel@tonic-gate applications. 20710Sstevel@tonic-gate [Steve Henson] 20720Sstevel@tonic-gate 20730Sstevel@tonic-gate *) Initial CRL based revocation checking. If the CRL checking flag(s) 20740Sstevel@tonic-gate are set then the CRL is looked up in the X509_STORE structure and 20750Sstevel@tonic-gate its validity and signature checked, then if the certificate is found 20760Sstevel@tonic-gate in the CRL the verify fails with a revoked error. 20770Sstevel@tonic-gate 20780Sstevel@tonic-gate Various new CRL related callbacks added to X509_STORE_CTX structure. 20790Sstevel@tonic-gate 20800Sstevel@tonic-gate Command line options added to 'verify' application to support this. 20810Sstevel@tonic-gate 20820Sstevel@tonic-gate This needs some additional work, such as being able to handle multiple 20830Sstevel@tonic-gate CRLs with different times, extension based lookup (rather than just 20840Sstevel@tonic-gate by subject name) and ultimately more complete V2 CRL extension 20850Sstevel@tonic-gate handling. 20860Sstevel@tonic-gate [Steve Henson] 20870Sstevel@tonic-gate 20880Sstevel@tonic-gate *) Add a general user interface API (crypto/ui/). This is designed 20890Sstevel@tonic-gate to replace things like des_read_password and friends (backward 20900Sstevel@tonic-gate compatibility functions using this new API are provided). 20910Sstevel@tonic-gate The purpose is to remove prompting functions from the DES code 20920Sstevel@tonic-gate section as well as provide for prompting through dialog boxes in 20930Sstevel@tonic-gate a window system and the like. 20940Sstevel@tonic-gate [Richard Levitte] 20950Sstevel@tonic-gate 20960Sstevel@tonic-gate *) Add "ex_data" support to ENGINE so implementations can add state at a 20970Sstevel@tonic-gate per-structure level rather than having to store it globally. 20980Sstevel@tonic-gate [Geoff] 20990Sstevel@tonic-gate 21000Sstevel@tonic-gate *) Make it possible for ENGINE structures to be copied when retrieved by 21010Sstevel@tonic-gate ENGINE_by_id() if the ENGINE specifies a new flag: ENGINE_FLAGS_BY_ID_COPY. 21020Sstevel@tonic-gate This causes the "original" ENGINE structure to act like a template, 21030Sstevel@tonic-gate analogous to the RSA vs. RSA_METHOD type of separation. Because of this 21040Sstevel@tonic-gate operational state can be localised to each ENGINE structure, despite the 21050Sstevel@tonic-gate fact they all share the same "methods". New ENGINE structures returned in 21060Sstevel@tonic-gate this case have no functional references and the return value is the single 21070Sstevel@tonic-gate structural reference. This matches the single structural reference returned 21080Sstevel@tonic-gate by ENGINE_by_id() normally, when it is incremented on the pre-existing 21090Sstevel@tonic-gate ENGINE structure. 21100Sstevel@tonic-gate [Geoff] 21110Sstevel@tonic-gate 21120Sstevel@tonic-gate *) Fix ASN1 decoder when decoding type ANY and V_ASN1_OTHER: since this 21130Sstevel@tonic-gate needs to match any other type at all we need to manually clear the 21140Sstevel@tonic-gate tag cache. 21150Sstevel@tonic-gate [Steve Henson] 21160Sstevel@tonic-gate 21170Sstevel@tonic-gate *) Changes to the "openssl engine" utility to include; 21180Sstevel@tonic-gate - verbosity levels ('-v', '-vv', and '-vvv') that provide information 21190Sstevel@tonic-gate about an ENGINE's available control commands. 21200Sstevel@tonic-gate - executing control commands from command line arguments using the 21210Sstevel@tonic-gate '-pre' and '-post' switches. '-post' is only used if '-t' is 21220Sstevel@tonic-gate specified and the ENGINE is successfully initialised. The syntax for 21230Sstevel@tonic-gate the individual commands are colon-separated, for example; 21240Sstevel@tonic-gate openssl engine chil -pre FORK_CHECK:0 -pre SO_PATH:/lib/test.so 21250Sstevel@tonic-gate [Geoff] 21260Sstevel@tonic-gate 21270Sstevel@tonic-gate *) New dynamic control command support for ENGINEs. ENGINEs can now 21280Sstevel@tonic-gate declare their own commands (numbers), names (strings), descriptions, 21290Sstevel@tonic-gate and input types for run-time discovery by calling applications. A 21300Sstevel@tonic-gate subset of these commands are implicitly classed as "executable" 21310Sstevel@tonic-gate depending on their input type, and only these can be invoked through 21320Sstevel@tonic-gate the new string-based API function ENGINE_ctrl_cmd_string(). (Eg. this 21330Sstevel@tonic-gate can be based on user input, config files, etc). The distinction is 21340Sstevel@tonic-gate that "executable" commands cannot return anything other than a boolean 21350Sstevel@tonic-gate result and can only support numeric or string input, whereas some 21360Sstevel@tonic-gate discoverable commands may only be for direct use through 21370Sstevel@tonic-gate ENGINE_ctrl(), eg. supporting the exchange of binary data, function 21380Sstevel@tonic-gate pointers, or other custom uses. The "executable" commands are to 21390Sstevel@tonic-gate support parameterisations of ENGINE behaviour that can be 21400Sstevel@tonic-gate unambiguously defined by ENGINEs and used consistently across any 21410Sstevel@tonic-gate OpenSSL-based application. Commands have been added to all the 21420Sstevel@tonic-gate existing hardware-supporting ENGINEs, noticeably "SO_PATH" to allow 21430Sstevel@tonic-gate control over shared-library paths without source code alterations. 21440Sstevel@tonic-gate [Geoff] 21450Sstevel@tonic-gate 21460Sstevel@tonic-gate *) Changed all ENGINE implementations to dynamically allocate their 21470Sstevel@tonic-gate ENGINEs rather than declaring them statically. Apart from this being 21480Sstevel@tonic-gate necessary with the removal of the ENGINE_FLAGS_MALLOCED distinction, 21490Sstevel@tonic-gate this also allows the implementations to compile without using the 21500Sstevel@tonic-gate internal engine_int.h header. 21510Sstevel@tonic-gate [Geoff] 21520Sstevel@tonic-gate 21530Sstevel@tonic-gate *) Minor adjustment to "rand" code. RAND_get_rand_method() now returns a 21540Sstevel@tonic-gate 'const' value. Any code that should be able to modify a RAND_METHOD 21550Sstevel@tonic-gate should already have non-const pointers to it (ie. they should only 21560Sstevel@tonic-gate modify their own ones). 21570Sstevel@tonic-gate [Geoff] 21580Sstevel@tonic-gate 21590Sstevel@tonic-gate *) Made a variety of little tweaks to the ENGINE code. 21600Sstevel@tonic-gate - "atalla" and "ubsec" string definitions were moved from header files 21610Sstevel@tonic-gate to C code. "nuron" string definitions were placed in variables 21620Sstevel@tonic-gate rather than hard-coded - allowing parameterisation of these values 21630Sstevel@tonic-gate later on via ctrl() commands. 21640Sstevel@tonic-gate - Removed unused "#if 0"'d code. 21650Sstevel@tonic-gate - Fixed engine list iteration code so it uses ENGINE_free() to release 21660Sstevel@tonic-gate structural references. 21670Sstevel@tonic-gate - Constified the RAND_METHOD element of ENGINE structures. 21680Sstevel@tonic-gate - Constified various get/set functions as appropriate and added 21690Sstevel@tonic-gate missing functions (including a catch-all ENGINE_cpy that duplicates 21700Sstevel@tonic-gate all ENGINE values onto a new ENGINE except reference counts/state). 21710Sstevel@tonic-gate - Removed NULL parameter checks in get/set functions. Setting a method 21720Sstevel@tonic-gate or function to NULL is a way of cancelling out a previously set 21730Sstevel@tonic-gate value. Passing a NULL ENGINE parameter is just plain stupid anyway 21740Sstevel@tonic-gate and doesn't justify the extra error symbols and code. 21750Sstevel@tonic-gate - Deprecate the ENGINE_FLAGS_MALLOCED define and move the area for 21760Sstevel@tonic-gate flags from engine_int.h to engine.h. 21770Sstevel@tonic-gate - Changed prototypes for ENGINE handler functions (init(), finish(), 21780Sstevel@tonic-gate ctrl(), key-load functions, etc) to take an (ENGINE*) parameter. 21790Sstevel@tonic-gate [Geoff] 21800Sstevel@tonic-gate 21810Sstevel@tonic-gate *) Implement binary inversion algorithm for BN_mod_inverse in addition 21820Sstevel@tonic-gate to the algorithm using long division. The binary algorithm can be 21830Sstevel@tonic-gate used only if the modulus is odd. On 32-bit systems, it is faster 21840Sstevel@tonic-gate only for relatively small moduli (roughly 20-30% for 128-bit moduli, 21850Sstevel@tonic-gate roughly 5-15% for 256-bit moduli), so we use it only for moduli 21860Sstevel@tonic-gate up to 450 bits. In 64-bit environments, the binary algorithm 21870Sstevel@tonic-gate appears to be advantageous for much longer moduli; here we use it 21880Sstevel@tonic-gate for moduli up to 2048 bits. 21890Sstevel@tonic-gate [Bodo Moeller] 21900Sstevel@tonic-gate 21910Sstevel@tonic-gate *) Rewrite CHOICE field setting in ASN1_item_ex_d2i(). The old code 21920Sstevel@tonic-gate could not support the combine flag in choice fields. 21930Sstevel@tonic-gate [Steve Henson] 21940Sstevel@tonic-gate 21950Sstevel@tonic-gate *) Add a 'copy_extensions' option to the 'ca' utility. This copies 21960Sstevel@tonic-gate extensions from a certificate request to the certificate. 21970Sstevel@tonic-gate [Steve Henson] 21980Sstevel@tonic-gate 21990Sstevel@tonic-gate *) Allow multiple 'certopt' and 'nameopt' options to be separated 22000Sstevel@tonic-gate by commas. Add 'namopt' and 'certopt' options to the 'ca' config 22010Sstevel@tonic-gate file: this allows the display of the certificate about to be 22020Sstevel@tonic-gate signed to be customised, to allow certain fields to be included 22030Sstevel@tonic-gate or excluded and extension details. The old system didn't display 22040Sstevel@tonic-gate multicharacter strings properly, omitted fields not in the policy 22050Sstevel@tonic-gate and couldn't display additional details such as extensions. 22060Sstevel@tonic-gate [Steve Henson] 22070Sstevel@tonic-gate 22080Sstevel@tonic-gate *) Function EC_POINTs_mul for multiple scalar multiplication 22090Sstevel@tonic-gate of an arbitrary number of elliptic curve points 22100Sstevel@tonic-gate \sum scalars[i]*points[i], 22110Sstevel@tonic-gate optionally including the generator defined for the EC_GROUP: 22120Sstevel@tonic-gate scalar*generator + \sum scalars[i]*points[i]. 22130Sstevel@tonic-gate 22140Sstevel@tonic-gate EC_POINT_mul is a simple wrapper function for the typical case 22150Sstevel@tonic-gate that the point list has just one item (besides the optional 22160Sstevel@tonic-gate generator). 22170Sstevel@tonic-gate [Bodo Moeller] 22180Sstevel@tonic-gate 22190Sstevel@tonic-gate *) First EC_METHODs for curves over GF(p): 22200Sstevel@tonic-gate 22210Sstevel@tonic-gate EC_GFp_simple_method() uses the basic BN_mod_mul and BN_mod_sqr 22220Sstevel@tonic-gate operations and provides various method functions that can also 22230Sstevel@tonic-gate operate with faster implementations of modular arithmetic. 22240Sstevel@tonic-gate 22250Sstevel@tonic-gate EC_GFp_mont_method() reuses most functions that are part of 22260Sstevel@tonic-gate EC_GFp_simple_method, but uses Montgomery arithmetic. 22270Sstevel@tonic-gate 22280Sstevel@tonic-gate [Bodo Moeller; point addition and point doubling 22290Sstevel@tonic-gate implementation directly derived from source code provided by 22300Sstevel@tonic-gate Lenka Fibikova <fibikova@exp-math.uni-essen.de>] 22310Sstevel@tonic-gate 22320Sstevel@tonic-gate *) Framework for elliptic curves (crypto/ec/ec.h, crypto/ec/ec_lcl.h, 22330Sstevel@tonic-gate crypto/ec/ec_lib.c): 22340Sstevel@tonic-gate 22350Sstevel@tonic-gate Curves are EC_GROUP objects (with an optional group generator) 22360Sstevel@tonic-gate based on EC_METHODs that are built into the library. 22370Sstevel@tonic-gate 22380Sstevel@tonic-gate Points are EC_POINT objects based on EC_GROUP objects. 22390Sstevel@tonic-gate 22400Sstevel@tonic-gate Most of the framework would be able to handle curves over arbitrary 22410Sstevel@tonic-gate finite fields, but as there are no obvious types for fields other 22420Sstevel@tonic-gate than GF(p), some functions are limited to that for now. 22430Sstevel@tonic-gate [Bodo Moeller] 22440Sstevel@tonic-gate 22450Sstevel@tonic-gate *) Add the -HTTP option to s_server. It is similar to -WWW, but requires 22460Sstevel@tonic-gate that the file contains a complete HTTP response. 22470Sstevel@tonic-gate [Richard Levitte] 22480Sstevel@tonic-gate 22490Sstevel@tonic-gate *) Add the ec directory to mkdef.pl and mkfiles.pl. In mkdef.pl 22500Sstevel@tonic-gate change the def and num file printf format specifier from "%-40sXXX" 22510Sstevel@tonic-gate to "%-39s XXX". The latter will always guarantee a space after the 22520Sstevel@tonic-gate field while the former will cause them to run together if the field 22530Sstevel@tonic-gate is 40 of more characters long. 22540Sstevel@tonic-gate [Steve Henson] 22550Sstevel@tonic-gate 22560Sstevel@tonic-gate *) Constify the cipher and digest 'method' functions and structures 22570Sstevel@tonic-gate and modify related functions to take constant EVP_MD and EVP_CIPHER 22580Sstevel@tonic-gate pointers. 22590Sstevel@tonic-gate [Steve Henson] 22600Sstevel@tonic-gate 22610Sstevel@tonic-gate *) Hide BN_CTX structure details in bn_lcl.h instead of publishing them 22620Sstevel@tonic-gate in <openssl/bn.h>. Also further increase BN_CTX_NUM to 32. 22630Sstevel@tonic-gate [Bodo Moeller] 22640Sstevel@tonic-gate 22650Sstevel@tonic-gate *) Modify EVP_Digest*() routines so they now return values. Although the 22660Sstevel@tonic-gate internal software routines can never fail additional hardware versions 22670Sstevel@tonic-gate might. 22680Sstevel@tonic-gate [Steve Henson] 22690Sstevel@tonic-gate 22700Sstevel@tonic-gate *) Clean up crypto/err/err.h and change some error codes to avoid conflicts: 22710Sstevel@tonic-gate 22720Sstevel@tonic-gate Previously ERR_R_FATAL was too small and coincided with ERR_LIB_PKCS7 22730Sstevel@tonic-gate (= ERR_R_PKCS7_LIB); it is now 64 instead of 32. 22740Sstevel@tonic-gate 22750Sstevel@tonic-gate ASN1 error codes 22760Sstevel@tonic-gate ERR_R_NESTED_ASN1_ERROR 22770Sstevel@tonic-gate ... 22780Sstevel@tonic-gate ERR_R_MISSING_ASN1_EOS 22790Sstevel@tonic-gate were 4 .. 9, conflicting with 22800Sstevel@tonic-gate ERR_LIB_RSA (= ERR_R_RSA_LIB) 22810Sstevel@tonic-gate ... 22820Sstevel@tonic-gate ERR_LIB_PEM (= ERR_R_PEM_LIB). 22830Sstevel@tonic-gate They are now 58 .. 63 (i.e., just below ERR_R_FATAL). 22840Sstevel@tonic-gate 22850Sstevel@tonic-gate Add new error code 'ERR_R_INTERNAL_ERROR'. 22860Sstevel@tonic-gate [Bodo Moeller] 22870Sstevel@tonic-gate 22880Sstevel@tonic-gate *) Don't overuse locks in crypto/err/err.c: For data retrieval, CRYPTO_r_lock 22890Sstevel@tonic-gate suffices. 22900Sstevel@tonic-gate [Bodo Moeller] 22910Sstevel@tonic-gate 22920Sstevel@tonic-gate *) New option '-subj arg' for 'openssl req' and 'openssl ca'. This 22930Sstevel@tonic-gate sets the subject name for a new request or supersedes the 22940Sstevel@tonic-gate subject name in a given request. Formats that can be parsed are 22950Sstevel@tonic-gate 'CN=Some Name, OU=myOU, C=IT' 22960Sstevel@tonic-gate and 22970Sstevel@tonic-gate 'CN=Some Name/OU=myOU/C=IT'. 22980Sstevel@tonic-gate 22990Sstevel@tonic-gate Add options '-batch' and '-verbose' to 'openssl req'. 23000Sstevel@tonic-gate [Massimiliano Pala <madwolf@hackmasters.net>] 23010Sstevel@tonic-gate 23020Sstevel@tonic-gate *) Introduce the possibility to access global variables through 23030Sstevel@tonic-gate functions on platform were that's the best way to handle exporting 23040Sstevel@tonic-gate global variables in shared libraries. To enable this functionality, 23050Sstevel@tonic-gate one must configure with "EXPORT_VAR_AS_FN" or defined the C macro 23060Sstevel@tonic-gate "OPENSSL_EXPORT_VAR_AS_FUNCTION" in crypto/opensslconf.h (the latter 23070Sstevel@tonic-gate is normally done by Configure or something similar). 23080Sstevel@tonic-gate 23090Sstevel@tonic-gate To implement a global variable, use the macro OPENSSL_IMPLEMENT_GLOBAL 23100Sstevel@tonic-gate in the source file (foo.c) like this: 23110Sstevel@tonic-gate 23120Sstevel@tonic-gate OPENSSL_IMPLEMENT_GLOBAL(int,foo)=1; 23130Sstevel@tonic-gate OPENSSL_IMPLEMENT_GLOBAL(double,bar); 23140Sstevel@tonic-gate 23150Sstevel@tonic-gate To declare a global variable, use the macros OPENSSL_DECLARE_GLOBAL 23160Sstevel@tonic-gate and OPENSSL_GLOBAL_REF in the header file (foo.h) like this: 23170Sstevel@tonic-gate 23180Sstevel@tonic-gate OPENSSL_DECLARE_GLOBAL(int,foo); 23190Sstevel@tonic-gate #define foo OPENSSL_GLOBAL_REF(foo) 23200Sstevel@tonic-gate OPENSSL_DECLARE_GLOBAL(double,bar); 23210Sstevel@tonic-gate #define bar OPENSSL_GLOBAL_REF(bar) 23220Sstevel@tonic-gate 23230Sstevel@tonic-gate The #defines are very important, and therefore so is including the 23240Sstevel@tonic-gate header file everywhere where the defined globals are used. 23250Sstevel@tonic-gate 23260Sstevel@tonic-gate The macro OPENSSL_EXPORT_VAR_AS_FUNCTION also affects the definition 23270Sstevel@tonic-gate of ASN.1 items, but that structure is a bit different. 23280Sstevel@tonic-gate 23290Sstevel@tonic-gate The largest change is in util/mkdef.pl which has been enhanced with 23300Sstevel@tonic-gate better and easier to understand logic to choose which symbols should 23310Sstevel@tonic-gate go into the Windows .def files as well as a number of fixes and code 23320Sstevel@tonic-gate cleanup (among others, algorithm keywords are now sorted 23330Sstevel@tonic-gate lexicographically to avoid constant rewrites). 23340Sstevel@tonic-gate [Richard Levitte] 23350Sstevel@tonic-gate 23360Sstevel@tonic-gate *) In BN_div() keep a copy of the sign of 'num' before writing the 23370Sstevel@tonic-gate result to 'rm' because if rm==num the value will be overwritten 23380Sstevel@tonic-gate and produce the wrong result if 'num' is negative: this caused 23390Sstevel@tonic-gate problems with BN_mod() and BN_nnmod(). 23400Sstevel@tonic-gate [Steve Henson] 23410Sstevel@tonic-gate 23420Sstevel@tonic-gate *) Function OCSP_request_verify(). This checks the signature on an 23430Sstevel@tonic-gate OCSP request and verifies the signer certificate. The signer 23440Sstevel@tonic-gate certificate is just checked for a generic purpose and OCSP request 23450Sstevel@tonic-gate trust settings. 23460Sstevel@tonic-gate [Steve Henson] 23470Sstevel@tonic-gate 23480Sstevel@tonic-gate *) Add OCSP_check_validity() function to check the validity of OCSP 23490Sstevel@tonic-gate responses. OCSP responses are prepared in real time and may only 23500Sstevel@tonic-gate be a few seconds old. Simply checking that the current time lies 23510Sstevel@tonic-gate between thisUpdate and nextUpdate max reject otherwise valid responses 23520Sstevel@tonic-gate caused by either OCSP responder or client clock inaccuracy. Instead 23530Sstevel@tonic-gate we allow thisUpdate and nextUpdate to fall within a certain period of 23540Sstevel@tonic-gate the current time. The age of the response can also optionally be 23550Sstevel@tonic-gate checked. Two new options -validity_period and -status_age added to 23560Sstevel@tonic-gate ocsp utility. 23570Sstevel@tonic-gate [Steve Henson] 23580Sstevel@tonic-gate 23590Sstevel@tonic-gate *) If signature or public key algorithm is unrecognized print out its 23600Sstevel@tonic-gate OID rather that just UNKNOWN. 23610Sstevel@tonic-gate [Steve Henson] 23620Sstevel@tonic-gate 23630Sstevel@tonic-gate *) Change OCSP_cert_to_id() to tolerate a NULL subject certificate and 23640Sstevel@tonic-gate OCSP_cert_id_new() a NULL serialNumber. This allows a partial certificate 23650Sstevel@tonic-gate ID to be generated from the issuer certificate alone which can then be 23660Sstevel@tonic-gate passed to OCSP_id_issuer_cmp(). 23670Sstevel@tonic-gate [Steve Henson] 23680Sstevel@tonic-gate 23690Sstevel@tonic-gate *) New compilation option ASN1_ITEM_FUNCTIONS. This causes the new 23700Sstevel@tonic-gate ASN1 modules to export functions returning ASN1_ITEM pointers 23710Sstevel@tonic-gate instead of the ASN1_ITEM structures themselves. This adds several 23720Sstevel@tonic-gate new macros which allow the underlying ASN1 function/structure to 23730Sstevel@tonic-gate be accessed transparently. As a result code should not use ASN1_ITEM 23740Sstevel@tonic-gate references directly (such as &X509_it) but instead use the relevant 23750Sstevel@tonic-gate macros (such as ASN1_ITEM_rptr(X509)). This option is to allow 23760Sstevel@tonic-gate use of the new ASN1 code on platforms where exporting structures 23770Sstevel@tonic-gate is problematical (for example in shared libraries) but exporting 23780Sstevel@tonic-gate functions returning pointers to structures is not. 23790Sstevel@tonic-gate [Steve Henson] 23800Sstevel@tonic-gate 23810Sstevel@tonic-gate *) Add support for overriding the generation of SSL/TLS session IDs. 23820Sstevel@tonic-gate These callbacks can be registered either in an SSL_CTX or per SSL. 23830Sstevel@tonic-gate The purpose of this is to allow applications to control, if they wish, 23840Sstevel@tonic-gate the arbitrary values chosen for use as session IDs, particularly as it 23850Sstevel@tonic-gate can be useful for session caching in multiple-server environments. A 23860Sstevel@tonic-gate command-line switch for testing this (and any client code that wishes 23870Sstevel@tonic-gate to use such a feature) has been added to "s_server". 23880Sstevel@tonic-gate [Geoff Thorpe, Lutz Jaenicke] 23890Sstevel@tonic-gate 23900Sstevel@tonic-gate *) Modify mkdef.pl to recognise and parse preprocessor conditionals 23910Sstevel@tonic-gate of the form '#if defined(...) || defined(...) || ...' and 23920Sstevel@tonic-gate '#if !defined(...) && !defined(...) && ...'. This also avoids 23930Sstevel@tonic-gate the growing number of special cases it was previously handling. 23940Sstevel@tonic-gate [Richard Levitte] 23950Sstevel@tonic-gate 23960Sstevel@tonic-gate *) Make all configuration macros available for application by making 23970Sstevel@tonic-gate sure they are available in opensslconf.h, by giving them names starting 23980Sstevel@tonic-gate with "OPENSSL_" to avoid conflicts with other packages and by making 23990Sstevel@tonic-gate sure e_os2.h will cover all platform-specific cases together with 24000Sstevel@tonic-gate opensslconf.h. 24010Sstevel@tonic-gate Additionally, it is now possible to define configuration/platform- 24020Sstevel@tonic-gate specific names (called "system identities"). In the C code, these 24030Sstevel@tonic-gate are prefixed with "OPENSSL_SYSNAME_". e_os2.h will create another 24040Sstevel@tonic-gate macro with the name beginning with "OPENSSL_SYS_", which is determined 24050Sstevel@tonic-gate from "OPENSSL_SYSNAME_*" or compiler-specific macros depending on 24060Sstevel@tonic-gate what is available. 24070Sstevel@tonic-gate [Richard Levitte] 24080Sstevel@tonic-gate 24090Sstevel@tonic-gate *) New option -set_serial to 'req' and 'x509' this allows the serial 24100Sstevel@tonic-gate number to use to be specified on the command line. Previously self 24110Sstevel@tonic-gate signed certificates were hard coded with serial number 0 and the 24120Sstevel@tonic-gate CA options of 'x509' had to use a serial number in a file which was 24130Sstevel@tonic-gate auto incremented. 24140Sstevel@tonic-gate [Steve Henson] 24150Sstevel@tonic-gate 24160Sstevel@tonic-gate *) New options to 'ca' utility to support V2 CRL entry extensions. 24170Sstevel@tonic-gate Currently CRL reason, invalidity date and hold instruction are 24180Sstevel@tonic-gate supported. Add new CRL extensions to V3 code and some new objects. 24190Sstevel@tonic-gate [Steve Henson] 24200Sstevel@tonic-gate 24210Sstevel@tonic-gate *) New function EVP_CIPHER_CTX_set_padding() this is used to 24220Sstevel@tonic-gate disable standard block padding (aka PKCS#5 padding) in the EVP 24230Sstevel@tonic-gate API, which was previously mandatory. This means that the data is 24240Sstevel@tonic-gate not padded in any way and so the total length much be a multiple 24250Sstevel@tonic-gate of the block size, otherwise an error occurs. 24260Sstevel@tonic-gate [Steve Henson] 24270Sstevel@tonic-gate 24280Sstevel@tonic-gate *) Initial (incomplete) OCSP SSL support. 24290Sstevel@tonic-gate [Steve Henson] 24300Sstevel@tonic-gate 24310Sstevel@tonic-gate *) New function OCSP_parse_url(). This splits up a URL into its host, 24320Sstevel@tonic-gate port and path components: primarily to parse OCSP URLs. New -url 24330Sstevel@tonic-gate option to ocsp utility. 24340Sstevel@tonic-gate [Steve Henson] 24350Sstevel@tonic-gate 24360Sstevel@tonic-gate *) New nonce behavior. The return value of OCSP_check_nonce() now 24370Sstevel@tonic-gate reflects the various checks performed. Applications can decide 24380Sstevel@tonic-gate whether to tolerate certain situations such as an absent nonce 24390Sstevel@tonic-gate in a response when one was present in a request: the ocsp application 24400Sstevel@tonic-gate just prints out a warning. New function OCSP_add1_basic_nonce() 24410Sstevel@tonic-gate this is to allow responders to include a nonce in a response even if 24420Sstevel@tonic-gate the request is nonce-less. 24430Sstevel@tonic-gate [Steve Henson] 24440Sstevel@tonic-gate 24450Sstevel@tonic-gate *) Disable stdin buffering in load_cert (apps/apps.c) so that no certs are 24460Sstevel@tonic-gate skipped when using openssl x509 multiple times on a single input file, 24470Sstevel@tonic-gate e.g. "(openssl x509 -out cert1; openssl x509 -out cert2) <certs". 24480Sstevel@tonic-gate [Bodo Moeller] 24490Sstevel@tonic-gate 24500Sstevel@tonic-gate *) Make ASN1_UTCTIME_set_string() and ASN1_GENERALIZEDTIME_set_string() 24510Sstevel@tonic-gate set string type: to handle setting ASN1_TIME structures. Fix ca 24520Sstevel@tonic-gate utility to correctly initialize revocation date of CRLs. 24530Sstevel@tonic-gate [Steve Henson] 24540Sstevel@tonic-gate 24550Sstevel@tonic-gate *) New option SSL_OP_CIPHER_SERVER_PREFERENCE allows the server to override 24560Sstevel@tonic-gate the clients preferred ciphersuites and rather use its own preferences. 24570Sstevel@tonic-gate Should help to work around M$ SGC (Server Gated Cryptography) bug in 24580Sstevel@tonic-gate Internet Explorer by ensuring unchanged hash method during stepup. 24590Sstevel@tonic-gate (Also replaces the broken/deactivated SSL_OP_NON_EXPORT_FIRST option.) 24600Sstevel@tonic-gate [Lutz Jaenicke] 24610Sstevel@tonic-gate 24620Sstevel@tonic-gate *) Make mkdef.pl recognise all DECLARE_ASN1 macros, change rijndael 24630Sstevel@tonic-gate to aes and add a new 'exist' option to print out symbols that don't 24640Sstevel@tonic-gate appear to exist. 24650Sstevel@tonic-gate [Steve Henson] 24660Sstevel@tonic-gate 24670Sstevel@tonic-gate *) Additional options to ocsp utility to allow flags to be set and 24680Sstevel@tonic-gate additional certificates supplied. 24690Sstevel@tonic-gate [Steve Henson] 24700Sstevel@tonic-gate 24710Sstevel@tonic-gate *) Add the option -VAfile to 'openssl ocsp', so the user can give the 24720Sstevel@tonic-gate OCSP client a number of certificate to only verify the response 24730Sstevel@tonic-gate signature against. 24740Sstevel@tonic-gate [Richard Levitte] 24750Sstevel@tonic-gate 24760Sstevel@tonic-gate *) Update Rijndael code to version 3.0 and change EVP AES ciphers to 24770Sstevel@tonic-gate handle the new API. Currently only ECB, CBC modes supported. Add new 24780Sstevel@tonic-gate AES OIDs. 24790Sstevel@tonic-gate 24800Sstevel@tonic-gate Add TLS AES ciphersuites as described in RFC3268, "Advanced 24810Sstevel@tonic-gate Encryption Standard (AES) Ciphersuites for Transport Layer 24820Sstevel@tonic-gate Security (TLS)". (In beta versions of OpenSSL 0.9.7, these were 24830Sstevel@tonic-gate not enabled by default and were not part of the "ALL" ciphersuite 24840Sstevel@tonic-gate alias because they were not yet official; they could be 24850Sstevel@tonic-gate explicitly requested by specifying the "AESdraft" ciphersuite 24860Sstevel@tonic-gate group alias. In the final release of OpenSSL 0.9.7, the group 24870Sstevel@tonic-gate alias is called "AES" and is part of "ALL".) 24880Sstevel@tonic-gate [Ben Laurie, Steve Henson, Bodo Moeller] 24890Sstevel@tonic-gate 24900Sstevel@tonic-gate *) New function OCSP_copy_nonce() to copy nonce value (if present) from 24910Sstevel@tonic-gate request to response. 24920Sstevel@tonic-gate [Steve Henson] 24930Sstevel@tonic-gate 24940Sstevel@tonic-gate *) Functions for OCSP responders. OCSP_request_onereq_count(), 24950Sstevel@tonic-gate OCSP_request_onereq_get0(), OCSP_onereq_get0_id() and OCSP_id_get0_info() 24960Sstevel@tonic-gate extract information from a certificate request. OCSP_response_create() 24970Sstevel@tonic-gate creates a response and optionally adds a basic response structure. 24980Sstevel@tonic-gate OCSP_basic_add1_status() adds a complete single response to a basic 24990Sstevel@tonic-gate response and returns the OCSP_SINGLERESP structure just added (to allow 25000Sstevel@tonic-gate extensions to be included for example). OCSP_basic_add1_cert() adds a 25010Sstevel@tonic-gate certificate to a basic response and OCSP_basic_sign() signs a basic 25020Sstevel@tonic-gate response with various flags. New helper functions ASN1_TIME_check() 25030Sstevel@tonic-gate (checks validity of ASN1_TIME structure) and ASN1_TIME_to_generalizedtime() 25040Sstevel@tonic-gate (converts ASN1_TIME to GeneralizedTime). 25050Sstevel@tonic-gate [Steve Henson] 25060Sstevel@tonic-gate 25070Sstevel@tonic-gate *) Various new functions. EVP_Digest() combines EVP_Digest{Init,Update,Final}() 25080Sstevel@tonic-gate in a single operation. X509_get0_pubkey_bitstr() extracts the public_key 25090Sstevel@tonic-gate structure from a certificate. X509_pubkey_digest() digests the public_key 25100Sstevel@tonic-gate contents: this is used in various key identifiers. 25110Sstevel@tonic-gate [Steve Henson] 25120Sstevel@tonic-gate 25130Sstevel@tonic-gate *) Make sk_sort() tolerate a NULL argument. 25140Sstevel@tonic-gate [Steve Henson reported by Massimiliano Pala <madwolf@comune.modena.it>] 25150Sstevel@tonic-gate 25160Sstevel@tonic-gate *) New OCSP verify flag OCSP_TRUSTOTHER. When set the "other" certificates 25170Sstevel@tonic-gate passed by the function are trusted implicitly. If any of them signed the 25180Sstevel@tonic-gate response then it is assumed to be valid and is not verified. 25190Sstevel@tonic-gate [Steve Henson] 25200Sstevel@tonic-gate 25210Sstevel@tonic-gate *) In PKCS7_set_type() initialise content_type in PKCS7_ENC_CONTENT 25220Sstevel@tonic-gate to data. This was previously part of the PKCS7 ASN1 code. This 25230Sstevel@tonic-gate was causing problems with OpenSSL created PKCS#12 and PKCS#7 structures. 25240Sstevel@tonic-gate [Steve Henson, reported by Kenneth R. Robinette 25250Sstevel@tonic-gate <support@securenetterm.com>] 25260Sstevel@tonic-gate 25270Sstevel@tonic-gate *) Add CRYPTO_push_info() and CRYPTO_pop_info() calls to new ASN1 25280Sstevel@tonic-gate routines: without these tracing memory leaks is very painful. 25290Sstevel@tonic-gate Fix leaks in PKCS12 and PKCS7 routines. 25300Sstevel@tonic-gate [Steve Henson] 25310Sstevel@tonic-gate 25320Sstevel@tonic-gate *) Make X509_time_adj() cope with the new behaviour of ASN1_TIME_new(). 25330Sstevel@tonic-gate Previously it initialised the 'type' argument to V_ASN1_UTCTIME which 25340Sstevel@tonic-gate effectively meant GeneralizedTime would never be used. Now it 25350Sstevel@tonic-gate is initialised to -1 but X509_time_adj() now has to check the value 25360Sstevel@tonic-gate and use ASN1_TIME_set() if the value is not V_ASN1_UTCTIME or 25370Sstevel@tonic-gate V_ASN1_GENERALIZEDTIME, without this it always uses GeneralizedTime. 25380Sstevel@tonic-gate [Steve Henson, reported by Kenneth R. Robinette 25390Sstevel@tonic-gate <support@securenetterm.com>] 25400Sstevel@tonic-gate 25410Sstevel@tonic-gate *) Fixes to BN_to_ASN1_INTEGER when bn is zero. This would previously 25420Sstevel@tonic-gate result in a zero length in the ASN1_INTEGER structure which was 25430Sstevel@tonic-gate not consistent with the structure when d2i_ASN1_INTEGER() was used 25440Sstevel@tonic-gate and would cause ASN1_INTEGER_cmp() to fail. Enhance s2i_ASN1_INTEGER() 25450Sstevel@tonic-gate to cope with hex and negative integers. Fix bug in i2a_ASN1_INTEGER() 25460Sstevel@tonic-gate where it did not print out a minus for negative ASN1_INTEGER. 25470Sstevel@tonic-gate [Steve Henson] 25480Sstevel@tonic-gate 25490Sstevel@tonic-gate *) Add summary printout to ocsp utility. The various functions which 25500Sstevel@tonic-gate convert status values to strings have been renamed to: 25510Sstevel@tonic-gate OCSP_response_status_str(), OCSP_cert_status_str() and 25520Sstevel@tonic-gate OCSP_crl_reason_str() and are no longer static. New options 25530Sstevel@tonic-gate to verify nonce values and to disable verification. OCSP response 25540Sstevel@tonic-gate printout format cleaned up. 25550Sstevel@tonic-gate [Steve Henson] 25560Sstevel@tonic-gate 25570Sstevel@tonic-gate *) Add additional OCSP certificate checks. These are those specified 25580Sstevel@tonic-gate in RFC2560. This consists of two separate checks: the CA of the 25590Sstevel@tonic-gate certificate being checked must either be the OCSP signer certificate 25600Sstevel@tonic-gate or the issuer of the OCSP signer certificate. In the latter case the 25610Sstevel@tonic-gate OCSP signer certificate must contain the OCSP signing extended key 25620Sstevel@tonic-gate usage. This check is performed by attempting to match the OCSP 25630Sstevel@tonic-gate signer or the OCSP signer CA to the issuerNameHash and issuerKeyHash 25640Sstevel@tonic-gate in the OCSP_CERTID structures of the response. 25650Sstevel@tonic-gate [Steve Henson] 25660Sstevel@tonic-gate 25670Sstevel@tonic-gate *) Initial OCSP certificate verification added to OCSP_basic_verify() 25680Sstevel@tonic-gate and related routines. This uses the standard OpenSSL certificate 25690Sstevel@tonic-gate verify routines to perform initial checks (just CA validity) and 25700Sstevel@tonic-gate to obtain the certificate chain. Then additional checks will be 25710Sstevel@tonic-gate performed on the chain. Currently the root CA is checked to see 25720Sstevel@tonic-gate if it is explicitly trusted for OCSP signing. This is used to set 25730Sstevel@tonic-gate a root CA as a global signing root: that is any certificate that 25740Sstevel@tonic-gate chains to that CA is an acceptable OCSP signing certificate. 25750Sstevel@tonic-gate [Steve Henson] 25760Sstevel@tonic-gate 25770Sstevel@tonic-gate *) New '-extfile ...' option to 'openssl ca' for reading X.509v3 25780Sstevel@tonic-gate extensions from a separate configuration file. 25790Sstevel@tonic-gate As when reading extensions from the main configuration file, 25800Sstevel@tonic-gate the '-extensions ...' option may be used for specifying the 25810Sstevel@tonic-gate section to use. 25820Sstevel@tonic-gate [Massimiliano Pala <madwolf@comune.modena.it>] 25830Sstevel@tonic-gate 25840Sstevel@tonic-gate *) New OCSP utility. Allows OCSP requests to be generated or 25850Sstevel@tonic-gate read. The request can be sent to a responder and the output 25860Sstevel@tonic-gate parsed, outputed or printed in text form. Not complete yet: 25870Sstevel@tonic-gate still needs to check the OCSP response validity. 25880Sstevel@tonic-gate [Steve Henson] 25890Sstevel@tonic-gate 25900Sstevel@tonic-gate *) New subcommands for 'openssl ca': 25910Sstevel@tonic-gate 'openssl ca -status <serial>' prints the status of the cert with 25920Sstevel@tonic-gate the given serial number (according to the index file). 25930Sstevel@tonic-gate 'openssl ca -updatedb' updates the expiry status of certificates 25940Sstevel@tonic-gate in the index file. 25950Sstevel@tonic-gate [Massimiliano Pala <madwolf@comune.modena.it>] 25960Sstevel@tonic-gate 25970Sstevel@tonic-gate *) New '-newreq-nodes' command option to CA.pl. This is like 25980Sstevel@tonic-gate '-newreq', but calls 'openssl req' with the '-nodes' option 25990Sstevel@tonic-gate so that the resulting key is not encrypted. 26000Sstevel@tonic-gate [Damien Miller <djm@mindrot.org>] 26010Sstevel@tonic-gate 26020Sstevel@tonic-gate *) New configuration for the GNU Hurd. 26030Sstevel@tonic-gate [Jonathan Bartlett <johnnyb@wolfram.com> via Richard Levitte] 26040Sstevel@tonic-gate 26050Sstevel@tonic-gate *) Initial code to implement OCSP basic response verify. This 26060Sstevel@tonic-gate is currently incomplete. Currently just finds the signer's 26070Sstevel@tonic-gate certificate and verifies the signature on the response. 26080Sstevel@tonic-gate [Steve Henson] 26090Sstevel@tonic-gate 26100Sstevel@tonic-gate *) New SSLeay_version code SSLEAY_DIR to determine the compiled-in 26110Sstevel@tonic-gate value of OPENSSLDIR. This is available via the new '-d' option 26120Sstevel@tonic-gate to 'openssl version', and is also included in 'openssl version -a'. 26130Sstevel@tonic-gate [Bodo Moeller] 26140Sstevel@tonic-gate 26150Sstevel@tonic-gate *) Allowing defining memory allocation callbacks that will be given 26160Sstevel@tonic-gate file name and line number information in additional arguments 26170Sstevel@tonic-gate (a const char* and an int). The basic functionality remains, as 26180Sstevel@tonic-gate well as the original possibility to just replace malloc(), 26190Sstevel@tonic-gate realloc() and free() by functions that do not know about these 26200Sstevel@tonic-gate additional arguments. To register and find out the current 26210Sstevel@tonic-gate settings for extended allocation functions, the following 26220Sstevel@tonic-gate functions are provided: 26230Sstevel@tonic-gate 26240Sstevel@tonic-gate CRYPTO_set_mem_ex_functions 26250Sstevel@tonic-gate CRYPTO_set_locked_mem_ex_functions 26260Sstevel@tonic-gate CRYPTO_get_mem_ex_functions 26270Sstevel@tonic-gate CRYPTO_get_locked_mem_ex_functions 26280Sstevel@tonic-gate 26290Sstevel@tonic-gate These work the same way as CRYPTO_set_mem_functions and friends. 26300Sstevel@tonic-gate CRYPTO_get_[locked_]mem_functions now writes 0 where such an 26310Sstevel@tonic-gate extended allocation function is enabled. 26320Sstevel@tonic-gate Similarly, CRYPTO_get_[locked_]mem_ex_functions writes 0 where 26330Sstevel@tonic-gate a conventional allocation function is enabled. 26340Sstevel@tonic-gate [Richard Levitte, Bodo Moeller] 26350Sstevel@tonic-gate 26360Sstevel@tonic-gate *) Finish off removing the remaining LHASH function pointer casts. 26370Sstevel@tonic-gate There should no longer be any prototype-casting required when using 26380Sstevel@tonic-gate the LHASH abstraction, and any casts that remain are "bugs". See 26390Sstevel@tonic-gate the callback types and macros at the head of lhash.h for details 26400Sstevel@tonic-gate (and "OBJ_cleanup" in crypto/objects/obj_dat.c as an example). 26410Sstevel@tonic-gate [Geoff Thorpe] 26420Sstevel@tonic-gate 26430Sstevel@tonic-gate *) Add automatic query of EGD sockets in RAND_poll() for the unix variant. 26440Sstevel@tonic-gate If /dev/[u]random devices are not available or do not return enough 26450Sstevel@tonic-gate entropy, EGD style sockets (served by EGD or PRNGD) will automatically 26460Sstevel@tonic-gate be queried. 26470Sstevel@tonic-gate The locations /var/run/egd-pool, /dev/egd-pool, /etc/egd-pool, and 26480Sstevel@tonic-gate /etc/entropy will be queried once each in this sequence, quering stops 26490Sstevel@tonic-gate when enough entropy was collected without querying more sockets. 26500Sstevel@tonic-gate [Lutz Jaenicke] 26510Sstevel@tonic-gate 26520Sstevel@tonic-gate *) Change the Unix RAND_poll() variant to be able to poll several 26530Sstevel@tonic-gate random devices, as specified by DEVRANDOM, until a sufficient amount 26540Sstevel@tonic-gate of data has been collected. We spend at most 10 ms on each file 26550Sstevel@tonic-gate (select timeout) and read in non-blocking mode. DEVRANDOM now 26560Sstevel@tonic-gate defaults to the list "/dev/urandom", "/dev/random", "/dev/srandom" 26570Sstevel@tonic-gate (previously it was just the string "/dev/urandom"), so on typical 26580Sstevel@tonic-gate platforms the 10 ms delay will never occur. 26590Sstevel@tonic-gate Also separate out the Unix variant to its own file, rand_unix.c. 26600Sstevel@tonic-gate For VMS, there's a currently-empty rand_vms.c. 26610Sstevel@tonic-gate [Richard Levitte] 26620Sstevel@tonic-gate 26630Sstevel@tonic-gate *) Move OCSP client related routines to ocsp_cl.c. These 26640Sstevel@tonic-gate provide utility functions which an application needing 26650Sstevel@tonic-gate to issue a request to an OCSP responder and analyse the 26660Sstevel@tonic-gate response will typically need: as opposed to those which an 26670Sstevel@tonic-gate OCSP responder itself would need which will be added later. 26680Sstevel@tonic-gate 26690Sstevel@tonic-gate OCSP_request_sign() signs an OCSP request with an API similar 26700Sstevel@tonic-gate to PKCS7_sign(). OCSP_response_status() returns status of OCSP 26710Sstevel@tonic-gate response. OCSP_response_get1_basic() extracts basic response 26720Sstevel@tonic-gate from response. OCSP_resp_find_status(): finds and extracts status 26730Sstevel@tonic-gate information from an OCSP_CERTID structure (which will be created 26740Sstevel@tonic-gate when the request structure is built). These are built from lower 26750Sstevel@tonic-gate level functions which work on OCSP_SINGLERESP structures but 26760Sstevel@tonic-gate wont normally be used unless the application wishes to examine 26770Sstevel@tonic-gate extensions in the OCSP response for example. 26780Sstevel@tonic-gate 26790Sstevel@tonic-gate Replace nonce routines with a pair of functions. 26800Sstevel@tonic-gate OCSP_request_add1_nonce() adds a nonce value and optionally 26810Sstevel@tonic-gate generates a random value. OCSP_check_nonce() checks the 26820Sstevel@tonic-gate validity of the nonce in an OCSP response. 26830Sstevel@tonic-gate [Steve Henson] 26840Sstevel@tonic-gate 26850Sstevel@tonic-gate *) Change function OCSP_request_add() to OCSP_request_add0_id(). 26860Sstevel@tonic-gate This doesn't copy the supplied OCSP_CERTID and avoids the 26870Sstevel@tonic-gate need to free up the newly created id. Change return type 26880Sstevel@tonic-gate to OCSP_ONEREQ to return the internal OCSP_ONEREQ structure. 26890Sstevel@tonic-gate This can then be used to add extensions to the request. 26900Sstevel@tonic-gate Deleted OCSP_request_new(), since most of its functionality 26910Sstevel@tonic-gate is now in OCSP_REQUEST_new() (and the case insensitive name 26920Sstevel@tonic-gate clash) apart from the ability to set the request name which 26930Sstevel@tonic-gate will be added elsewhere. 26940Sstevel@tonic-gate [Steve Henson] 26950Sstevel@tonic-gate 26960Sstevel@tonic-gate *) Update OCSP API. Remove obsolete extensions argument from 26970Sstevel@tonic-gate various functions. Extensions are now handled using the new 26980Sstevel@tonic-gate OCSP extension code. New simple OCSP HTTP function which 26990Sstevel@tonic-gate can be used to send requests and parse the response. 27000Sstevel@tonic-gate [Steve Henson] 27010Sstevel@tonic-gate 27020Sstevel@tonic-gate *) Fix the PKCS#7 (S/MIME) code to work with new ASN1. Two new 27030Sstevel@tonic-gate ASN1_ITEM structures help with sign and verify. PKCS7_ATTR_SIGN 27040Sstevel@tonic-gate uses the special reorder version of SET OF to sort the attributes 27050Sstevel@tonic-gate and reorder them to match the encoded order. This resolves a long 27060Sstevel@tonic-gate standing problem: a verify on a PKCS7 structure just after signing 27070Sstevel@tonic-gate it used to fail because the attribute order did not match the 27080Sstevel@tonic-gate encoded order. PKCS7_ATTR_VERIFY does not reorder the attributes: 27090Sstevel@tonic-gate it uses the received order. This is necessary to tolerate some broken 27100Sstevel@tonic-gate software that does not order SET OF. This is handled by encoding 27110Sstevel@tonic-gate as a SEQUENCE OF but using implicit tagging (with UNIVERSAL class) 27120Sstevel@tonic-gate to produce the required SET OF. 27130Sstevel@tonic-gate [Steve Henson] 27140Sstevel@tonic-gate 27150Sstevel@tonic-gate *) Have mk1mf.pl generate the macros OPENSSL_BUILD_SHLIBCRYPTO and 27160Sstevel@tonic-gate OPENSSL_BUILD_SHLIBSSL and use them appropriately in the header 27170Sstevel@tonic-gate files to get correct declarations of the ASN.1 item variables. 27180Sstevel@tonic-gate [Richard Levitte] 27190Sstevel@tonic-gate 27200Sstevel@tonic-gate *) Rewrite of PKCS#12 code to use new ASN1 functionality. Replace many 27210Sstevel@tonic-gate PKCS#12 macros with real functions. Fix two unrelated ASN1 bugs: 27220Sstevel@tonic-gate asn1_check_tlen() would sometimes attempt to use 'ctx' when it was 27230Sstevel@tonic-gate NULL and ASN1_TYPE was not dereferenced properly in asn1_ex_c2i(). 27240Sstevel@tonic-gate New ASN1 macro: DECLARE_ASN1_ITEM() which just declares the relevant 27250Sstevel@tonic-gate ASN1_ITEM and no wrapper functions. 27260Sstevel@tonic-gate [Steve Henson] 27270Sstevel@tonic-gate 27280Sstevel@tonic-gate *) New functions or ASN1_item_d2i_fp() and ASN1_item_d2i_bio(). These 27290Sstevel@tonic-gate replace the old function pointer based I/O routines. Change most of 27300Sstevel@tonic-gate the *_d2i_bio() and *_d2i_fp() functions to use these. 27310Sstevel@tonic-gate [Steve Henson] 27320Sstevel@tonic-gate 27330Sstevel@tonic-gate *) Enhance mkdef.pl to be more accepting about spacing in C preprocessor 27340Sstevel@tonic-gate lines, recognice more "algorithms" that can be deselected, and make 27350Sstevel@tonic-gate it complain about algorithm deselection that isn't recognised. 27360Sstevel@tonic-gate [Richard Levitte] 27370Sstevel@tonic-gate 27380Sstevel@tonic-gate *) New ASN1 functions to handle dup, sign, verify, digest, pack and 27390Sstevel@tonic-gate unpack operations in terms of ASN1_ITEM. Modify existing wrappers 27400Sstevel@tonic-gate to use new functions. Add NO_ASN1_OLD which can be set to remove 27410Sstevel@tonic-gate some old style ASN1 functions: this can be used to determine if old 27420Sstevel@tonic-gate code will still work when these eventually go away. 27430Sstevel@tonic-gate [Steve Henson] 27440Sstevel@tonic-gate 27450Sstevel@tonic-gate *) New extension functions for OCSP structures, these follow the 27460Sstevel@tonic-gate same conventions as certificates and CRLs. 27470Sstevel@tonic-gate [Steve Henson] 27480Sstevel@tonic-gate 27490Sstevel@tonic-gate *) New function X509V3_add1_i2d(). This automatically encodes and 27500Sstevel@tonic-gate adds an extension. Its behaviour can be customised with various 27510Sstevel@tonic-gate flags to append, replace or delete. Various wrappers added for 27520Sstevel@tonic-gate certifcates and CRLs. 27530Sstevel@tonic-gate [Steve Henson] 27540Sstevel@tonic-gate 27550Sstevel@tonic-gate *) Fix to avoid calling the underlying ASN1 print routine when 27560Sstevel@tonic-gate an extension cannot be parsed. Correct a typo in the 27570Sstevel@tonic-gate OCSP_SERVICELOC extension. Tidy up print OCSP format. 27580Sstevel@tonic-gate [Steve Henson] 27590Sstevel@tonic-gate 27600Sstevel@tonic-gate *) Make mkdef.pl parse some of the ASN1 macros and add apropriate 27610Sstevel@tonic-gate entries for variables. 27620Sstevel@tonic-gate [Steve Henson] 27630Sstevel@tonic-gate 27640Sstevel@tonic-gate *) Add functionality to apps/openssl.c for detecting locking 27650Sstevel@tonic-gate problems: As the program is single-threaded, all we have 27660Sstevel@tonic-gate to do is register a locking callback using an array for 27670Sstevel@tonic-gate storing which locks are currently held by the program. 27680Sstevel@tonic-gate [Bodo Moeller] 27690Sstevel@tonic-gate 27700Sstevel@tonic-gate *) Use a lock around the call to CRYPTO_get_ex_new_index() in 27710Sstevel@tonic-gate SSL_get_ex_data_X509_STORE_idx(), which is used in 27720Sstevel@tonic-gate ssl_verify_cert_chain() and thus can be called at any time 27730Sstevel@tonic-gate during TLS/SSL handshakes so that thread-safety is essential. 27740Sstevel@tonic-gate Unfortunately, the ex_data design is not at all suited 27750Sstevel@tonic-gate for multi-threaded use, so it probably should be abolished. 27760Sstevel@tonic-gate [Bodo Moeller] 27770Sstevel@tonic-gate 27780Sstevel@tonic-gate *) Added Broadcom "ubsec" ENGINE to OpenSSL. 27790Sstevel@tonic-gate [Broadcom, tweaked and integrated by Geoff Thorpe] 27800Sstevel@tonic-gate 27810Sstevel@tonic-gate *) Move common extension printing code to new function 27820Sstevel@tonic-gate X509V3_print_extensions(). Reorganise OCSP print routines and 27830Sstevel@tonic-gate implement some needed OCSP ASN1 functions. Add OCSP extensions. 27840Sstevel@tonic-gate [Steve Henson] 27850Sstevel@tonic-gate 27860Sstevel@tonic-gate *) New function X509_signature_print() to remove duplication in some 27870Sstevel@tonic-gate print routines. 27880Sstevel@tonic-gate [Steve Henson] 27890Sstevel@tonic-gate 27900Sstevel@tonic-gate *) Add a special meaning when SET OF and SEQUENCE OF flags are both 27910Sstevel@tonic-gate set (this was treated exactly the same as SET OF previously). This 27920Sstevel@tonic-gate is used to reorder the STACK representing the structure to match the 27930Sstevel@tonic-gate encoding. This will be used to get round a problem where a PKCS7 27940Sstevel@tonic-gate structure which was signed could not be verified because the STACK 27950Sstevel@tonic-gate order did not reflect the encoded order. 27960Sstevel@tonic-gate [Steve Henson] 27970Sstevel@tonic-gate 27980Sstevel@tonic-gate *) Reimplement the OCSP ASN1 module using the new code. 27990Sstevel@tonic-gate [Steve Henson] 28000Sstevel@tonic-gate 28010Sstevel@tonic-gate *) Update the X509V3 code to permit the use of an ASN1_ITEM structure 28020Sstevel@tonic-gate for its ASN1 operations. The old style function pointers still exist 28030Sstevel@tonic-gate for now but they will eventually go away. 28040Sstevel@tonic-gate [Steve Henson] 28050Sstevel@tonic-gate 28060Sstevel@tonic-gate *) Merge in replacement ASN1 code from the ASN1 branch. This almost 28070Sstevel@tonic-gate completely replaces the old ASN1 functionality with a table driven 28080Sstevel@tonic-gate encoder and decoder which interprets an ASN1_ITEM structure describing 28090Sstevel@tonic-gate the ASN1 module. Compatibility with the existing ASN1 API (i2d,d2i) is 28100Sstevel@tonic-gate largely maintained. Almost all of the old asn1_mac.h macro based ASN1 28110Sstevel@tonic-gate has also been converted to the new form. 28120Sstevel@tonic-gate [Steve Henson] 28130Sstevel@tonic-gate 28140Sstevel@tonic-gate *) Change BN_mod_exp_recp so that negative moduli are tolerated 28150Sstevel@tonic-gate (the sign is ignored). Similarly, ignore the sign in BN_MONT_CTX_set 28160Sstevel@tonic-gate so that BN_mod_exp_mont and BN_mod_exp_mont_word work 28170Sstevel@tonic-gate for negative moduli. 28180Sstevel@tonic-gate [Bodo Moeller] 28190Sstevel@tonic-gate 28200Sstevel@tonic-gate *) Fix BN_uadd and BN_usub: Always return non-negative results instead 28210Sstevel@tonic-gate of not touching the result's sign bit. 28220Sstevel@tonic-gate [Bodo Moeller] 28230Sstevel@tonic-gate 28240Sstevel@tonic-gate *) BN_div bugfix: If the result is 0, the sign (res->neg) must not be 28250Sstevel@tonic-gate set. 28260Sstevel@tonic-gate [Bodo Moeller] 28270Sstevel@tonic-gate 28280Sstevel@tonic-gate *) Changed the LHASH code to use prototypes for callbacks, and created 28290Sstevel@tonic-gate macros to declare and implement thin (optionally static) functions 28300Sstevel@tonic-gate that provide type-safety and avoid function pointer casting for the 28310Sstevel@tonic-gate type-specific callbacks. 28320Sstevel@tonic-gate [Geoff Thorpe] 28330Sstevel@tonic-gate 28340Sstevel@tonic-gate *) Added Kerberos Cipher Suites to be used with TLS, as written in 28350Sstevel@tonic-gate RFC 2712. 28360Sstevel@tonic-gate [Veers Staats <staatsvr@asc.hpc.mil>, 28370Sstevel@tonic-gate Jeffrey Altman <jaltman@columbia.edu>, via Richard Levitte] 28380Sstevel@tonic-gate 28390Sstevel@tonic-gate *) Reformat the FAQ so the different questions and answers can be divided 28400Sstevel@tonic-gate in sections depending on the subject. 28410Sstevel@tonic-gate [Richard Levitte] 28420Sstevel@tonic-gate 28430Sstevel@tonic-gate *) Have the zlib compression code load ZLIB.DLL dynamically under 28440Sstevel@tonic-gate Windows. 28450Sstevel@tonic-gate [Richard Levitte] 28460Sstevel@tonic-gate 28470Sstevel@tonic-gate *) New function BN_mod_sqrt for computing square roots modulo a prime 28480Sstevel@tonic-gate (using the probabilistic Tonelli-Shanks algorithm unless 28490Sstevel@tonic-gate p == 3 (mod 4) or p == 5 (mod 8), which are cases that can 28500Sstevel@tonic-gate be handled deterministically). 28510Sstevel@tonic-gate [Lenka Fibikova <fibikova@exp-math.uni-essen.de>, Bodo Moeller] 28520Sstevel@tonic-gate 28530Sstevel@tonic-gate *) Make BN_mod_inverse faster by explicitly handling small quotients 28540Sstevel@tonic-gate in the Euclid loop. (Speed gain about 20% for small moduli [256 or 28550Sstevel@tonic-gate 512 bits], about 30% for larger ones [1024 or 2048 bits].) 28560Sstevel@tonic-gate [Bodo Moeller] 28570Sstevel@tonic-gate 28580Sstevel@tonic-gate *) New function BN_kronecker. 28590Sstevel@tonic-gate [Bodo Moeller] 28600Sstevel@tonic-gate 28610Sstevel@tonic-gate *) Fix BN_gcd so that it works on negative inputs; the result is 28620Sstevel@tonic-gate positive unless both parameters are zero. 28630Sstevel@tonic-gate Previously something reasonably close to an infinite loop was 28640Sstevel@tonic-gate possible because numbers could be growing instead of shrinking 28650Sstevel@tonic-gate in the implementation of Euclid's algorithm. 28660Sstevel@tonic-gate [Bodo Moeller] 28670Sstevel@tonic-gate 28680Sstevel@tonic-gate *) Fix BN_is_word() and BN_is_one() macros to take into account the 28690Sstevel@tonic-gate sign of the number in question. 28700Sstevel@tonic-gate 28710Sstevel@tonic-gate Fix BN_is_word(a,w) to work correctly for w == 0. 28720Sstevel@tonic-gate 28730Sstevel@tonic-gate The old BN_is_word(a,w) macro is now called BN_abs_is_word(a,w) 28740Sstevel@tonic-gate because its test if the absolute value of 'a' equals 'w'. 28750Sstevel@tonic-gate Note that BN_abs_is_word does *not* handle w == 0 reliably; 28760Sstevel@tonic-gate it exists mostly for use in the implementations of BN_is_zero(), 28770Sstevel@tonic-gate BN_is_one(), and BN_is_word(). 28780Sstevel@tonic-gate [Bodo Moeller] 28790Sstevel@tonic-gate 28800Sstevel@tonic-gate *) New function BN_swap. 28810Sstevel@tonic-gate [Bodo Moeller] 28820Sstevel@tonic-gate 28830Sstevel@tonic-gate *) Use BN_nnmod instead of BN_mod in crypto/bn/bn_exp.c so that 28840Sstevel@tonic-gate the exponentiation functions are more likely to produce reasonable 28850Sstevel@tonic-gate results on negative inputs. 28860Sstevel@tonic-gate [Bodo Moeller] 28870Sstevel@tonic-gate 28880Sstevel@tonic-gate *) Change BN_mod_mul so that the result is always non-negative. 28890Sstevel@tonic-gate Previously, it could be negative if one of the factors was negative; 28900Sstevel@tonic-gate I don't think anyone really wanted that behaviour. 28910Sstevel@tonic-gate [Bodo Moeller] 28920Sstevel@tonic-gate 28930Sstevel@tonic-gate *) Move BN_mod_... functions into new file crypto/bn/bn_mod.c 28940Sstevel@tonic-gate (except for exponentiation, which stays in crypto/bn/bn_exp.c, 28950Sstevel@tonic-gate and BN_mod_mul_reciprocal, which stays in crypto/bn/bn_recp.c) 28960Sstevel@tonic-gate and add new functions: 28970Sstevel@tonic-gate 28980Sstevel@tonic-gate BN_nnmod 28990Sstevel@tonic-gate BN_mod_sqr 29000Sstevel@tonic-gate BN_mod_add 29010Sstevel@tonic-gate BN_mod_add_quick 29020Sstevel@tonic-gate BN_mod_sub 29030Sstevel@tonic-gate BN_mod_sub_quick 29040Sstevel@tonic-gate BN_mod_lshift1 29050Sstevel@tonic-gate BN_mod_lshift1_quick 29060Sstevel@tonic-gate BN_mod_lshift 29070Sstevel@tonic-gate BN_mod_lshift_quick 29080Sstevel@tonic-gate 29090Sstevel@tonic-gate These functions always generate non-negative results. 29100Sstevel@tonic-gate 29110Sstevel@tonic-gate BN_nnmod otherwise is like BN_mod (if BN_mod computes a remainder r 29120Sstevel@tonic-gate such that |m| < r < 0, BN_nnmod will output rem + |m| instead). 29130Sstevel@tonic-gate 29140Sstevel@tonic-gate BN_mod_XXX_quick(r, a, [b,] m) generates the same result as 29150Sstevel@tonic-gate BN_mod_XXX(r, a, [b,] m, ctx), but requires that a [and b] 29160Sstevel@tonic-gate be reduced modulo m. 29170Sstevel@tonic-gate [Lenka Fibikova <fibikova@exp-math.uni-essen.de>, Bodo Moeller] 29180Sstevel@tonic-gate 29190Sstevel@tonic-gate#if 0 29200Sstevel@tonic-gate The following entry accidentily appeared in the CHANGES file 29210Sstevel@tonic-gate distributed with OpenSSL 0.9.7. The modifications described in 29220Sstevel@tonic-gate it do *not* apply to OpenSSL 0.9.7. 29230Sstevel@tonic-gate 29240Sstevel@tonic-gate *) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there 29250Sstevel@tonic-gate was actually never needed) and in BN_mul(). The removal in BN_mul() 29260Sstevel@tonic-gate required a small change in bn_mul_part_recursive() and the addition 29270Sstevel@tonic-gate of the functions bn_cmp_part_words(), bn_sub_part_words() and 29280Sstevel@tonic-gate bn_add_part_words(), which do the same thing as bn_cmp_words(), 29290Sstevel@tonic-gate bn_sub_words() and bn_add_words() except they take arrays with 29300Sstevel@tonic-gate differing sizes. 29310Sstevel@tonic-gate [Richard Levitte] 29320Sstevel@tonic-gate#endif 29330Sstevel@tonic-gate 29340Sstevel@tonic-gate *) In 'openssl passwd', verify passwords read from the terminal 29350Sstevel@tonic-gate unless the '-salt' option is used (which usually means that 29360Sstevel@tonic-gate verification would just waste user's time since the resulting 29370Sstevel@tonic-gate hash is going to be compared with some given password hash) 29380Sstevel@tonic-gate or the new '-noverify' option is used. 29390Sstevel@tonic-gate 29400Sstevel@tonic-gate This is an incompatible change, but it does not affect 29410Sstevel@tonic-gate non-interactive use of 'openssl passwd' (passwords on the command 29420Sstevel@tonic-gate line, '-stdin' option, '-in ...' option) and thus should not 29430Sstevel@tonic-gate cause any problems. 29440Sstevel@tonic-gate [Bodo Moeller] 29450Sstevel@tonic-gate 29460Sstevel@tonic-gate *) Remove all references to RSAref, since there's no more need for it. 29470Sstevel@tonic-gate [Richard Levitte] 29480Sstevel@tonic-gate 29490Sstevel@tonic-gate *) Make DSO load along a path given through an environment variable 29500Sstevel@tonic-gate (SHLIB_PATH) with shl_load(). 29510Sstevel@tonic-gate [Richard Levitte] 29520Sstevel@tonic-gate 29530Sstevel@tonic-gate *) Constify the ENGINE code as a result of BIGNUM constification. 29540Sstevel@tonic-gate Also constify the RSA code and most things related to it. In a 29550Sstevel@tonic-gate few places, most notable in the depth of the ASN.1 code, ugly 29560Sstevel@tonic-gate casts back to non-const were required (to be solved at a later 29570Sstevel@tonic-gate time) 29580Sstevel@tonic-gate [Richard Levitte] 29590Sstevel@tonic-gate 29600Sstevel@tonic-gate *) Make it so the openssl application has all engines loaded by default. 29610Sstevel@tonic-gate [Richard Levitte] 29620Sstevel@tonic-gate 29630Sstevel@tonic-gate *) Constify the BIGNUM routines a little more. 29640Sstevel@tonic-gate [Richard Levitte] 29650Sstevel@tonic-gate 29660Sstevel@tonic-gate *) Add the following functions: 29670Sstevel@tonic-gate 29680Sstevel@tonic-gate ENGINE_load_cswift() 29690Sstevel@tonic-gate ENGINE_load_chil() 29700Sstevel@tonic-gate ENGINE_load_atalla() 29710Sstevel@tonic-gate ENGINE_load_nuron() 29720Sstevel@tonic-gate ENGINE_load_builtin_engines() 29730Sstevel@tonic-gate 29740Sstevel@tonic-gate That way, an application can itself choose if external engines that 29750Sstevel@tonic-gate are built-in in OpenSSL shall ever be used or not. The benefit is 29760Sstevel@tonic-gate that applications won't have to be linked with libdl or other dso 29770Sstevel@tonic-gate libraries unless it's really needed. 29780Sstevel@tonic-gate 29790Sstevel@tonic-gate Changed 'openssl engine' to load all engines on demand. 29800Sstevel@tonic-gate Changed the engine header files to avoid the duplication of some 29810Sstevel@tonic-gate declarations (they differed!). 29820Sstevel@tonic-gate [Richard Levitte] 29830Sstevel@tonic-gate 29840Sstevel@tonic-gate *) 'openssl engine' can now list capabilities. 29850Sstevel@tonic-gate [Richard Levitte] 29860Sstevel@tonic-gate 29870Sstevel@tonic-gate *) Better error reporting in 'openssl engine'. 29880Sstevel@tonic-gate [Richard Levitte] 29890Sstevel@tonic-gate 29900Sstevel@tonic-gate *) Never call load_dh_param(NULL) in s_server. 29910Sstevel@tonic-gate [Bodo Moeller] 29920Sstevel@tonic-gate 29930Sstevel@tonic-gate *) Add engine application. It can currently list engines by name and 29940Sstevel@tonic-gate identity, and test if they are actually available. 29950Sstevel@tonic-gate [Richard Levitte] 29960Sstevel@tonic-gate 29970Sstevel@tonic-gate *) Improve RPM specification file by forcing symbolic linking and making 29980Sstevel@tonic-gate sure the installed documentation is also owned by root.root. 29990Sstevel@tonic-gate [Damien Miller <djm@mindrot.org>] 30000Sstevel@tonic-gate 30010Sstevel@tonic-gate *) Give the OpenSSL applications more possibilities to make use of 30020Sstevel@tonic-gate keys (public as well as private) handled by engines. 30030Sstevel@tonic-gate [Richard Levitte] 30040Sstevel@tonic-gate 30050Sstevel@tonic-gate *) Add OCSP code that comes from CertCo. 30060Sstevel@tonic-gate [Richard Levitte] 30070Sstevel@tonic-gate 30080Sstevel@tonic-gate *) Add VMS support for the Rijndael code. 30090Sstevel@tonic-gate [Richard Levitte] 30100Sstevel@tonic-gate 30110Sstevel@tonic-gate *) Added untested support for Nuron crypto accelerator. 30120Sstevel@tonic-gate [Ben Laurie] 30130Sstevel@tonic-gate 30140Sstevel@tonic-gate *) Add support for external cryptographic devices. This code was 30150Sstevel@tonic-gate previously distributed separately as the "engine" branch. 30160Sstevel@tonic-gate [Geoff Thorpe, Richard Levitte] 30170Sstevel@tonic-gate 30180Sstevel@tonic-gate *) Rework the filename-translation in the DSO code. It is now possible to 30190Sstevel@tonic-gate have far greater control over how a "name" is turned into a filename 30200Sstevel@tonic-gate depending on the operating environment and any oddities about the 30210Sstevel@tonic-gate different shared library filenames on each system. 30220Sstevel@tonic-gate [Geoff Thorpe] 30230Sstevel@tonic-gate 30240Sstevel@tonic-gate *) Support threads on FreeBSD-elf in Configure. 30250Sstevel@tonic-gate [Richard Levitte] 30260Sstevel@tonic-gate 30270Sstevel@tonic-gate *) Fix for SHA1 assembly problem with MASM: it produces 30280Sstevel@tonic-gate warnings about corrupt line number information when assembling 30290Sstevel@tonic-gate with debugging information. This is caused by the overlapping 30300Sstevel@tonic-gate of two sections. 30310Sstevel@tonic-gate [Bernd Matthes <mainbug@celocom.de>, Steve Henson] 30320Sstevel@tonic-gate 30330Sstevel@tonic-gate *) NCONF changes. 30340Sstevel@tonic-gate NCONF_get_number() has no error checking at all. As a replacement, 30350Sstevel@tonic-gate NCONF_get_number_e() is defined (_e for "error checking") and is 30360Sstevel@tonic-gate promoted strongly. The old NCONF_get_number is kept around for 30370Sstevel@tonic-gate binary backward compatibility. 30380Sstevel@tonic-gate Make it possible for methods to load from something other than a BIO, 30390Sstevel@tonic-gate by providing a function pointer that is given a name instead of a BIO. 30400Sstevel@tonic-gate For example, this could be used to load configuration data from an 30410Sstevel@tonic-gate LDAP server. 30420Sstevel@tonic-gate [Richard Levitte] 30430Sstevel@tonic-gate 30440Sstevel@tonic-gate *) Fix for non blocking accept BIOs. Added new I/O special reason 30450Sstevel@tonic-gate BIO_RR_ACCEPT to cover this case. Previously use of accept BIOs 30460Sstevel@tonic-gate with non blocking I/O was not possible because no retry code was 30470Sstevel@tonic-gate implemented. Also added new SSL code SSL_WANT_ACCEPT to cover 30480Sstevel@tonic-gate this case. 30490Sstevel@tonic-gate [Steve Henson] 30500Sstevel@tonic-gate 30510Sstevel@tonic-gate *) Added the beginnings of Rijndael support. 30520Sstevel@tonic-gate [Ben Laurie] 30530Sstevel@tonic-gate 30540Sstevel@tonic-gate *) Fix for bug in DirectoryString mask setting. Add support for 30550Sstevel@tonic-gate X509_NAME_print_ex() in 'req' and X509_print_ex() function 30560Sstevel@tonic-gate to allow certificate printing to more controllable, additional 30570Sstevel@tonic-gate 'certopt' option to 'x509' to allow new printing options to be 30580Sstevel@tonic-gate set. 30590Sstevel@tonic-gate [Steve Henson] 30600Sstevel@tonic-gate 30610Sstevel@tonic-gate *) Clean old EAY MD5 hack from e_os.h. 30620Sstevel@tonic-gate [Richard Levitte] 30630Sstevel@tonic-gate 3064*2139Sjp161948 Changes between 0.9.6l and 0.9.6m [17 Mar 2004] 3065*2139Sjp161948 3066*2139Sjp161948 *) Fix null-pointer assignment in do_change_cipher_spec() revealed 3067*2139Sjp161948 by using the Codenomicon TLS Test Tool (CAN-2004-0079) 3068*2139Sjp161948 [Joe Orton, Steve Henson] 3069*2139Sjp161948 3070*2139Sjp161948 Changes between 0.9.6k and 0.9.6l [04 Nov 2003] 3071*2139Sjp161948 3072*2139Sjp161948 *) Fix additional bug revealed by the NISCC test suite: 3073*2139Sjp161948 3074*2139Sjp161948 Stop bug triggering large recursion when presented with 3075*2139Sjp161948 certain ASN.1 tags (CAN-2003-0851) 3076*2139Sjp161948 [Steve Henson] 3077*2139Sjp161948 30780Sstevel@tonic-gate Changes between 0.9.6j and 0.9.6k [30 Sep 2003] 30790Sstevel@tonic-gate 30800Sstevel@tonic-gate *) Fix various bugs revealed by running the NISCC test suite: 30810Sstevel@tonic-gate 30820Sstevel@tonic-gate Stop out of bounds reads in the ASN1 code when presented with 30830Sstevel@tonic-gate invalid tags (CAN-2003-0543 and CAN-2003-0544). 30840Sstevel@tonic-gate 30850Sstevel@tonic-gate If verify callback ignores invalid public key errors don't try to check 30860Sstevel@tonic-gate certificate signature with the NULL public key. 30870Sstevel@tonic-gate 30880Sstevel@tonic-gate [Steve Henson] 30890Sstevel@tonic-gate 30900Sstevel@tonic-gate *) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate 30910Sstevel@tonic-gate if the server requested one: as stated in TLS 1.0 and SSL 3.0 30920Sstevel@tonic-gate specifications. 30930Sstevel@tonic-gate [Steve Henson] 30940Sstevel@tonic-gate 30950Sstevel@tonic-gate *) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional 30960Sstevel@tonic-gate extra data after the compression methods not only for TLS 1.0 30970Sstevel@tonic-gate but also for SSL 3.0 (as required by the specification). 30980Sstevel@tonic-gate [Bodo Moeller; problem pointed out by Matthias Loepfe] 30990Sstevel@tonic-gate 31000Sstevel@tonic-gate *) Change X509_certificate_type() to mark the key as exported/exportable 31010Sstevel@tonic-gate when it's 512 *bits* long, not 512 bytes. 31020Sstevel@tonic-gate [Richard Levitte] 31030Sstevel@tonic-gate 31040Sstevel@tonic-gate Changes between 0.9.6i and 0.9.6j [10 Apr 2003] 31050Sstevel@tonic-gate 31060Sstevel@tonic-gate *) Countermeasure against the Klima-Pokorny-Rosa extension of 31070Sstevel@tonic-gate Bleichbacher's attack on PKCS #1 v1.5 padding: treat 31080Sstevel@tonic-gate a protocol version number mismatch like a decryption error 31090Sstevel@tonic-gate in ssl3_get_client_key_exchange (ssl/s3_srvr.c). 31100Sstevel@tonic-gate [Bodo Moeller] 31110Sstevel@tonic-gate 31120Sstevel@tonic-gate *) Turn on RSA blinding by default in the default implementation 31130Sstevel@tonic-gate to avoid a timing attack. Applications that don't want it can call 31140Sstevel@tonic-gate RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING. 31150Sstevel@tonic-gate They would be ill-advised to do so in most cases. 31160Sstevel@tonic-gate [Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller] 31170Sstevel@tonic-gate 31180Sstevel@tonic-gate *) Change RSA blinding code so that it works when the PRNG is not 31190Sstevel@tonic-gate seeded (in this case, the secret RSA exponent is abused as 31200Sstevel@tonic-gate an unpredictable seed -- if it is not unpredictable, there 31210Sstevel@tonic-gate is no point in blinding anyway). Make RSA blinding thread-safe 31220Sstevel@tonic-gate by remembering the creator's thread ID in rsa->blinding and 31230Sstevel@tonic-gate having all other threads use local one-time blinding factors 31240Sstevel@tonic-gate (this requires more computation than sharing rsa->blinding, but 31250Sstevel@tonic-gate avoids excessive locking; and if an RSA object is not shared 31260Sstevel@tonic-gate between threads, blinding will still be very fast). 31270Sstevel@tonic-gate [Bodo Moeller] 31280Sstevel@tonic-gate 31290Sstevel@tonic-gate Changes between 0.9.6h and 0.9.6i [19 Feb 2003] 31300Sstevel@tonic-gate 31310Sstevel@tonic-gate *) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked 31320Sstevel@tonic-gate via timing by performing a MAC computation even if incorrrect 31330Sstevel@tonic-gate block cipher padding has been found. This is a countermeasure 31340Sstevel@tonic-gate against active attacks where the attacker has to distinguish 31350Sstevel@tonic-gate between bad padding and a MAC verification error. (CAN-2003-0078) 31360Sstevel@tonic-gate 31370Sstevel@tonic-gate [Bodo Moeller; problem pointed out by Brice Canvel (EPFL), 31380Sstevel@tonic-gate Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and 31390Sstevel@tonic-gate Martin Vuagnoux (EPFL, Ilion)] 31400Sstevel@tonic-gate 31410Sstevel@tonic-gate Changes between 0.9.6g and 0.9.6h [5 Dec 2002] 31420Sstevel@tonic-gate 31430Sstevel@tonic-gate *) New function OPENSSL_cleanse(), which is used to cleanse a section of 31440Sstevel@tonic-gate memory from it's contents. This is done with a counter that will 31450Sstevel@tonic-gate place alternating values in each byte. This can be used to solve 31460Sstevel@tonic-gate two issues: 1) the removal of calls to memset() by highly optimizing 31470Sstevel@tonic-gate compilers, and 2) cleansing with other values than 0, since those can 31480Sstevel@tonic-gate be read through on certain media, for example a swap space on disk. 31490Sstevel@tonic-gate [Geoff Thorpe] 31500Sstevel@tonic-gate 31510Sstevel@tonic-gate *) Bugfix: client side session caching did not work with external caching, 31520Sstevel@tonic-gate because the session->cipher setting was not restored when reloading 31530Sstevel@tonic-gate from the external cache. This problem was masked, when 31540Sstevel@tonic-gate SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG (part of SSL_OP_ALL) was set. 31550Sstevel@tonic-gate (Found by Steve Haslam <steve@araqnid.ddts.net>.) 31560Sstevel@tonic-gate [Lutz Jaenicke] 31570Sstevel@tonic-gate 31580Sstevel@tonic-gate *) Fix client_certificate (ssl/s2_clnt.c): The permissible total 31590Sstevel@tonic-gate length of the REQUEST-CERTIFICATE message is 18 .. 34, not 17 .. 33. 31600Sstevel@tonic-gate [Zeev Lieber <zeev-l@yahoo.com>] 31610Sstevel@tonic-gate 31620Sstevel@tonic-gate *) Undo an undocumented change introduced in 0.9.6e which caused 31630Sstevel@tonic-gate repeated calls to OpenSSL_add_all_ciphers() and 31640Sstevel@tonic-gate OpenSSL_add_all_digests() to be ignored, even after calling 31650Sstevel@tonic-gate EVP_cleanup(). 31660Sstevel@tonic-gate [Richard Levitte] 31670Sstevel@tonic-gate 31680Sstevel@tonic-gate *) Change the default configuration reader to deal with last line not 31690Sstevel@tonic-gate being properly terminated. 31700Sstevel@tonic-gate [Richard Levitte] 31710Sstevel@tonic-gate 31720Sstevel@tonic-gate *) Change X509_NAME_cmp() so it applies the special rules on handling 31730Sstevel@tonic-gate DN values that are of type PrintableString, as well as RDNs of type 31740Sstevel@tonic-gate emailAddress where the value has the type ia5String. 31750Sstevel@tonic-gate [stefank@valicert.com via Richard Levitte] 31760Sstevel@tonic-gate 31770Sstevel@tonic-gate *) Add a SSL_SESS_CACHE_NO_INTERNAL_STORE flag to take over half 31780Sstevel@tonic-gate the job SSL_SESS_CACHE_NO_INTERNAL_LOOKUP was inconsistently 31790Sstevel@tonic-gate doing, define a new flag (SSL_SESS_CACHE_NO_INTERNAL) to be 31800Sstevel@tonic-gate the bitwise-OR of the two for use by the majority of applications 31810Sstevel@tonic-gate wanting this behaviour, and update the docs. The documented 31820Sstevel@tonic-gate behaviour and actual behaviour were inconsistent and had been 31830Sstevel@tonic-gate changing anyway, so this is more a bug-fix than a behavioural 31840Sstevel@tonic-gate change. 31850Sstevel@tonic-gate [Geoff Thorpe, diagnosed by Nadav Har'El] 31860Sstevel@tonic-gate 31870Sstevel@tonic-gate *) Don't impose a 16-byte length minimum on session IDs in ssl/s3_clnt.c 31880Sstevel@tonic-gate (the SSL 3.0 and TLS 1.0 specifications allow any length up to 32 bytes). 31890Sstevel@tonic-gate [Bodo Moeller] 31900Sstevel@tonic-gate 31910Sstevel@tonic-gate *) Fix initialization code race conditions in 31920Sstevel@tonic-gate SSLv23_method(), SSLv23_client_method(), SSLv23_server_method(), 31930Sstevel@tonic-gate SSLv2_method(), SSLv2_client_method(), SSLv2_server_method(), 31940Sstevel@tonic-gate SSLv3_method(), SSLv3_client_method(), SSLv3_server_method(), 31950Sstevel@tonic-gate TLSv1_method(), TLSv1_client_method(), TLSv1_server_method(), 31960Sstevel@tonic-gate ssl2_get_cipher_by_char(), 31970Sstevel@tonic-gate ssl3_get_cipher_by_char(). 31980Sstevel@tonic-gate [Patrick McCormick <patrick@tellme.com>, Bodo Moeller] 31990Sstevel@tonic-gate 32000Sstevel@tonic-gate *) Reorder cleanup sequence in SSL_CTX_free(): only remove the ex_data after 32010Sstevel@tonic-gate the cached sessions are flushed, as the remove_cb() might use ex_data 32020Sstevel@tonic-gate contents. Bug found by Sam Varshavchik <mrsam@courier-mta.com> 32030Sstevel@tonic-gate (see [openssl.org #212]). 32040Sstevel@tonic-gate [Geoff Thorpe, Lutz Jaenicke] 32050Sstevel@tonic-gate 32060Sstevel@tonic-gate *) Fix typo in OBJ_txt2obj which incorrectly passed the content 32070Sstevel@tonic-gate length, instead of the encoding length to d2i_ASN1_OBJECT. 32080Sstevel@tonic-gate [Steve Henson] 32090Sstevel@tonic-gate 32100Sstevel@tonic-gate Changes between 0.9.6f and 0.9.6g [9 Aug 2002] 32110Sstevel@tonic-gate 32120Sstevel@tonic-gate *) [In 0.9.6g-engine release:] 32130Sstevel@tonic-gate Fix crypto/engine/vendor_defns/cswift.h for WIN32 (use '_stdcall'). 32140Sstevel@tonic-gate [Lynn Gazis <lgazis@rainbow.com>] 32150Sstevel@tonic-gate 32160Sstevel@tonic-gate Changes between 0.9.6e and 0.9.6f [8 Aug 2002] 32170Sstevel@tonic-gate 32180Sstevel@tonic-gate *) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX 32190Sstevel@tonic-gate and get fix the header length calculation. 32200Sstevel@tonic-gate [Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>, 32210Sstevel@tonic-gate Alon Kantor <alonk@checkpoint.com> (and others), 32220Sstevel@tonic-gate Steve Henson] 32230Sstevel@tonic-gate 32240Sstevel@tonic-gate *) Use proper error handling instead of 'assertions' in buffer 32250Sstevel@tonic-gate overflow checks added in 0.9.6e. This prevents DoS (the 32260Sstevel@tonic-gate assertions could call abort()). 32270Sstevel@tonic-gate [Arne Ansper <arne@ats.cyber.ee>, Bodo Moeller] 32280Sstevel@tonic-gate 32290Sstevel@tonic-gate Changes between 0.9.6d and 0.9.6e [30 Jul 2002] 32300Sstevel@tonic-gate 32310Sstevel@tonic-gate *) Add various sanity checks to asn1_get_length() to reject 32320Sstevel@tonic-gate the ASN1 length bytes if they exceed sizeof(long), will appear 32330Sstevel@tonic-gate negative or the content length exceeds the length of the 32340Sstevel@tonic-gate supplied buffer. 32350Sstevel@tonic-gate [Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>] 32360Sstevel@tonic-gate 32370Sstevel@tonic-gate *) Fix cipher selection routines: ciphers without encryption had no flags 32380Sstevel@tonic-gate for the cipher strength set and where therefore not handled correctly 32390Sstevel@tonic-gate by the selection routines (PR #130). 32400Sstevel@tonic-gate [Lutz Jaenicke] 32410Sstevel@tonic-gate 32420Sstevel@tonic-gate *) Fix EVP_dsa_sha macro. 32430Sstevel@tonic-gate [Nils Larsch] 32440Sstevel@tonic-gate 32450Sstevel@tonic-gate *) New option 32460Sstevel@tonic-gate SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 32470Sstevel@tonic-gate for disabling the SSL 3.0/TLS 1.0 CBC vulnerability countermeasure 32480Sstevel@tonic-gate that was added in OpenSSL 0.9.6d. 32490Sstevel@tonic-gate 32500Sstevel@tonic-gate As the countermeasure turned out to be incompatible with some 32510Sstevel@tonic-gate broken SSL implementations, the new option is part of SSL_OP_ALL. 32520Sstevel@tonic-gate SSL_OP_ALL is usually employed when compatibility with weird SSL 32530Sstevel@tonic-gate implementations is desired (e.g. '-bugs' option to 's_client' and 32540Sstevel@tonic-gate 's_server'), so the new option is automatically set in many 32550Sstevel@tonic-gate applications. 32560Sstevel@tonic-gate [Bodo Moeller] 32570Sstevel@tonic-gate 32580Sstevel@tonic-gate *) Changes in security patch: 32590Sstevel@tonic-gate 32600Sstevel@tonic-gate Changes marked "(CHATS)" were sponsored by the Defense Advanced 32610Sstevel@tonic-gate Research Projects Agency (DARPA) and Air Force Research Laboratory, 32620Sstevel@tonic-gate Air Force Materiel Command, USAF, under agreement number 32630Sstevel@tonic-gate F30602-01-2-0537. 32640Sstevel@tonic-gate 32650Sstevel@tonic-gate *) Add various sanity checks to asn1_get_length() to reject 32660Sstevel@tonic-gate the ASN1 length bytes if they exceed sizeof(long), will appear 32670Sstevel@tonic-gate negative or the content length exceeds the length of the 32680Sstevel@tonic-gate supplied buffer. (CAN-2002-0659) 32690Sstevel@tonic-gate [Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>] 32700Sstevel@tonic-gate 32710Sstevel@tonic-gate *) Assertions for various potential buffer overflows, not known to 32720Sstevel@tonic-gate happen in practice. 32730Sstevel@tonic-gate [Ben Laurie (CHATS)] 32740Sstevel@tonic-gate 32750Sstevel@tonic-gate *) Various temporary buffers to hold ASCII versions of integers were 32760Sstevel@tonic-gate too small for 64 bit platforms. (CAN-2002-0655) 32770Sstevel@tonic-gate [Matthew Byng-Maddick <mbm@aldigital.co.uk> and Ben Laurie (CHATS)> 32780Sstevel@tonic-gate 32790Sstevel@tonic-gate *) Remote buffer overflow in SSL3 protocol - an attacker could 32800Sstevel@tonic-gate supply an oversized session ID to a client. (CAN-2002-0656) 32810Sstevel@tonic-gate [Ben Laurie (CHATS)] 32820Sstevel@tonic-gate 32830Sstevel@tonic-gate *) Remote buffer overflow in SSL2 protocol - an attacker could 32840Sstevel@tonic-gate supply an oversized client master key. (CAN-2002-0656) 32850Sstevel@tonic-gate [Ben Laurie (CHATS)] 32860Sstevel@tonic-gate 32870Sstevel@tonic-gate Changes between 0.9.6c and 0.9.6d [9 May 2002] 32880Sstevel@tonic-gate 32890Sstevel@tonic-gate *) Fix crypto/asn1/a_sign.c so that 'parameters' is omitted (not 32900Sstevel@tonic-gate encoded as NULL) with id-dsa-with-sha1. 32910Sstevel@tonic-gate [Nils Larsch <nla@trustcenter.de>; problem pointed out by Bodo Moeller] 32920Sstevel@tonic-gate 32930Sstevel@tonic-gate *) Check various X509_...() return values in apps/req.c. 32940Sstevel@tonic-gate [Nils Larsch <nla@trustcenter.de>] 32950Sstevel@tonic-gate 32960Sstevel@tonic-gate *) Fix BASE64 decode (EVP_DecodeUpdate) for data with CR/LF ended lines: 32970Sstevel@tonic-gate an end-of-file condition would erronously be flagged, when the CRLF 32980Sstevel@tonic-gate was just at the end of a processed block. The bug was discovered when 32990Sstevel@tonic-gate processing data through a buffering memory BIO handing the data to a 33000Sstevel@tonic-gate BASE64-decoding BIO. Bug fund and patch submitted by Pavel Tsekov 33010Sstevel@tonic-gate <ptsekov@syntrex.com> and Nedelcho Stanev. 33020Sstevel@tonic-gate [Lutz Jaenicke] 33030Sstevel@tonic-gate 33040Sstevel@tonic-gate *) Implement a countermeasure against a vulnerability recently found 33050Sstevel@tonic-gate in CBC ciphersuites in SSL 3.0/TLS 1.0: Send an empty fragment 33060Sstevel@tonic-gate before application data chunks to avoid the use of known IVs 33070Sstevel@tonic-gate with data potentially chosen by the attacker. 33080Sstevel@tonic-gate [Bodo Moeller] 33090Sstevel@tonic-gate 33100Sstevel@tonic-gate *) Fix length checks in ssl3_get_client_hello(). 33110Sstevel@tonic-gate [Bodo Moeller] 33120Sstevel@tonic-gate 33130Sstevel@tonic-gate *) TLS/SSL library bugfix: use s->s3->in_read_app_data differently 33140Sstevel@tonic-gate to prevent ssl3_read_internal() from incorrectly assuming that 33150Sstevel@tonic-gate ssl3_read_bytes() found application data while handshake 33160Sstevel@tonic-gate processing was enabled when in fact s->s3->in_read_app_data was 33170Sstevel@tonic-gate merely automatically cleared during the initial handshake. 33180Sstevel@tonic-gate [Bodo Moeller; problem pointed out by Arne Ansper <arne@ats.cyber.ee>] 33190Sstevel@tonic-gate 33200Sstevel@tonic-gate *) Fix object definitions for Private and Enterprise: they were not 33210Sstevel@tonic-gate recognized in their shortname (=lowercase) representation. Extend 33220Sstevel@tonic-gate obj_dat.pl to issue an error when using undefined keywords instead 33230Sstevel@tonic-gate of silently ignoring the problem (Svenning Sorensen 33240Sstevel@tonic-gate <sss@sss.dnsalias.net>). 33250Sstevel@tonic-gate [Lutz Jaenicke] 33260Sstevel@tonic-gate 33270Sstevel@tonic-gate *) Fix DH_generate_parameters() so that it works for 'non-standard' 33280Sstevel@tonic-gate generators, i.e. generators other than 2 and 5. (Previously, the 33290Sstevel@tonic-gate code did not properly initialise the 'add' and 'rem' values to 33300Sstevel@tonic-gate BN_generate_prime().) 33310Sstevel@tonic-gate 33320Sstevel@tonic-gate In the new general case, we do not insist that 'generator' is 33330Sstevel@tonic-gate actually a primitive root: This requirement is rather pointless; 33340Sstevel@tonic-gate a generator of the order-q subgroup is just as good, if not 33350Sstevel@tonic-gate better. 33360Sstevel@tonic-gate [Bodo Moeller] 33370Sstevel@tonic-gate 33380Sstevel@tonic-gate *) Map new X509 verification errors to alerts. Discovered and submitted by 33390Sstevel@tonic-gate Tom Wu <tom@arcot.com>. 33400Sstevel@tonic-gate [Lutz Jaenicke] 33410Sstevel@tonic-gate 33420Sstevel@tonic-gate *) Fix ssl3_pending() (ssl/s3_lib.c) to prevent SSL_pending() from 33430Sstevel@tonic-gate returning non-zero before the data has been completely received 33440Sstevel@tonic-gate when using non-blocking I/O. 33450Sstevel@tonic-gate [Bodo Moeller; problem pointed out by John Hughes] 33460Sstevel@tonic-gate 33470Sstevel@tonic-gate *) Some of the ciphers missed the strength entry (SSL_LOW etc). 33480Sstevel@tonic-gate [Ben Laurie, Lutz Jaenicke] 33490Sstevel@tonic-gate 33500Sstevel@tonic-gate *) Fix bug in SSL_clear(): bad sessions were not removed (found by 33510Sstevel@tonic-gate Yoram Zahavi <YoramZ@gilian.com>). 33520Sstevel@tonic-gate [Lutz Jaenicke] 33530Sstevel@tonic-gate 33540Sstevel@tonic-gate *) Add information about CygWin 1.3 and on, and preserve proper 33550Sstevel@tonic-gate configuration for the versions before that. 33560Sstevel@tonic-gate [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte] 33570Sstevel@tonic-gate 33580Sstevel@tonic-gate *) Make removal from session cache (SSL_CTX_remove_session()) more robust: 33590Sstevel@tonic-gate check whether we deal with a copy of a session and do not delete from 33600Sstevel@tonic-gate the cache in this case. Problem reported by "Izhar Shoshani Levi" 33610Sstevel@tonic-gate <izhar@checkpoint.com>. 33620Sstevel@tonic-gate [Lutz Jaenicke] 33630Sstevel@tonic-gate 33640Sstevel@tonic-gate *) Do not store session data into the internal session cache, if it 33650Sstevel@tonic-gate is never intended to be looked up (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 33660Sstevel@tonic-gate flag is set). Proposed by Aslam <aslam@funk.com>. 33670Sstevel@tonic-gate [Lutz Jaenicke] 33680Sstevel@tonic-gate 33690Sstevel@tonic-gate *) Have ASN1_BIT_STRING_set_bit() really clear a bit when the requested 33700Sstevel@tonic-gate value is 0. 33710Sstevel@tonic-gate [Richard Levitte] 33720Sstevel@tonic-gate 33730Sstevel@tonic-gate *) [In 0.9.6d-engine release:] 33740Sstevel@tonic-gate Fix a crashbug and a logic bug in hwcrhk_load_pubkey(). 33750Sstevel@tonic-gate [Toomas Kiisk <vix@cyber.ee> via Richard Levitte] 33760Sstevel@tonic-gate 33770Sstevel@tonic-gate *) Add the configuration target linux-s390x. 33780Sstevel@tonic-gate [Neale Ferguson <Neale.Ferguson@SoftwareAG-USA.com> via Richard Levitte] 33790Sstevel@tonic-gate 33800Sstevel@tonic-gate *) The earlier bugfix for the SSL3_ST_SW_HELLO_REQ_C case of 33810Sstevel@tonic-gate ssl3_accept (ssl/s3_srvr.c) incorrectly used a local flag 33820Sstevel@tonic-gate variable as an indication that a ClientHello message has been 33830Sstevel@tonic-gate received. As the flag value will be lost between multiple 33840Sstevel@tonic-gate invocations of ssl3_accept when using non-blocking I/O, the 33850Sstevel@tonic-gate function may not be aware that a handshake has actually taken 33860Sstevel@tonic-gate place, thus preventing a new session from being added to the 33870Sstevel@tonic-gate session cache. 33880Sstevel@tonic-gate 33890Sstevel@tonic-gate To avoid this problem, we now set s->new_session to 2 instead of 33900Sstevel@tonic-gate using a local variable. 33910Sstevel@tonic-gate [Lutz Jaenicke, Bodo Moeller] 33920Sstevel@tonic-gate 33930Sstevel@tonic-gate *) Bugfix: Return -1 from ssl3_get_server_done (ssl3/s3_clnt.c) 33940Sstevel@tonic-gate if the SSL_R_LENGTH_MISMATCH error is detected. 33950Sstevel@tonic-gate [Geoff Thorpe, Bodo Moeller] 33960Sstevel@tonic-gate 33970Sstevel@tonic-gate *) New 'shared_ldflag' column in Configure platform table. 33980Sstevel@tonic-gate [Richard Levitte] 33990Sstevel@tonic-gate 34000Sstevel@tonic-gate *) Fix EVP_CIPHER_mode macro. 34010Sstevel@tonic-gate ["Dan S. Camper" <dan@bti.net>] 34020Sstevel@tonic-gate 34030Sstevel@tonic-gate *) Fix ssl3_read_bytes (ssl/s3_pkt.c): To ignore messages of unknown 34040Sstevel@tonic-gate type, we must throw them away by setting rr->length to 0. 34050Sstevel@tonic-gate [D P Chang <dpc@qualys.com>] 34060Sstevel@tonic-gate 34070Sstevel@tonic-gate Changes between 0.9.6b and 0.9.6c [21 dec 2001] 34080Sstevel@tonic-gate 34090Sstevel@tonic-gate *) Fix BN_rand_range bug pointed out by Dominikus Scherkl 34100Sstevel@tonic-gate <Dominikus.Scherkl@biodata.com>. (The previous implementation 34110Sstevel@tonic-gate worked incorrectly for those cases where range = 10..._2 and 34120Sstevel@tonic-gate 3*range is two bits longer than range.) 34130Sstevel@tonic-gate [Bodo Moeller] 34140Sstevel@tonic-gate 34150Sstevel@tonic-gate *) Only add signing time to PKCS7 structures if it is not already 34160Sstevel@tonic-gate present. 34170Sstevel@tonic-gate [Steve Henson] 34180Sstevel@tonic-gate 34190Sstevel@tonic-gate *) Fix crypto/objects/objects.h: "ld-ce" should be "id-ce", 34200Sstevel@tonic-gate OBJ_ld_ce should be OBJ_id_ce. 34210Sstevel@tonic-gate Also some ip-pda OIDs in crypto/objects/objects.txt were 34220Sstevel@tonic-gate incorrect (cf. RFC 3039). 34230Sstevel@tonic-gate [Matt Cooper, Frederic Giudicelli, Bodo Moeller] 34240Sstevel@tonic-gate 34250Sstevel@tonic-gate *) Release CRYPTO_LOCK_DYNLOCK when CRYPTO_destroy_dynlockid() 34260Sstevel@tonic-gate returns early because it has nothing to do. 34270Sstevel@tonic-gate [Andy Schneider <andy.schneider@bjss.co.uk>] 34280Sstevel@tonic-gate 34290Sstevel@tonic-gate *) [In 0.9.6c-engine release:] 34300Sstevel@tonic-gate Fix mutex callback return values in crypto/engine/hw_ncipher.c. 34310Sstevel@tonic-gate [Andy Schneider <andy.schneider@bjss.co.uk>] 34320Sstevel@tonic-gate 34330Sstevel@tonic-gate *) [In 0.9.6c-engine release:] 34340Sstevel@tonic-gate Add support for Cryptographic Appliance's keyserver technology. 34350Sstevel@tonic-gate (Use engine 'keyclient') 34360Sstevel@tonic-gate [Cryptographic Appliances and Geoff Thorpe] 34370Sstevel@tonic-gate 34380Sstevel@tonic-gate *) Add a configuration entry for OS/390 Unix. The C compiler 'c89' 34390Sstevel@tonic-gate is called via tools/c89.sh because arguments have to be 34400Sstevel@tonic-gate rearranged (all '-L' options must appear before the first object 34410Sstevel@tonic-gate modules). 34420Sstevel@tonic-gate [Richard Shapiro <rshapiro@abinitio.com>] 34430Sstevel@tonic-gate 34440Sstevel@tonic-gate *) [In 0.9.6c-engine release:] 34450Sstevel@tonic-gate Add support for Broadcom crypto accelerator cards, backported 34460Sstevel@tonic-gate from 0.9.7. 34470Sstevel@tonic-gate [Broadcom, Nalin Dahyabhai <nalin@redhat.com>, Mark Cox] 34480Sstevel@tonic-gate 34490Sstevel@tonic-gate *) [In 0.9.6c-engine release:] 34500Sstevel@tonic-gate Add support for SureWare crypto accelerator cards from 34510Sstevel@tonic-gate Baltimore Technologies. (Use engine 'sureware') 34520Sstevel@tonic-gate [Baltimore Technologies and Mark Cox] 34530Sstevel@tonic-gate 34540Sstevel@tonic-gate *) [In 0.9.6c-engine release:] 34550Sstevel@tonic-gate Add support for crypto accelerator cards from Accelerated 34560Sstevel@tonic-gate Encryption Processing, www.aep.ie. (Use engine 'aep') 34570Sstevel@tonic-gate [AEP Inc. and Mark Cox] 34580Sstevel@tonic-gate 34590Sstevel@tonic-gate *) Add a configuration entry for gcc on UnixWare. 34600Sstevel@tonic-gate [Gary Benson <gbenson@redhat.com>] 34610Sstevel@tonic-gate 34620Sstevel@tonic-gate *) Change ssl/s2_clnt.c and ssl/s2_srvr.c so that received handshake 34630Sstevel@tonic-gate messages are stored in a single piece (fixed-length part and 34640Sstevel@tonic-gate variable-length part combined) and fix various bugs found on the way. 34650Sstevel@tonic-gate [Bodo Moeller] 34660Sstevel@tonic-gate 34670Sstevel@tonic-gate *) Disable caching in BIO_gethostbyname(), directly use gethostbyname() 34680Sstevel@tonic-gate instead. BIO_gethostbyname() does not know what timeouts are 34690Sstevel@tonic-gate appropriate, so entries would stay in cache even when they have 34700Sstevel@tonic-gate become invalid. 34710Sstevel@tonic-gate [Bodo Moeller; problem pointed out by Rich Salz <rsalz@zolera.com> 34720Sstevel@tonic-gate 34730Sstevel@tonic-gate *) Change ssl23_get_client_hello (ssl/s23_srvr.c) behaviour when 34740Sstevel@tonic-gate faced with a pathologically small ClientHello fragment that does 34750Sstevel@tonic-gate not contain client_version: Instead of aborting with an error, 34760Sstevel@tonic-gate simply choose the highest available protocol version (i.e., 34770Sstevel@tonic-gate TLS 1.0 unless it is disabled). In practice, ClientHello 34780Sstevel@tonic-gate messages are never sent like this, but this change gives us 34790Sstevel@tonic-gate strictly correct behaviour at least for TLS. 34800Sstevel@tonic-gate [Bodo Moeller] 34810Sstevel@tonic-gate 34820Sstevel@tonic-gate *) Fix SSL handshake functions and SSL_clear() such that SSL_clear() 34830Sstevel@tonic-gate never resets s->method to s->ctx->method when called from within 34840Sstevel@tonic-gate one of the SSL handshake functions. 34850Sstevel@tonic-gate [Bodo Moeller; problem pointed out by Niko Baric] 34860Sstevel@tonic-gate 34870Sstevel@tonic-gate *) In ssl3_get_client_hello (ssl/s3_srvr.c), generate a fatal alert 34880Sstevel@tonic-gate (sent using the client's version number) if client_version is 34890Sstevel@tonic-gate smaller than the protocol version in use. Also change 34900Sstevel@tonic-gate ssl23_get_client_hello (ssl/s23_srvr.c) to select TLS 1.0 if 34910Sstevel@tonic-gate the client demanded SSL 3.0 but only TLS 1.0 is enabled; then 34920Sstevel@tonic-gate the client will at least see that alert. 34930Sstevel@tonic-gate [Bodo Moeller] 34940Sstevel@tonic-gate 34950Sstevel@tonic-gate *) Fix ssl3_get_message (ssl/s3_both.c) to handle message fragmentation 34960Sstevel@tonic-gate correctly. 34970Sstevel@tonic-gate [Bodo Moeller] 34980Sstevel@tonic-gate 34990Sstevel@tonic-gate *) Avoid infinite loop in ssl3_get_message (ssl/s3_both.c) if a 35000Sstevel@tonic-gate client receives HelloRequest while in a handshake. 35010Sstevel@tonic-gate [Bodo Moeller; bug noticed by Andy Schneider <andy.schneider@bjss.co.uk>] 35020Sstevel@tonic-gate 35030Sstevel@tonic-gate *) Bugfix in ssl3_accept (ssl/s3_srvr.c): Case SSL3_ST_SW_HELLO_REQ_C 35040Sstevel@tonic-gate should end in 'break', not 'goto end' which circuments various 35050Sstevel@tonic-gate cleanups done in state SSL_ST_OK. But session related stuff 35060Sstevel@tonic-gate must be disabled for SSL_ST_OK in the case that we just sent a 35070Sstevel@tonic-gate HelloRequest. 35080Sstevel@tonic-gate 35090Sstevel@tonic-gate Also avoid some overhead by not calling ssl_init_wbio_buffer() 35100Sstevel@tonic-gate before just sending a HelloRequest. 35110Sstevel@tonic-gate [Bodo Moeller, Eric Rescorla <ekr@rtfm.com>] 35120Sstevel@tonic-gate 35130Sstevel@tonic-gate *) Fix ssl/s3_enc.c, ssl/t1_enc.c and ssl/s3_pkt.c so that we don't 35140Sstevel@tonic-gate reveal whether illegal block cipher padding was found or a MAC 35150Sstevel@tonic-gate verification error occured. (Neither SSLerr() codes nor alerts 35160Sstevel@tonic-gate are directly visible to potential attackers, but the information 35170Sstevel@tonic-gate may leak via logfiles.) 35180Sstevel@tonic-gate 35190Sstevel@tonic-gate Similar changes are not required for the SSL 2.0 implementation 35200Sstevel@tonic-gate because the number of padding bytes is sent in clear for SSL 2.0, 35210Sstevel@tonic-gate and the extra bytes are just ignored. However ssl/s2_pkt.c 35220Sstevel@tonic-gate failed to verify that the purported number of padding bytes is in 35230Sstevel@tonic-gate the legal range. 35240Sstevel@tonic-gate [Bodo Moeller] 35250Sstevel@tonic-gate 35260Sstevel@tonic-gate *) Add OpenUNIX-8 support including shared libraries 35270Sstevel@tonic-gate (Boyd Lynn Gerber <gerberb@zenez.com>). 35280Sstevel@tonic-gate [Lutz Jaenicke] 35290Sstevel@tonic-gate 35300Sstevel@tonic-gate *) Improve RSA_padding_check_PKCS1_OAEP() check again to avoid 35310Sstevel@tonic-gate 'wristwatch attack' using huge encoding parameters (cf. 35320Sstevel@tonic-gate James H. Manger's CRYPTO 2001 paper). Note that the 35330Sstevel@tonic-gate RSA_PKCS1_OAEP_PADDING case of RSA_private_decrypt() does not use 35340Sstevel@tonic-gate encoding parameters and hence was not vulnerable. 35350Sstevel@tonic-gate [Bodo Moeller] 35360Sstevel@tonic-gate 35370Sstevel@tonic-gate *) BN_sqr() bug fix. 35380Sstevel@tonic-gate [Ulf M�ller, reported by Jim Ellis <jim.ellis@cavium.com>] 35390Sstevel@tonic-gate 35400Sstevel@tonic-gate *) Rabin-Miller test analyses assume uniformly distributed witnesses, 35410Sstevel@tonic-gate so use BN_pseudo_rand_range() instead of using BN_pseudo_rand() 35420Sstevel@tonic-gate followed by modular reduction. 35430Sstevel@tonic-gate [Bodo Moeller; pointed out by Adam Young <AYoung1@NCSUS.JNJ.COM>] 35440Sstevel@tonic-gate 35450Sstevel@tonic-gate *) Add BN_pseudo_rand_range() with obvious functionality: BN_rand_range() 35460Sstevel@tonic-gate equivalent based on BN_pseudo_rand() instead of BN_rand(). 35470Sstevel@tonic-gate [Bodo Moeller] 35480Sstevel@tonic-gate 35490Sstevel@tonic-gate *) s3_srvr.c: allow sending of large client certificate lists (> 16 kB). 35500Sstevel@tonic-gate This function was broken, as the check for a new client hello message 35510Sstevel@tonic-gate to handle SGC did not allow these large messages. 35520Sstevel@tonic-gate (Tracked down by "Douglas E. Engert" <deengert@anl.gov>.) 35530Sstevel@tonic-gate [Lutz Jaenicke] 35540Sstevel@tonic-gate 35550Sstevel@tonic-gate *) Add alert descriptions for TLSv1 to SSL_alert_desc_string[_long](). 35560Sstevel@tonic-gate [Lutz Jaenicke] 35570Sstevel@tonic-gate 35580Sstevel@tonic-gate *) Fix buggy behaviour of BIO_get_num_renegotiates() and BIO_ctrl() 35590Sstevel@tonic-gate for BIO_C_GET_WRITE_BUF_SIZE ("Stephen Hinton" <shinton@netopia.com>). 35600Sstevel@tonic-gate [Lutz Jaenicke] 35610Sstevel@tonic-gate 35620Sstevel@tonic-gate *) Rework the configuration and shared library support for Tru64 Unix. 35630Sstevel@tonic-gate The configuration part makes use of modern compiler features and 35640Sstevel@tonic-gate still retains old compiler behavior for those that run older versions 35650Sstevel@tonic-gate of the OS. The shared library support part includes a variant that 35660Sstevel@tonic-gate uses the RPATH feature, and is available through the special 35670Sstevel@tonic-gate configuration target "alpha-cc-rpath", which will never be selected 35680Sstevel@tonic-gate automatically. 35690Sstevel@tonic-gate [Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu> via Richard Levitte] 35700Sstevel@tonic-gate 35710Sstevel@tonic-gate *) In ssl3_get_key_exchange (ssl/s3_clnt.c), call ssl3_get_message() 35720Sstevel@tonic-gate with the same message size as in ssl3_get_certificate_request(). 35730Sstevel@tonic-gate Otherwise, if no ServerKeyExchange message occurs, CertificateRequest 35740Sstevel@tonic-gate messages might inadvertently be reject as too long. 35750Sstevel@tonic-gate [Petr Lampa <lampa@fee.vutbr.cz>] 35760Sstevel@tonic-gate 35770Sstevel@tonic-gate *) Enhanced support for IA-64 Unix platforms (well, Linux and HP-UX). 35780Sstevel@tonic-gate [Andy Polyakov] 35790Sstevel@tonic-gate 35800Sstevel@tonic-gate *) Modified SSL library such that the verify_callback that has been set 35810Sstevel@tonic-gate specificly for an SSL object with SSL_set_verify() is actually being 35820Sstevel@tonic-gate used. Before the change, a verify_callback set with this function was 35830Sstevel@tonic-gate ignored and the verify_callback() set in the SSL_CTX at the time of 35840Sstevel@tonic-gate the call was used. New function X509_STORE_CTX_set_verify_cb() introduced 35850Sstevel@tonic-gate to allow the necessary settings. 35860Sstevel@tonic-gate [Lutz Jaenicke] 35870Sstevel@tonic-gate 35880Sstevel@tonic-gate *) Initialize static variable in crypto/dsa/dsa_lib.c and crypto/dh/dh_lib.c 35890Sstevel@tonic-gate explicitly to NULL, as at least on Solaris 8 this seems not always to be 35900Sstevel@tonic-gate done automatically (in contradiction to the requirements of the C 35910Sstevel@tonic-gate standard). This made problems when used from OpenSSH. 35920Sstevel@tonic-gate [Lutz Jaenicke] 35930Sstevel@tonic-gate 35940Sstevel@tonic-gate *) In OpenSSL 0.9.6a and 0.9.6b, crypto/dh/dh_key.c ignored 35950Sstevel@tonic-gate dh->length and always used 35960Sstevel@tonic-gate 35970Sstevel@tonic-gate BN_rand_range(priv_key, dh->p). 35980Sstevel@tonic-gate 35990Sstevel@tonic-gate BN_rand_range() is not necessary for Diffie-Hellman, and this 36000Sstevel@tonic-gate specific range makes Diffie-Hellman unnecessarily inefficient if 36010Sstevel@tonic-gate dh->length (recommended exponent length) is much smaller than the 36020Sstevel@tonic-gate length of dh->p. We could use BN_rand_range() if the order of 36030Sstevel@tonic-gate the subgroup was stored in the DH structure, but we only have 36040Sstevel@tonic-gate dh->length. 36050Sstevel@tonic-gate 36060Sstevel@tonic-gate So switch back to 36070Sstevel@tonic-gate 36080Sstevel@tonic-gate BN_rand(priv_key, l, ...) 36090Sstevel@tonic-gate 36100Sstevel@tonic-gate where 'l' is dh->length if this is defined, or BN_num_bits(dh->p)-1 36110Sstevel@tonic-gate otherwise. 36120Sstevel@tonic-gate [Bodo Moeller] 36130Sstevel@tonic-gate 36140Sstevel@tonic-gate *) In 36150Sstevel@tonic-gate 36160Sstevel@tonic-gate RSA_eay_public_encrypt 36170Sstevel@tonic-gate RSA_eay_private_decrypt 36180Sstevel@tonic-gate RSA_eay_private_encrypt (signing) 36190Sstevel@tonic-gate RSA_eay_public_decrypt (signature verification) 36200Sstevel@tonic-gate 36210Sstevel@tonic-gate (default implementations for RSA_public_encrypt, 36220Sstevel@tonic-gate RSA_private_decrypt, RSA_private_encrypt, RSA_public_decrypt), 36230Sstevel@tonic-gate always reject numbers >= n. 36240Sstevel@tonic-gate [Bodo Moeller] 36250Sstevel@tonic-gate 36260Sstevel@tonic-gate *) In crypto/rand/md_rand.c, use a new short-time lock CRYPTO_LOCK_RAND2 36270Sstevel@tonic-gate to synchronize access to 'locking_thread'. This is necessary on 36280Sstevel@tonic-gate systems where access to 'locking_thread' (an 'unsigned long' 36290Sstevel@tonic-gate variable) is not atomic. 36300Sstevel@tonic-gate [Bodo Moeller] 36310Sstevel@tonic-gate 36320Sstevel@tonic-gate *) In crypto/rand/md_rand.c, set 'locking_thread' to current thread's ID 36330Sstevel@tonic-gate *before* setting the 'crypto_lock_rand' flag. The previous code had 36340Sstevel@tonic-gate a race condition if 0 is a valid thread ID. 36350Sstevel@tonic-gate [Travis Vitek <vitek@roguewave.com>] 36360Sstevel@tonic-gate 36370Sstevel@tonic-gate *) Add support for shared libraries under Irix. 36380Sstevel@tonic-gate [Albert Chin-A-Young <china@thewrittenword.com>] 36390Sstevel@tonic-gate 36400Sstevel@tonic-gate *) Add configuration option to build on Linux on both big-endian and 36410Sstevel@tonic-gate little-endian MIPS. 36420Sstevel@tonic-gate [Ralf Baechle <ralf@uni-koblenz.de>] 36430Sstevel@tonic-gate 36440Sstevel@tonic-gate *) Add the possibility to create shared libraries on HP-UX. 36450Sstevel@tonic-gate [Richard Levitte] 36460Sstevel@tonic-gate 36470Sstevel@tonic-gate Changes between 0.9.6a and 0.9.6b [9 Jul 2001] 36480Sstevel@tonic-gate 36490Sstevel@tonic-gate *) Change ssleay_rand_bytes (crypto/rand/md_rand.c) 36500Sstevel@tonic-gate to avoid a SSLeay/OpenSSL PRNG weakness pointed out by 36510Sstevel@tonic-gate Markku-Juhani O. Saarinen <markku-juhani.saarinen@nokia.com>: 36520Sstevel@tonic-gate PRNG state recovery was possible based on the output of 36530Sstevel@tonic-gate one PRNG request appropriately sized to gain knowledge on 36540Sstevel@tonic-gate 'md' followed by enough consecutive 1-byte PRNG requests 36550Sstevel@tonic-gate to traverse all of 'state'. 36560Sstevel@tonic-gate 36570Sstevel@tonic-gate 1. When updating 'md_local' (the current thread's copy of 'md') 36580Sstevel@tonic-gate during PRNG output generation, hash all of the previous 36590Sstevel@tonic-gate 'md_local' value, not just the half used for PRNG output. 36600Sstevel@tonic-gate 36610Sstevel@tonic-gate 2. Make the number of bytes from 'state' included into the hash 36620Sstevel@tonic-gate independent from the number of PRNG bytes requested. 36630Sstevel@tonic-gate 36640Sstevel@tonic-gate The first measure alone would be sufficient to avoid 36650Sstevel@tonic-gate Markku-Juhani's attack. (Actually it had never occurred 36660Sstevel@tonic-gate to me that the half of 'md_local' used for chaining was the 36670Sstevel@tonic-gate half from which PRNG output bytes were taken -- I had always 36680Sstevel@tonic-gate assumed that the secret half would be used.) The second 36690Sstevel@tonic-gate measure makes sure that additional data from 'state' is never 36700Sstevel@tonic-gate mixed into 'md_local' in small portions; this heuristically 36710Sstevel@tonic-gate further strengthens the PRNG. 36720Sstevel@tonic-gate [Bodo Moeller] 36730Sstevel@tonic-gate 36740Sstevel@tonic-gate *) Fix crypto/bn/asm/mips3.s. 36750Sstevel@tonic-gate [Andy Polyakov] 36760Sstevel@tonic-gate 36770Sstevel@tonic-gate *) When only the key is given to "enc", the IV is undefined. Print out 36780Sstevel@tonic-gate an error message in this case. 36790Sstevel@tonic-gate [Lutz Jaenicke] 36800Sstevel@tonic-gate 36810Sstevel@tonic-gate *) Handle special case when X509_NAME is empty in X509 printing routines. 36820Sstevel@tonic-gate [Steve Henson] 36830Sstevel@tonic-gate 36840Sstevel@tonic-gate *) In dsa_do_verify (crypto/dsa/dsa_ossl.c), verify that r and s are 36850Sstevel@tonic-gate positive and less than q. 36860Sstevel@tonic-gate [Bodo Moeller] 36870Sstevel@tonic-gate 36880Sstevel@tonic-gate *) Don't change *pointer in CRYPTO_add_lock() is add_lock_callback is 36890Sstevel@tonic-gate used: it isn't thread safe and the add_lock_callback should handle 36900Sstevel@tonic-gate that itself. 36910Sstevel@tonic-gate [Paul Rose <Paul.Rose@bridge.com>] 36920Sstevel@tonic-gate 36930Sstevel@tonic-gate *) Verify that incoming data obeys the block size in 36940Sstevel@tonic-gate ssl3_enc (ssl/s3_enc.c) and tls1_enc (ssl/t1_enc.c). 36950Sstevel@tonic-gate [Bodo Moeller] 36960Sstevel@tonic-gate 36970Sstevel@tonic-gate *) Fix OAEP check. 36980Sstevel@tonic-gate [Ulf M�ller, Bodo M�ller] 36990Sstevel@tonic-gate 37000Sstevel@tonic-gate *) The countermeasure against Bleichbacher's attack on PKCS #1 v1.5 37010Sstevel@tonic-gate RSA encryption was accidentally removed in s3_srvr.c in OpenSSL 0.9.5 37020Sstevel@tonic-gate when fixing the server behaviour for backwards-compatible 'client 37030Sstevel@tonic-gate hello' messages. (Note that the attack is impractical against 37040Sstevel@tonic-gate SSL 3.0 and TLS 1.0 anyway because length and version checking 37050Sstevel@tonic-gate means that the probability of guessing a valid ciphertext is 37060Sstevel@tonic-gate around 2^-40; see section 5 in Bleichenbacher's CRYPTO '98 37070Sstevel@tonic-gate paper.) 37080Sstevel@tonic-gate 37090Sstevel@tonic-gate Before 0.9.5, the countermeasure (hide the error by generating a 37100Sstevel@tonic-gate random 'decryption result') did not work properly because 37110Sstevel@tonic-gate ERR_clear_error() was missing, meaning that SSL_get_error() would 37120Sstevel@tonic-gate detect the supposedly ignored error. 37130Sstevel@tonic-gate 37140Sstevel@tonic-gate Both problems are now fixed. 37150Sstevel@tonic-gate [Bodo Moeller] 37160Sstevel@tonic-gate 37170Sstevel@tonic-gate *) In crypto/bio/bf_buff.c, increase DEFAULT_BUFFER_SIZE to 4096 37180Sstevel@tonic-gate (previously it was 1024). 37190Sstevel@tonic-gate [Bodo Moeller] 37200Sstevel@tonic-gate 37210Sstevel@tonic-gate *) Fix for compatibility mode trust settings: ignore trust settings 37220Sstevel@tonic-gate unless some valid trust or reject settings are present. 37230Sstevel@tonic-gate [Steve Henson] 37240Sstevel@tonic-gate 37250Sstevel@tonic-gate *) Fix for blowfish EVP: its a variable length cipher. 37260Sstevel@tonic-gate [Steve Henson] 37270Sstevel@tonic-gate 37280Sstevel@tonic-gate *) Fix various bugs related to DSA S/MIME verification. Handle missing 37290Sstevel@tonic-gate parameters in DSA public key structures and return an error in the 37300Sstevel@tonic-gate DSA routines if parameters are absent. 37310Sstevel@tonic-gate [Steve Henson] 37320Sstevel@tonic-gate 37330Sstevel@tonic-gate *) In versions up to 0.9.6, RAND_file_name() resorted to file ".rnd" 37340Sstevel@tonic-gate in the current directory if neither $RANDFILE nor $HOME was set. 37350Sstevel@tonic-gate RAND_file_name() in 0.9.6a returned NULL in this case. This has 37360Sstevel@tonic-gate caused some confusion to Windows users who haven't defined $HOME. 37370Sstevel@tonic-gate Thus RAND_file_name() is changed again: e_os.h can define a 37380Sstevel@tonic-gate DEFAULT_HOME, which will be used if $HOME is not set. 37390Sstevel@tonic-gate For Windows, we use "C:"; on other platforms, we still require 37400Sstevel@tonic-gate environment variables. 37410Sstevel@tonic-gate 37420Sstevel@tonic-gate *) Move 'if (!initialized) RAND_poll()' into regions protected by 37430Sstevel@tonic-gate CRYPTO_LOCK_RAND. This is not strictly necessary, but avoids 37440Sstevel@tonic-gate having multiple threads call RAND_poll() concurrently. 37450Sstevel@tonic-gate [Bodo Moeller] 37460Sstevel@tonic-gate 37470Sstevel@tonic-gate *) In crypto/rand/md_rand.c, replace 'add_do_not_lock' flag by a 37480Sstevel@tonic-gate combination of a flag and a thread ID variable. 37490Sstevel@tonic-gate Otherwise while one thread is in ssleay_rand_bytes (which sets the 37500Sstevel@tonic-gate flag), *other* threads can enter ssleay_add_bytes without obeying 37510Sstevel@tonic-gate the CRYPTO_LOCK_RAND lock (and may even illegally release the lock 37520Sstevel@tonic-gate that they do not hold after the first thread unsets add_do_not_lock). 37530Sstevel@tonic-gate [Bodo Moeller] 37540Sstevel@tonic-gate 37550Sstevel@tonic-gate *) Change bctest again: '-x' expressions are not available in all 37560Sstevel@tonic-gate versions of 'test'. 37570Sstevel@tonic-gate [Bodo Moeller] 37580Sstevel@tonic-gate 37590Sstevel@tonic-gate Changes between 0.9.6 and 0.9.6a [5 Apr 2001] 37600Sstevel@tonic-gate 37610Sstevel@tonic-gate *) Fix a couple of memory leaks in PKCS7_dataDecode() 37620Sstevel@tonic-gate [Steve Henson, reported by Heyun Zheng <hzheng@atdsprint.com>] 37630Sstevel@tonic-gate 37640Sstevel@tonic-gate *) Change Configure and Makefiles to provide EXE_EXT, which will contain 37650Sstevel@tonic-gate the default extension for executables, if any. Also, make the perl 37660Sstevel@tonic-gate scripts that use symlink() to test if it really exists and use "cp" 37670Sstevel@tonic-gate if it doesn't. All this made OpenSSL compilable and installable in 37680Sstevel@tonic-gate CygWin. 37690Sstevel@tonic-gate [Richard Levitte] 37700Sstevel@tonic-gate 37710Sstevel@tonic-gate *) Fix for asn1_GetSequence() for indefinite length constructed data. 37720Sstevel@tonic-gate If SEQUENCE is length is indefinite just set c->slen to the total 37730Sstevel@tonic-gate amount of data available. 37740Sstevel@tonic-gate [Steve Henson, reported by shige@FreeBSD.org] 37750Sstevel@tonic-gate [This change does not apply to 0.9.7.] 37760Sstevel@tonic-gate 37770Sstevel@tonic-gate *) Change bctest to avoid here-documents inside command substitution 37780Sstevel@tonic-gate (workaround for FreeBSD /bin/sh bug). 37790Sstevel@tonic-gate For compatibility with Ultrix, avoid shell functions (introduced 37800Sstevel@tonic-gate in the bctest version that searches along $PATH). 37810Sstevel@tonic-gate [Bodo Moeller] 37820Sstevel@tonic-gate 37830Sstevel@tonic-gate *) Rename 'des_encrypt' to 'des_encrypt1'. This avoids the clashes 37840Sstevel@tonic-gate with des_encrypt() defined on some operating systems, like Solaris 37850Sstevel@tonic-gate and UnixWare. 37860Sstevel@tonic-gate [Richard Levitte] 37870Sstevel@tonic-gate 37880Sstevel@tonic-gate *) Check the result of RSA-CRT (see D. Boneh, R. DeMillo, R. Lipton: 37890Sstevel@tonic-gate On the Importance of Eliminating Errors in Cryptographic 37900Sstevel@tonic-gate Computations, J. Cryptology 14 (2001) 2, 101-119, 37910Sstevel@tonic-gate http://theory.stanford.edu/~dabo/papers/faults.ps.gz). 37920Sstevel@tonic-gate [Ulf Moeller] 37930Sstevel@tonic-gate 37940Sstevel@tonic-gate *) MIPS assembler BIGNUM division bug fix. 37950Sstevel@tonic-gate [Andy Polyakov] 37960Sstevel@tonic-gate 37970Sstevel@tonic-gate *) Disabled incorrect Alpha assembler code. 37980Sstevel@tonic-gate [Richard Levitte] 37990Sstevel@tonic-gate 38000Sstevel@tonic-gate *) Fix PKCS#7 decode routines so they correctly update the length 38010Sstevel@tonic-gate after reading an EOC for the EXPLICIT tag. 38020Sstevel@tonic-gate [Steve Henson] 38030Sstevel@tonic-gate [This change does not apply to 0.9.7.] 38040Sstevel@tonic-gate 38050Sstevel@tonic-gate *) Fix bug in PKCS#12 key generation routines. This was triggered 38060Sstevel@tonic-gate if a 3DES key was generated with a 0 initial byte. Include 38070Sstevel@tonic-gate PKCS12_BROKEN_KEYGEN compilation option to retain the old 38080Sstevel@tonic-gate (but broken) behaviour. 38090Sstevel@tonic-gate [Steve Henson] 38100Sstevel@tonic-gate 38110Sstevel@tonic-gate *) Enhance bctest to search for a working bc along $PATH and print 38120Sstevel@tonic-gate it when found. 38130Sstevel@tonic-gate [Tim Rice <tim@multitalents.net> via Richard Levitte] 38140Sstevel@tonic-gate 38150Sstevel@tonic-gate *) Fix memory leaks in err.c: free err_data string if necessary; 38160Sstevel@tonic-gate don't write to the wrong index in ERR_set_error_data. 38170Sstevel@tonic-gate [Bodo Moeller] 38180Sstevel@tonic-gate 38190Sstevel@tonic-gate *) Implement ssl23_peek (analogous to ssl23_read), which previously 38200Sstevel@tonic-gate did not exist. 38210Sstevel@tonic-gate [Bodo Moeller] 38220Sstevel@tonic-gate 38230Sstevel@tonic-gate *) Replace rdtsc with _emit statements for VC++ version 5. 38240Sstevel@tonic-gate [Jeremy Cooper <jeremy@baymoo.org>] 38250Sstevel@tonic-gate 38260Sstevel@tonic-gate *) Make it possible to reuse SSLv2 sessions. 38270Sstevel@tonic-gate [Richard Levitte] 38280Sstevel@tonic-gate 38290Sstevel@tonic-gate *) In copy_email() check for >= 0 as a return value for 38300Sstevel@tonic-gate X509_NAME_get_index_by_NID() since 0 is a valid index. 38310Sstevel@tonic-gate [Steve Henson reported by Massimiliano Pala <madwolf@opensca.org>] 38320Sstevel@tonic-gate 38330Sstevel@tonic-gate *) Avoid coredump with unsupported or invalid public keys by checking if 38340Sstevel@tonic-gate X509_get_pubkey() fails in PKCS7_verify(). Fix memory leak when 38350Sstevel@tonic-gate PKCS7_verify() fails with non detached data. 38360Sstevel@tonic-gate [Steve Henson] 38370Sstevel@tonic-gate 38380Sstevel@tonic-gate *) Don't use getenv in library functions when run as setuid/setgid. 38390Sstevel@tonic-gate New function OPENSSL_issetugid(). 38400Sstevel@tonic-gate [Ulf Moeller] 38410Sstevel@tonic-gate 38420Sstevel@tonic-gate *) Avoid false positives in memory leak detection code (crypto/mem_dbg.c) 38430Sstevel@tonic-gate due to incorrect handling of multi-threading: 38440Sstevel@tonic-gate 38450Sstevel@tonic-gate 1. Fix timing glitch in the MemCheck_off() portion of CRYPTO_mem_ctrl(). 38460Sstevel@tonic-gate 38470Sstevel@tonic-gate 2. Fix logical glitch in is_MemCheck_on() aka CRYPTO_is_mem_check_on(). 38480Sstevel@tonic-gate 38490Sstevel@tonic-gate 3. Count how many times MemCheck_off() has been called so that 38500Sstevel@tonic-gate nested use can be treated correctly. This also avoids 38510Sstevel@tonic-gate inband-signalling in the previous code (which relied on the 38520Sstevel@tonic-gate assumption that thread ID 0 is impossible). 38530Sstevel@tonic-gate [Bodo Moeller] 38540Sstevel@tonic-gate 38550Sstevel@tonic-gate *) Add "-rand" option also to s_client and s_server. 38560Sstevel@tonic-gate [Lutz Jaenicke] 38570Sstevel@tonic-gate 38580Sstevel@tonic-gate *) Fix CPU detection on Irix 6.x. 38590Sstevel@tonic-gate [Kurt Hockenbury <khockenb@stevens-tech.edu> and 38600Sstevel@tonic-gate "Bruce W. Forsberg" <bruce.forsberg@baesystems.com>] 38610Sstevel@tonic-gate 38620Sstevel@tonic-gate *) Fix X509_NAME bug which produced incorrect encoding if X509_NAME 38630Sstevel@tonic-gate was empty. 38640Sstevel@tonic-gate [Steve Henson] 38650Sstevel@tonic-gate [This change does not apply to 0.9.7.] 38660Sstevel@tonic-gate 38670Sstevel@tonic-gate *) Use the cached encoding of an X509_NAME structure rather than 38680Sstevel@tonic-gate copying it. This is apparently the reason for the libsafe "errors" 38690Sstevel@tonic-gate but the code is actually correct. 38700Sstevel@tonic-gate [Steve Henson] 38710Sstevel@tonic-gate 38720Sstevel@tonic-gate *) Add new function BN_rand_range(), and fix DSA_sign_setup() to prevent 38730Sstevel@tonic-gate Bleichenbacher's DSA attack. 38740Sstevel@tonic-gate Extend BN_[pseudo_]rand: As before, top=1 forces the highest two bits 38750Sstevel@tonic-gate to be set and top=0 forces the highest bit to be set; top=-1 is new 38760Sstevel@tonic-gate and leaves the highest bit random. 38770Sstevel@tonic-gate [Ulf Moeller, Bodo Moeller] 38780Sstevel@tonic-gate 38790Sstevel@tonic-gate *) In the NCONF_...-based implementations for CONF_... queries 38800Sstevel@tonic-gate (crypto/conf/conf_lib.c), if the input LHASH is NULL, avoid using 38810Sstevel@tonic-gate a temporary CONF structure with the data component set to NULL 38820Sstevel@tonic-gate (which gives segmentation faults in lh_retrieve). 38830Sstevel@tonic-gate Instead, use NULL for the CONF pointer in CONF_get_string and 38840Sstevel@tonic-gate CONF_get_number (which may use environment variables) and directly 38850Sstevel@tonic-gate return NULL from CONF_get_section. 38860Sstevel@tonic-gate [Bodo Moeller] 38870Sstevel@tonic-gate 38880Sstevel@tonic-gate *) Fix potential buffer overrun for EBCDIC. 38890Sstevel@tonic-gate [Ulf Moeller] 38900Sstevel@tonic-gate 38910Sstevel@tonic-gate *) Tolerate nonRepudiation as being valid for S/MIME signing and certSign 38920Sstevel@tonic-gate keyUsage if basicConstraints absent for a CA. 38930Sstevel@tonic-gate [Steve Henson] 38940Sstevel@tonic-gate 38950Sstevel@tonic-gate *) Make SMIME_write_PKCS7() write mail header values with a format that 38960Sstevel@tonic-gate is more generally accepted (no spaces before the semicolon), since 38970Sstevel@tonic-gate some programs can't parse those values properly otherwise. Also make 38980Sstevel@tonic-gate sure BIO's that break lines after each write do not create invalid 38990Sstevel@tonic-gate headers. 39000Sstevel@tonic-gate [Richard Levitte] 39010Sstevel@tonic-gate 39020Sstevel@tonic-gate *) Make the CRL encoding routines work with empty SEQUENCE OF. The 39030Sstevel@tonic-gate macros previously used would not encode an empty SEQUENCE OF 39040Sstevel@tonic-gate and break the signature. 39050Sstevel@tonic-gate [Steve Henson] 39060Sstevel@tonic-gate [This change does not apply to 0.9.7.] 39070Sstevel@tonic-gate 39080Sstevel@tonic-gate *) Zero the premaster secret after deriving the master secret in 39090Sstevel@tonic-gate DH ciphersuites. 39100Sstevel@tonic-gate [Steve Henson] 39110Sstevel@tonic-gate 39120Sstevel@tonic-gate *) Add some EVP_add_digest_alias registrations (as found in 39130Sstevel@tonic-gate OpenSSL_add_all_digests()) to SSL_library_init() 39140Sstevel@tonic-gate aka OpenSSL_add_ssl_algorithms(). This provides improved 39150Sstevel@tonic-gate compatibility with peers using X.509 certificates 39160Sstevel@tonic-gate with unconventional AlgorithmIdentifier OIDs. 39170Sstevel@tonic-gate [Bodo Moeller] 39180Sstevel@tonic-gate 39190Sstevel@tonic-gate *) Fix for Irix with NO_ASM. 39200Sstevel@tonic-gate ["Bruce W. Forsberg" <bruce.forsberg@baesystems.com>] 39210Sstevel@tonic-gate 39220Sstevel@tonic-gate *) ./config script fixes. 39230Sstevel@tonic-gate [Ulf Moeller, Richard Levitte] 39240Sstevel@tonic-gate 39250Sstevel@tonic-gate *) Fix 'openssl passwd -1'. 39260Sstevel@tonic-gate [Bodo Moeller] 39270Sstevel@tonic-gate 39280Sstevel@tonic-gate *) Change PKCS12_key_gen_asc() so it can cope with non null 39290Sstevel@tonic-gate terminated strings whose length is passed in the passlen 39300Sstevel@tonic-gate parameter, for example from PEM callbacks. This was done 39310Sstevel@tonic-gate by adding an extra length parameter to asc2uni(). 39320Sstevel@tonic-gate [Steve Henson, reported by <oddissey@samsung.co.kr>] 39330Sstevel@tonic-gate 39340Sstevel@tonic-gate *) Fix C code generated by 'openssl dsaparam -C': If a BN_bin2bn 39350Sstevel@tonic-gate call failed, free the DSA structure. 39360Sstevel@tonic-gate [Bodo Moeller] 39370Sstevel@tonic-gate 39380Sstevel@tonic-gate *) Fix to uni2asc() to cope with zero length Unicode strings. 39390Sstevel@tonic-gate These are present in some PKCS#12 files. 39400Sstevel@tonic-gate [Steve Henson] 39410Sstevel@tonic-gate 39420Sstevel@tonic-gate *) Increase s2->wbuf allocation by one byte in ssl2_new (ssl/s2_lib.c). 39430Sstevel@tonic-gate Otherwise do_ssl_write (ssl/s2_pkt.c) will write beyond buffer limits 39440Sstevel@tonic-gate when writing a 32767 byte record. 39450Sstevel@tonic-gate [Bodo Moeller; problem reported by Eric Day <eday@concentric.net>] 39460Sstevel@tonic-gate 39470Sstevel@tonic-gate *) In RSA_eay_public_{en,ed}crypt and RSA_eay_mod_exp (rsa_eay.c), 39480Sstevel@tonic-gate obtain lock CRYPTO_LOCK_RSA before setting rsa->_method_mod_{n,p,q}. 39490Sstevel@tonic-gate 39500Sstevel@tonic-gate (RSA objects have a reference count access to which is protected 39510Sstevel@tonic-gate by CRYPTO_LOCK_RSA [see rsa_lib.c, s3_srvr.c, ssl_cert.c, ssl_rsa.c], 39520Sstevel@tonic-gate so they are meant to be shared between threads.) 39530Sstevel@tonic-gate [Bodo Moeller, Geoff Thorpe; original patch submitted by 39540Sstevel@tonic-gate "Reddie, Steven" <Steven.Reddie@ca.com>] 39550Sstevel@tonic-gate 39560Sstevel@tonic-gate *) Fix a deadlock in CRYPTO_mem_leaks(). 39570Sstevel@tonic-gate [Bodo Moeller] 39580Sstevel@tonic-gate 39590Sstevel@tonic-gate *) Use better test patterns in bntest. 39600Sstevel@tonic-gate [Ulf M�ller] 39610Sstevel@tonic-gate 39620Sstevel@tonic-gate *) rand_win.c fix for Borland C. 39630Sstevel@tonic-gate [Ulf M�ller] 39640Sstevel@tonic-gate 39650Sstevel@tonic-gate *) BN_rshift bugfix for n == 0. 39660Sstevel@tonic-gate [Bodo Moeller] 39670Sstevel@tonic-gate 39680Sstevel@tonic-gate *) Add a 'bctest' script that checks for some known 'bc' bugs 39690Sstevel@tonic-gate so that 'make test' does not abort just because 'bc' is broken. 39700Sstevel@tonic-gate [Bodo Moeller] 39710Sstevel@tonic-gate 39720Sstevel@tonic-gate *) Store verify_result within SSL_SESSION also for client side to 39730Sstevel@tonic-gate avoid potential security hole. (Re-used sessions on the client side 39740Sstevel@tonic-gate always resulted in verify_result==X509_V_OK, not using the original 39750Sstevel@tonic-gate result of the server certificate verification.) 39760Sstevel@tonic-gate [Lutz Jaenicke] 39770Sstevel@tonic-gate 39780Sstevel@tonic-gate *) Fix ssl3_pending: If the record in s->s3->rrec is not of type 39790Sstevel@tonic-gate SSL3_RT_APPLICATION_DATA, return 0. 39800Sstevel@tonic-gate Similarly, change ssl2_pending to return 0 if SSL_in_init(s) is true. 39810Sstevel@tonic-gate [Bodo Moeller] 39820Sstevel@tonic-gate 39830Sstevel@tonic-gate *) Fix SSL_peek: 39840Sstevel@tonic-gate Both ssl2_peek and ssl3_peek, which were totally broken in earlier 39850Sstevel@tonic-gate releases, have been re-implemented by renaming the previous 39860Sstevel@tonic-gate implementations of ssl2_read and ssl3_read to ssl2_read_internal 39870Sstevel@tonic-gate and ssl3_read_internal, respectively, and adding 'peek' parameters 39880Sstevel@tonic-gate to them. The new ssl[23]_{read,peek} functions are calls to 39890Sstevel@tonic-gate ssl[23]_read_internal with the 'peek' flag set appropriately. 39900Sstevel@tonic-gate A 'peek' parameter has also been added to ssl3_read_bytes, which 39910Sstevel@tonic-gate does the actual work for ssl3_read_internal. 39920Sstevel@tonic-gate [Bodo Moeller] 39930Sstevel@tonic-gate 39940Sstevel@tonic-gate *) Initialise "ex_data" member of RSA/DSA/DH structures prior to calling 39950Sstevel@tonic-gate the method-specific "init()" handler. Also clean up ex_data after 39960Sstevel@tonic-gate calling the method-specific "finish()" handler. Previously, this was 39970Sstevel@tonic-gate happening the other way round. 39980Sstevel@tonic-gate [Geoff Thorpe] 39990Sstevel@tonic-gate 40000Sstevel@tonic-gate *) Increase BN_CTX_NUM (the number of BIGNUMs in a BN_CTX) to 16. 40010Sstevel@tonic-gate The previous value, 12, was not always sufficient for BN_mod_exp(). 40020Sstevel@tonic-gate [Bodo Moeller] 40030Sstevel@tonic-gate 40040Sstevel@tonic-gate *) Make sure that shared libraries get the internal name engine with 40050Sstevel@tonic-gate the full version number and not just 0. This should mark the 40060Sstevel@tonic-gate shared libraries as not backward compatible. Of course, this should 40070Sstevel@tonic-gate be changed again when we can guarantee backward binary compatibility. 40080Sstevel@tonic-gate [Richard Levitte] 40090Sstevel@tonic-gate 40100Sstevel@tonic-gate *) Fix typo in get_cert_by_subject() in by_dir.c 40110Sstevel@tonic-gate [Jean-Marc Desperrier <jean-marc.desperrier@certplus.com>] 40120Sstevel@tonic-gate 40130Sstevel@tonic-gate *) Rework the system to generate shared libraries: 40140Sstevel@tonic-gate 40150Sstevel@tonic-gate - Make note of the expected extension for the shared libraries and 40160Sstevel@tonic-gate if there is a need for symbolic links from for example libcrypto.so.0 40170Sstevel@tonic-gate to libcrypto.so.0.9.7. There is extended info in Configure for 40180Sstevel@tonic-gate that. 40190Sstevel@tonic-gate 40200Sstevel@tonic-gate - Make as few rebuilds of the shared libraries as possible. 40210Sstevel@tonic-gate 40220Sstevel@tonic-gate - Still avoid linking the OpenSSL programs with the shared libraries. 40230Sstevel@tonic-gate 40240Sstevel@tonic-gate - When installing, install the shared libraries separately from the 40250Sstevel@tonic-gate static ones. 40260Sstevel@tonic-gate [Richard Levitte] 40270Sstevel@tonic-gate 40280Sstevel@tonic-gate *) Fix SSL_CTX_set_read_ahead macro to actually use its argument. 40290Sstevel@tonic-gate 40300Sstevel@tonic-gate Copy SSL_CTX's read_ahead flag to SSL object directly in SSL_new 40310Sstevel@tonic-gate and not in SSL_clear because the latter is also used by the 40320Sstevel@tonic-gate accept/connect functions; previously, the settings made by 40330Sstevel@tonic-gate SSL_set_read_ahead would be lost during the handshake. 40340Sstevel@tonic-gate [Bodo Moeller; problems reported by Anders Gertz <gertz@epact.se>] 40350Sstevel@tonic-gate 40360Sstevel@tonic-gate *) Correct util/mkdef.pl to be selective about disabled algorithms. 40370Sstevel@tonic-gate Previously, it would create entries for disableed algorithms no 40380Sstevel@tonic-gate matter what. 40390Sstevel@tonic-gate [Richard Levitte] 40400Sstevel@tonic-gate 40410Sstevel@tonic-gate *) Added several new manual pages for SSL_* function. 40420Sstevel@tonic-gate [Lutz Jaenicke] 40430Sstevel@tonic-gate 40440Sstevel@tonic-gate Changes between 0.9.5a and 0.9.6 [24 Sep 2000] 40450Sstevel@tonic-gate 40460Sstevel@tonic-gate *) In ssl23_get_client_hello, generate an error message when faced 40470Sstevel@tonic-gate with an initial SSL 3.0/TLS record that is too small to contain the 40480Sstevel@tonic-gate first two bytes of the ClientHello message, i.e. client_version. 40490Sstevel@tonic-gate (Note that this is a pathologic case that probably has never happened 40500Sstevel@tonic-gate in real life.) The previous approach was to use the version number 40510Sstevel@tonic-gate from the record header as a substitute; but our protocol choice 40520Sstevel@tonic-gate should not depend on that one because it is not authenticated 40530Sstevel@tonic-gate by the Finished messages. 40540Sstevel@tonic-gate [Bodo Moeller] 40550Sstevel@tonic-gate 40560Sstevel@tonic-gate *) More robust randomness gathering functions for Windows. 40570Sstevel@tonic-gate [Jeffrey Altman <jaltman@columbia.edu>] 40580Sstevel@tonic-gate 40590Sstevel@tonic-gate *) For compatibility reasons if the flag X509_V_FLAG_ISSUER_CHECK is 40600Sstevel@tonic-gate not set then we don't setup the error code for issuer check errors 40610Sstevel@tonic-gate to avoid possibly overwriting other errors which the callback does 40620Sstevel@tonic-gate handle. If an application does set the flag then we assume it knows 40630Sstevel@tonic-gate what it is doing and can handle the new informational codes 40640Sstevel@tonic-gate appropriately. 40650Sstevel@tonic-gate [Steve Henson] 40660Sstevel@tonic-gate 40670Sstevel@tonic-gate *) Fix for a nasty bug in ASN1_TYPE handling. ASN1_TYPE is used for 40680Sstevel@tonic-gate a general "ANY" type, as such it should be able to decode anything 40690Sstevel@tonic-gate including tagged types. However it didn't check the class so it would 40700Sstevel@tonic-gate wrongly interpret tagged types in the same way as their universal 40710Sstevel@tonic-gate counterpart and unknown types were just rejected. Changed so that the 40720Sstevel@tonic-gate tagged and unknown types are handled in the same way as a SEQUENCE: 40730Sstevel@tonic-gate that is the encoding is stored intact. There is also a new type 40740Sstevel@tonic-gate "V_ASN1_OTHER" which is used when the class is not universal, in this 40750Sstevel@tonic-gate case we have no idea what the actual type is so we just lump them all 40760Sstevel@tonic-gate together. 40770Sstevel@tonic-gate [Steve Henson] 40780Sstevel@tonic-gate 40790Sstevel@tonic-gate *) On VMS, stdout may very well lead to a file that is written to 40800Sstevel@tonic-gate in a record-oriented fashion. That means that every write() will 40810Sstevel@tonic-gate write a separate record, which will be read separately by the 40820Sstevel@tonic-gate programs trying to read from it. This can be very confusing. 40830Sstevel@tonic-gate 40840Sstevel@tonic-gate The solution is to put a BIO filter in the way that will buffer 40850Sstevel@tonic-gate text until a linefeed is reached, and then write everything a 40860Sstevel@tonic-gate line at a time, so every record written will be an actual line, 40870Sstevel@tonic-gate not chunks of lines and not (usually doesn't happen, but I've 40880Sstevel@tonic-gate seen it once) several lines in one record. BIO_f_linebuffer() is 40890Sstevel@tonic-gate the answer. 40900Sstevel@tonic-gate 40910Sstevel@tonic-gate Currently, it's a VMS-only method, because that's where it has 40920Sstevel@tonic-gate been tested well enough. 40930Sstevel@tonic-gate [Richard Levitte] 40940Sstevel@tonic-gate 40950Sstevel@tonic-gate *) Remove 'optimized' squaring variant in BN_mod_mul_montgomery, 40960Sstevel@tonic-gate it can return incorrect results. 40970Sstevel@tonic-gate (Note: The buggy variant was not enabled in OpenSSL 0.9.5a, 40980Sstevel@tonic-gate but it was in 0.9.6-beta[12].) 40990Sstevel@tonic-gate [Bodo Moeller] 41000Sstevel@tonic-gate 41010Sstevel@tonic-gate *) Disable the check for content being present when verifying detached 41020Sstevel@tonic-gate signatures in pk7_smime.c. Some versions of Netscape (wrongly) 41030Sstevel@tonic-gate include zero length content when signing messages. 41040Sstevel@tonic-gate [Steve Henson] 41050Sstevel@tonic-gate 41060Sstevel@tonic-gate *) New BIO_shutdown_wr macro, which invokes the BIO_C_SHUTDOWN_WR 41070Sstevel@tonic-gate BIO_ctrl (for BIO pairs). 41080Sstevel@tonic-gate [Bodo M�ller] 41090Sstevel@tonic-gate 41100Sstevel@tonic-gate *) Add DSO method for VMS. 41110Sstevel@tonic-gate [Richard Levitte] 41120Sstevel@tonic-gate 41130Sstevel@tonic-gate *) Bug fix: Montgomery multiplication could produce results with the 41140Sstevel@tonic-gate wrong sign. 41150Sstevel@tonic-gate [Ulf M�ller] 41160Sstevel@tonic-gate 41170Sstevel@tonic-gate *) Add RPM specification openssl.spec and modify it to build three 41180Sstevel@tonic-gate packages. The default package contains applications, application 41190Sstevel@tonic-gate documentation and run-time libraries. The devel package contains 41200Sstevel@tonic-gate include files, static libraries and function documentation. The 41210Sstevel@tonic-gate doc package contains the contents of the doc directory. The original 41220Sstevel@tonic-gate openssl.spec was provided by Damien Miller <djm@mindrot.org>. 41230Sstevel@tonic-gate [Richard Levitte] 41240Sstevel@tonic-gate 41250Sstevel@tonic-gate *) Add a large number of documentation files for many SSL routines. 41260Sstevel@tonic-gate [Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>] 41270Sstevel@tonic-gate 41280Sstevel@tonic-gate *) Add a configuration entry for Sony News 4. 41290Sstevel@tonic-gate [NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp>] 41300Sstevel@tonic-gate 41310Sstevel@tonic-gate *) Don't set the two most significant bits to one when generating a 41320Sstevel@tonic-gate random number < q in the DSA library. 41330Sstevel@tonic-gate [Ulf M�ller] 41340Sstevel@tonic-gate 41350Sstevel@tonic-gate *) New SSL API mode 'SSL_MODE_AUTO_RETRY'. This disables the default 41360Sstevel@tonic-gate behaviour that SSL_read may result in SSL_ERROR_WANT_READ (even if 41370Sstevel@tonic-gate the underlying transport is blocking) if a handshake took place. 41380Sstevel@tonic-gate (The default behaviour is needed by applications such as s_client 41390Sstevel@tonic-gate and s_server that use select() to determine when to use SSL_read; 41400Sstevel@tonic-gate but for applications that know in advance when to expect data, it 41410Sstevel@tonic-gate just makes things more complicated.) 41420Sstevel@tonic-gate [Bodo Moeller] 41430Sstevel@tonic-gate 41440Sstevel@tonic-gate *) Add RAND_egd_bytes(), which gives control over the number of bytes read 41450Sstevel@tonic-gate from EGD. 41460Sstevel@tonic-gate [Ben Laurie] 41470Sstevel@tonic-gate 41480Sstevel@tonic-gate *) Add a few more EBCDIC conditionals that make `req' and `x509' 41490Sstevel@tonic-gate work better on such systems. 41500Sstevel@tonic-gate [Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>] 41510Sstevel@tonic-gate 41520Sstevel@tonic-gate *) Add two demo programs for PKCS12_parse() and PKCS12_create(). 41530Sstevel@tonic-gate Update PKCS12_parse() so it copies the friendlyName and the 41540Sstevel@tonic-gate keyid to the certificates aux info. 41550Sstevel@tonic-gate [Steve Henson] 41560Sstevel@tonic-gate 41570Sstevel@tonic-gate *) Fix bug in PKCS7_verify() which caused an infinite loop 41580Sstevel@tonic-gate if there was more than one signature. 41590Sstevel@tonic-gate [Sven Uszpelkat <su@celocom.de>] 41600Sstevel@tonic-gate 41610Sstevel@tonic-gate *) Major change in util/mkdef.pl to include extra information 41620Sstevel@tonic-gate about each symbol, as well as presentig variables as well 41630Sstevel@tonic-gate as functions. This change means that there's n more need 41640Sstevel@tonic-gate to rebuild the .num files when some algorithms are excluded. 41650Sstevel@tonic-gate [Richard Levitte] 41660Sstevel@tonic-gate 41670Sstevel@tonic-gate *) Allow the verify time to be set by an application, 41680Sstevel@tonic-gate rather than always using the current time. 41690Sstevel@tonic-gate [Steve Henson] 41700Sstevel@tonic-gate 41710Sstevel@tonic-gate *) Phase 2 verify code reorganisation. The certificate 41720Sstevel@tonic-gate verify code now looks up an issuer certificate by a 41730Sstevel@tonic-gate number of criteria: subject name, authority key id 41740Sstevel@tonic-gate and key usage. It also verifies self signed certificates 41750Sstevel@tonic-gate by the same criteria. The main comparison function is 41760Sstevel@tonic-gate X509_check_issued() which performs these checks. 41770Sstevel@tonic-gate 41780Sstevel@tonic-gate Lot of changes were necessary in order to support this 41790Sstevel@tonic-gate without completely rewriting the lookup code. 41800Sstevel@tonic-gate 41810Sstevel@tonic-gate Authority and subject key identifier are now cached. 41820Sstevel@tonic-gate 41830Sstevel@tonic-gate The LHASH 'certs' is X509_STORE has now been replaced 41840Sstevel@tonic-gate by a STACK_OF(X509_OBJECT). This is mainly because an 41850Sstevel@tonic-gate LHASH can't store or retrieve multiple objects with 41860Sstevel@tonic-gate the same hash value. 41870Sstevel@tonic-gate 41880Sstevel@tonic-gate As a result various functions (which were all internal 41890Sstevel@tonic-gate use only) have changed to handle the new X509_STORE 41900Sstevel@tonic-gate structure. This will break anything that messed round 41910Sstevel@tonic-gate with X509_STORE internally. 41920Sstevel@tonic-gate 41930Sstevel@tonic-gate The functions X509_STORE_add_cert() now checks for an 41940Sstevel@tonic-gate exact match, rather than just subject name. 41950Sstevel@tonic-gate 41960Sstevel@tonic-gate The X509_STORE API doesn't directly support the retrieval 41970Sstevel@tonic-gate of multiple certificates matching a given criteria, however 41980Sstevel@tonic-gate this can be worked round by performing a lookup first 41990Sstevel@tonic-gate (which will fill the cache with candidate certificates) 42000Sstevel@tonic-gate and then examining the cache for matches. This is probably 42010Sstevel@tonic-gate the best we can do without throwing out X509_LOOKUP 42020Sstevel@tonic-gate entirely (maybe later...). 42030Sstevel@tonic-gate 42040Sstevel@tonic-gate The X509_VERIFY_CTX structure has been enhanced considerably. 42050Sstevel@tonic-gate 42060Sstevel@tonic-gate All certificate lookup operations now go via a get_issuer() 42070Sstevel@tonic-gate callback. Although this currently uses an X509_STORE it 42080Sstevel@tonic-gate can be replaced by custom lookups. This is a simple way 42090Sstevel@tonic-gate to bypass the X509_STORE hackery necessary to make this 42100Sstevel@tonic-gate work and makes it possible to use more efficient techniques 42110Sstevel@tonic-gate in future. A very simple version which uses a simple 42120Sstevel@tonic-gate STACK for its trusted certificate store is also provided 42130Sstevel@tonic-gate using X509_STORE_CTX_trusted_stack(). 42140Sstevel@tonic-gate 42150Sstevel@tonic-gate The verify_cb() and verify() callbacks now have equivalents 42160Sstevel@tonic-gate in the X509_STORE_CTX structure. 42170Sstevel@tonic-gate 42180Sstevel@tonic-gate X509_STORE_CTX also has a 'flags' field which can be used 42190Sstevel@tonic-gate to customise the verify behaviour. 42200Sstevel@tonic-gate [Steve Henson] 42210Sstevel@tonic-gate 42220Sstevel@tonic-gate *) Add new PKCS#7 signing option PKCS7_NOSMIMECAP which 42230Sstevel@tonic-gate excludes S/MIME capabilities. 42240Sstevel@tonic-gate [Steve Henson] 42250Sstevel@tonic-gate 42260Sstevel@tonic-gate *) When a certificate request is read in keep a copy of the 42270Sstevel@tonic-gate original encoding of the signed data and use it when outputing 42280Sstevel@tonic-gate again. Signatures then use the original encoding rather than 42290Sstevel@tonic-gate a decoded, encoded version which may cause problems if the 42300Sstevel@tonic-gate request is improperly encoded. 42310Sstevel@tonic-gate [Steve Henson] 42320Sstevel@tonic-gate 42330Sstevel@tonic-gate *) For consistency with other BIO_puts implementations, call 42340Sstevel@tonic-gate buffer_write(b, ...) directly in buffer_puts instead of calling 42350Sstevel@tonic-gate BIO_write(b, ...). 42360Sstevel@tonic-gate 42370Sstevel@tonic-gate In BIO_puts, increment b->num_write as in BIO_write. 42380Sstevel@tonic-gate [Peter.Sylvester@EdelWeb.fr] 42390Sstevel@tonic-gate 42400Sstevel@tonic-gate *) Fix BN_mul_word for the case where the word is 0. (We have to use 42410Sstevel@tonic-gate BN_zero, we may not return a BIGNUM with an array consisting of 42420Sstevel@tonic-gate words set to zero.) 42430Sstevel@tonic-gate [Bodo Moeller] 42440Sstevel@tonic-gate 42450Sstevel@tonic-gate *) Avoid calling abort() from within the library when problems are 42460Sstevel@tonic-gate detected, except if preprocessor symbols have been defined 42470Sstevel@tonic-gate (such as REF_CHECK, BN_DEBUG etc.). 42480Sstevel@tonic-gate [Bodo Moeller] 42490Sstevel@tonic-gate 42500Sstevel@tonic-gate *) New openssl application 'rsautl'. This utility can be 42510Sstevel@tonic-gate used for low level RSA operations. DER public key 42520Sstevel@tonic-gate BIO/fp routines also added. 42530Sstevel@tonic-gate [Steve Henson] 42540Sstevel@tonic-gate 42550Sstevel@tonic-gate *) New Configure entry and patches for compiling on QNX 4. 42560Sstevel@tonic-gate [Andreas Schneider <andreas@ds3.etech.fh-hamburg.de>] 42570Sstevel@tonic-gate 42580Sstevel@tonic-gate *) A demo state-machine implementation was sponsored by 42590Sstevel@tonic-gate Nuron (http://www.nuron.com/) and is now available in 42600Sstevel@tonic-gate demos/state_machine. 42610Sstevel@tonic-gate [Ben Laurie] 42620Sstevel@tonic-gate 42630Sstevel@tonic-gate *) New options added to the 'dgst' utility for signature 42640Sstevel@tonic-gate generation and verification. 42650Sstevel@tonic-gate [Steve Henson] 42660Sstevel@tonic-gate 42670Sstevel@tonic-gate *) Unrecognized PKCS#7 content types are now handled via a 42680Sstevel@tonic-gate catch all ASN1_TYPE structure. This allows unsupported 42690Sstevel@tonic-gate types to be stored as a "blob" and an application can 42700Sstevel@tonic-gate encode and decode it manually. 42710Sstevel@tonic-gate [Steve Henson] 42720Sstevel@tonic-gate 42730Sstevel@tonic-gate *) Fix various signed/unsigned issues to make a_strex.c 42740Sstevel@tonic-gate compile under VC++. 42750Sstevel@tonic-gate [Oscar Jacobsson <oscar.jacobsson@celocom.com>] 42760Sstevel@tonic-gate 42770Sstevel@tonic-gate *) ASN1 fixes. i2d_ASN1_OBJECT was not returning the correct 42780Sstevel@tonic-gate length if passed a buffer. ASN1_INTEGER_to_BN failed 42790Sstevel@tonic-gate if passed a NULL BN and its argument was negative. 42800Sstevel@tonic-gate [Steve Henson, pointed out by Sven Heiberg <sven@tartu.cyber.ee>] 42810Sstevel@tonic-gate 42820Sstevel@tonic-gate *) Modification to PKCS#7 encoding routines to output definite 42830Sstevel@tonic-gate length encoding. Since currently the whole structures are in 42840Sstevel@tonic-gate memory there's not real point in using indefinite length 42850Sstevel@tonic-gate constructed encoding. However if OpenSSL is compiled with 42860Sstevel@tonic-gate the flag PKCS7_INDEFINITE_ENCODING the old form is used. 42870Sstevel@tonic-gate [Steve Henson] 42880Sstevel@tonic-gate 42890Sstevel@tonic-gate *) Added BIO_vprintf() and BIO_vsnprintf(). 42900Sstevel@tonic-gate [Richard Levitte] 42910Sstevel@tonic-gate 42920Sstevel@tonic-gate *) Added more prefixes to parse for in the the strings written 42930Sstevel@tonic-gate through a logging bio, to cover all the levels that are available 42940Sstevel@tonic-gate through syslog. The prefixes are now: 42950Sstevel@tonic-gate 42960Sstevel@tonic-gate PANIC, EMERG, EMR => LOG_EMERG 42970Sstevel@tonic-gate ALERT, ALR => LOG_ALERT 42980Sstevel@tonic-gate CRIT, CRI => LOG_CRIT 42990Sstevel@tonic-gate ERROR, ERR => LOG_ERR 43000Sstevel@tonic-gate WARNING, WARN, WAR => LOG_WARNING 43010Sstevel@tonic-gate NOTICE, NOTE, NOT => LOG_NOTICE 43020Sstevel@tonic-gate INFO, INF => LOG_INFO 43030Sstevel@tonic-gate DEBUG, DBG => LOG_DEBUG 43040Sstevel@tonic-gate 43050Sstevel@tonic-gate and as before, if none of those prefixes are present at the 43060Sstevel@tonic-gate beginning of the string, LOG_ERR is chosen. 43070Sstevel@tonic-gate 43080Sstevel@tonic-gate On Win32, the LOG_* levels are mapped according to this: 43090Sstevel@tonic-gate 43100Sstevel@tonic-gate LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR => EVENTLOG_ERROR_TYPE 43110Sstevel@tonic-gate LOG_WARNING => EVENTLOG_WARNING_TYPE 43120Sstevel@tonic-gate LOG_NOTICE, LOG_INFO, LOG_DEBUG => EVENTLOG_INFORMATION_TYPE 43130Sstevel@tonic-gate 43140Sstevel@tonic-gate [Richard Levitte] 43150Sstevel@tonic-gate 43160Sstevel@tonic-gate *) Made it possible to reconfigure with just the configuration 43170Sstevel@tonic-gate argument "reconf" or "reconfigure". The command line arguments 43180Sstevel@tonic-gate are stored in Makefile.ssl in the variable CONFIGURE_ARGS, 43190Sstevel@tonic-gate and are retrieved from there when reconfiguring. 43200Sstevel@tonic-gate [Richard Levitte] 43210Sstevel@tonic-gate 43220Sstevel@tonic-gate *) MD4 implemented. 43230Sstevel@tonic-gate [Assar Westerlund <assar@sics.se>, Richard Levitte] 43240Sstevel@tonic-gate 43250Sstevel@tonic-gate *) Add the arguments -CAfile and -CApath to the pkcs12 utility. 43260Sstevel@tonic-gate [Richard Levitte] 43270Sstevel@tonic-gate 43280Sstevel@tonic-gate *) The obj_dat.pl script was messing up the sorting of object 43290Sstevel@tonic-gate names. The reason was that it compared the quoted version 43300Sstevel@tonic-gate of strings as a result "OCSP" > "OCSP Signing" because 43310Sstevel@tonic-gate " > SPACE. Changed script to store unquoted versions of 43320Sstevel@tonic-gate names and add quotes on output. It was also omitting some 43330Sstevel@tonic-gate names from the lookup table if they were given a default 43340Sstevel@tonic-gate value (that is if SN is missing it is given the same 43350Sstevel@tonic-gate value as LN and vice versa), these are now added on the 43360Sstevel@tonic-gate grounds that if an object has a name we should be able to 43370Sstevel@tonic-gate look it up. Finally added warning output when duplicate 43380Sstevel@tonic-gate short or long names are found. 43390Sstevel@tonic-gate [Steve Henson] 43400Sstevel@tonic-gate 43410Sstevel@tonic-gate *) Changes needed for Tandem NSK. 43420Sstevel@tonic-gate [Scott Uroff <scott@xypro.com>] 43430Sstevel@tonic-gate 43440Sstevel@tonic-gate *) Fix SSL 2.0 rollback checking: Due to an off-by-one error in 43450Sstevel@tonic-gate RSA_padding_check_SSLv23(), special padding was never detected 43460Sstevel@tonic-gate and thus the SSL 3.0/TLS 1.0 countermeasure against protocol 43470Sstevel@tonic-gate version rollback attacks was not effective. 43480Sstevel@tonic-gate 43490Sstevel@tonic-gate In s23_clnt.c, don't use special rollback-attack detection padding 43500Sstevel@tonic-gate (RSA_SSLV23_PADDING) if SSL 2.0 is the only protocol enabled in the 43510Sstevel@tonic-gate client; similarly, in s23_srvr.c, don't do the rollback check if 43520Sstevel@tonic-gate SSL 2.0 is the only protocol enabled in the server. 43530Sstevel@tonic-gate [Bodo Moeller] 43540Sstevel@tonic-gate 43550Sstevel@tonic-gate *) Make it possible to get hexdumps of unprintable data with 'openssl 43560Sstevel@tonic-gate asn1parse'. By implication, the functions ASN1_parse_dump() and 43570Sstevel@tonic-gate BIO_dump_indent() are added. 43580Sstevel@tonic-gate [Richard Levitte] 43590Sstevel@tonic-gate 43600Sstevel@tonic-gate *) New functions ASN1_STRING_print_ex() and X509_NAME_print_ex() 43610Sstevel@tonic-gate these print out strings and name structures based on various 43620Sstevel@tonic-gate flags including RFC2253 support and proper handling of 43630Sstevel@tonic-gate multibyte characters. Added options to the 'x509' utility 43640Sstevel@tonic-gate to allow the various flags to be set. 43650Sstevel@tonic-gate [Steve Henson] 43660Sstevel@tonic-gate 43670Sstevel@tonic-gate *) Various fixes to use ASN1_TIME instead of ASN1_UTCTIME. 43680Sstevel@tonic-gate Also change the functions X509_cmp_current_time() and 43690Sstevel@tonic-gate X509_gmtime_adj() work with an ASN1_TIME structure, 43700Sstevel@tonic-gate this will enable certificates using GeneralizedTime in validity 43710Sstevel@tonic-gate dates to be checked. 43720Sstevel@tonic-gate [Steve Henson] 43730Sstevel@tonic-gate 43740Sstevel@tonic-gate *) Make the NEG_PUBKEY_BUG code (which tolerates invalid 43750Sstevel@tonic-gate negative public key encodings) on by default, 43760Sstevel@tonic-gate NO_NEG_PUBKEY_BUG can be set to disable it. 43770Sstevel@tonic-gate [Steve Henson] 43780Sstevel@tonic-gate 43790Sstevel@tonic-gate *) New function c2i_ASN1_OBJECT() which acts on ASN1_OBJECT 43800Sstevel@tonic-gate content octets. An i2c_ASN1_OBJECT is unnecessary because 43810Sstevel@tonic-gate the encoding can be trivially obtained from the structure. 43820Sstevel@tonic-gate [Steve Henson] 43830Sstevel@tonic-gate 43840Sstevel@tonic-gate *) crypto/err.c locking bugfix: Use write locks (CRYPTO_w_[un]lock), 43850Sstevel@tonic-gate not read locks (CRYPTO_r_[un]lock). 43860Sstevel@tonic-gate [Bodo Moeller] 43870Sstevel@tonic-gate 43880Sstevel@tonic-gate *) A first attempt at creating official support for shared 43890Sstevel@tonic-gate libraries through configuration. I've kept it so the 43900Sstevel@tonic-gate default is static libraries only, and the OpenSSL programs 43910Sstevel@tonic-gate are always statically linked for now, but there are 43920Sstevel@tonic-gate preparations for dynamic linking in place. 43930Sstevel@tonic-gate This has been tested on Linux and Tru64. 43940Sstevel@tonic-gate [Richard Levitte] 43950Sstevel@tonic-gate 43960Sstevel@tonic-gate *) Randomness polling function for Win9x, as described in: 43970Sstevel@tonic-gate Peter Gutmann, Software Generation of Practically Strong 43980Sstevel@tonic-gate Random Numbers. 43990Sstevel@tonic-gate [Ulf M�ller] 44000Sstevel@tonic-gate 44010Sstevel@tonic-gate *) Fix so PRNG is seeded in req if using an already existing 44020Sstevel@tonic-gate DSA key. 44030Sstevel@tonic-gate [Steve Henson] 44040Sstevel@tonic-gate 44050Sstevel@tonic-gate *) New options to smime application. -inform and -outform 44060Sstevel@tonic-gate allow alternative formats for the S/MIME message including 44070Sstevel@tonic-gate PEM and DER. The -content option allows the content to be 44080Sstevel@tonic-gate specified separately. This should allow things like Netscape 44090Sstevel@tonic-gate form signing output easier to verify. 44100Sstevel@tonic-gate [Steve Henson] 44110Sstevel@tonic-gate 44120Sstevel@tonic-gate *) Fix the ASN1 encoding of tags using the 'long form'. 44130Sstevel@tonic-gate [Steve Henson] 44140Sstevel@tonic-gate 44150Sstevel@tonic-gate *) New ASN1 functions, i2c_* and c2i_* for INTEGER and BIT 44160Sstevel@tonic-gate STRING types. These convert content octets to and from the 44170Sstevel@tonic-gate underlying type. The actual tag and length octets are 44180Sstevel@tonic-gate already assumed to have been read in and checked. These 44190Sstevel@tonic-gate are needed because all other string types have virtually 44200Sstevel@tonic-gate identical handling apart from the tag. By having versions 44210Sstevel@tonic-gate of the ASN1 functions that just operate on content octets 44220Sstevel@tonic-gate IMPLICIT tagging can be handled properly. It also allows 44230Sstevel@tonic-gate the ASN1_ENUMERATED code to be cut down because ASN1_ENUMERATED 44240Sstevel@tonic-gate and ASN1_INTEGER are identical apart from the tag. 44250Sstevel@tonic-gate [Steve Henson] 44260Sstevel@tonic-gate 44270Sstevel@tonic-gate *) Change the handling of OID objects as follows: 44280Sstevel@tonic-gate 44290Sstevel@tonic-gate - New object identifiers are inserted in objects.txt, following 44300Sstevel@tonic-gate the syntax given in objects.README. 44310Sstevel@tonic-gate - objects.pl is used to process obj_mac.num and create a new 44320Sstevel@tonic-gate obj_mac.h. 44330Sstevel@tonic-gate - obj_dat.pl is used to create a new obj_dat.h, using the data in 44340Sstevel@tonic-gate obj_mac.h. 44350Sstevel@tonic-gate 44360Sstevel@tonic-gate This is currently kind of a hack, and the perl code in objects.pl 44370Sstevel@tonic-gate isn't very elegant, but it works as I intended. The simplest way 44380Sstevel@tonic-gate to check that it worked correctly is to look in obj_dat.h and 44390Sstevel@tonic-gate check the array nid_objs and make sure the objects haven't moved 44400Sstevel@tonic-gate around (this is important!). Additions are OK, as well as 44410Sstevel@tonic-gate consistent name changes. 44420Sstevel@tonic-gate [Richard Levitte] 44430Sstevel@tonic-gate 44440Sstevel@tonic-gate *) Add BSD-style MD5-based passwords to 'openssl passwd' (option '-1'). 44450Sstevel@tonic-gate [Bodo Moeller] 44460Sstevel@tonic-gate 44470Sstevel@tonic-gate *) Addition of the command line parameter '-rand file' to 'openssl req'. 44480Sstevel@tonic-gate The given file adds to whatever has already been seeded into the 44490Sstevel@tonic-gate random pool through the RANDFILE configuration file option or 44500Sstevel@tonic-gate environment variable, or the default random state file. 44510Sstevel@tonic-gate [Richard Levitte] 44520Sstevel@tonic-gate 44530Sstevel@tonic-gate *) mkstack.pl now sorts each macro group into lexical order. 44540Sstevel@tonic-gate Previously the output order depended on the order the files 44550Sstevel@tonic-gate appeared in the directory, resulting in needless rewriting 44560Sstevel@tonic-gate of safestack.h . 44570Sstevel@tonic-gate [Steve Henson] 44580Sstevel@tonic-gate 44590Sstevel@tonic-gate *) Patches to make OpenSSL compile under Win32 again. Mostly 44600Sstevel@tonic-gate work arounds for the VC++ problem that it treats func() as 44610Sstevel@tonic-gate func(void). Also stripped out the parts of mkdef.pl that 44620Sstevel@tonic-gate added extra typesafe functions: these no longer exist. 44630Sstevel@tonic-gate [Steve Henson] 44640Sstevel@tonic-gate 44650Sstevel@tonic-gate *) Reorganisation of the stack code. The macros are now all 44660Sstevel@tonic-gate collected in safestack.h . Each macro is defined in terms of 44670Sstevel@tonic-gate a "stack macro" of the form SKM_<name>(type, a, b). The 44680Sstevel@tonic-gate DEBUG_SAFESTACK is now handled in terms of function casts, 44690Sstevel@tonic-gate this has the advantage of retaining type safety without the 44700Sstevel@tonic-gate use of additional functions. If DEBUG_SAFESTACK is not defined 44710Sstevel@tonic-gate then the non typesafe macros are used instead. Also modified the 44720Sstevel@tonic-gate mkstack.pl script to handle the new form. Needs testing to see 44730Sstevel@tonic-gate if which (if any) compilers it chokes and maybe make DEBUG_SAFESTACK 44740Sstevel@tonic-gate the default if no major problems. Similar behaviour for ASN1_SET_OF 44750Sstevel@tonic-gate and PKCS12_STACK_OF. 44760Sstevel@tonic-gate [Steve Henson] 44770Sstevel@tonic-gate 44780Sstevel@tonic-gate *) When some versions of IIS use the 'NET' form of private key the 44790Sstevel@tonic-gate key derivation algorithm is different. Normally MD5(password) is 44800Sstevel@tonic-gate used as a 128 bit RC4 key. In the modified case 44810Sstevel@tonic-gate MD5(MD5(password) + "SGCKEYSALT") is used insted. Added some 44820Sstevel@tonic-gate new functions i2d_RSA_NET(), d2i_RSA_NET() etc which are the same 44830Sstevel@tonic-gate as the old Netscape_RSA functions except they have an additional 44840Sstevel@tonic-gate 'sgckey' parameter which uses the modified algorithm. Also added 44850Sstevel@tonic-gate an -sgckey command line option to the rsa utility. Thanks to 44860Sstevel@tonic-gate Adrian Peck <bertie@ncipher.com> for posting details of the modified 44870Sstevel@tonic-gate algorithm to openssl-dev. 44880Sstevel@tonic-gate [Steve Henson] 44890Sstevel@tonic-gate 44900Sstevel@tonic-gate *) The evp_local.h macros were using 'c.##kname' which resulted in 44910Sstevel@tonic-gate invalid expansion on some systems (SCO 5.0.5 for example). 44920Sstevel@tonic-gate Corrected to 'c.kname'. 44930Sstevel@tonic-gate [Phillip Porch <root@theporch.com>] 44940Sstevel@tonic-gate 44950Sstevel@tonic-gate *) New X509_get1_email() and X509_REQ_get1_email() functions that return 44960Sstevel@tonic-gate a STACK of email addresses from a certificate or request, these look 44970Sstevel@tonic-gate in the subject name and the subject alternative name extensions and 44980Sstevel@tonic-gate omit any duplicate addresses. 44990Sstevel@tonic-gate [Steve Henson] 45000Sstevel@tonic-gate 45010Sstevel@tonic-gate *) Re-implement BN_mod_exp2_mont using independent (and larger) windows. 45020Sstevel@tonic-gate This makes DSA verification about 2 % faster. 45030Sstevel@tonic-gate [Bodo Moeller] 45040Sstevel@tonic-gate 45050Sstevel@tonic-gate *) Increase maximum window size in BN_mod_exp_... to 6 bits instead of 5 45060Sstevel@tonic-gate (meaning that now 2^5 values will be precomputed, which is only 4 KB 45070Sstevel@tonic-gate plus overhead for 1024 bit moduli). 45080Sstevel@tonic-gate This makes exponentiations about 0.5 % faster for 1024 bit 45090Sstevel@tonic-gate exponents (as measured by "openssl speed rsa2048"). 45100Sstevel@tonic-gate [Bodo Moeller] 45110Sstevel@tonic-gate 45120Sstevel@tonic-gate *) Rename memory handling macros to avoid conflicts with other 45130Sstevel@tonic-gate software: 45140Sstevel@tonic-gate Malloc => OPENSSL_malloc 45150Sstevel@tonic-gate Malloc_locked => OPENSSL_malloc_locked 45160Sstevel@tonic-gate Realloc => OPENSSL_realloc 45170Sstevel@tonic-gate Free => OPENSSL_free 45180Sstevel@tonic-gate [Richard Levitte] 45190Sstevel@tonic-gate 45200Sstevel@tonic-gate *) New function BN_mod_exp_mont_word for small bases (roughly 15% 45210Sstevel@tonic-gate faster than BN_mod_exp_mont, i.e. 7% for a full DH exchange). 45220Sstevel@tonic-gate [Bodo Moeller] 45230Sstevel@tonic-gate 45240Sstevel@tonic-gate *) CygWin32 support. 45250Sstevel@tonic-gate [John Jarvie <jjarvie@newsguy.com>] 45260Sstevel@tonic-gate 45270Sstevel@tonic-gate *) The type-safe stack code has been rejigged. It is now only compiled 45280Sstevel@tonic-gate in when OpenSSL is configured with the DEBUG_SAFESTACK option and 45290Sstevel@tonic-gate by default all type-specific stack functions are "#define"d back to 45300Sstevel@tonic-gate standard stack functions. This results in more streamlined output 45310Sstevel@tonic-gate but retains the type-safety checking possibilities of the original 45320Sstevel@tonic-gate approach. 45330Sstevel@tonic-gate [Geoff Thorpe] 45340Sstevel@tonic-gate 45350Sstevel@tonic-gate *) The STACK code has been cleaned up, and certain type declarations 45360Sstevel@tonic-gate that didn't make a lot of sense have been brought in line. This has 45370Sstevel@tonic-gate also involved a cleanup of sorts in safestack.h to more correctly 45380Sstevel@tonic-gate map type-safe stack functions onto their plain stack counterparts. 45390Sstevel@tonic-gate This work has also resulted in a variety of "const"ifications of 45400Sstevel@tonic-gate lots of the code, especially "_cmp" operations which should normally 45410Sstevel@tonic-gate be prototyped with "const" parameters anyway. 45420Sstevel@tonic-gate [Geoff Thorpe] 45430Sstevel@tonic-gate 45440Sstevel@tonic-gate *) When generating bytes for the first time in md_rand.c, 'stir the pool' 45450Sstevel@tonic-gate by seeding with STATE_SIZE dummy bytes (with zero entropy count). 45460Sstevel@tonic-gate (The PRNG state consists of two parts, the large pool 'state' and 'md', 45470Sstevel@tonic-gate where all of 'md' is used each time the PRNG is used, but 'state' 45480Sstevel@tonic-gate is used only indexed by a cyclic counter. As entropy may not be 45490Sstevel@tonic-gate well distributed from the beginning, 'md' is important as a 45500Sstevel@tonic-gate chaining variable. However, the output function chains only half 45510Sstevel@tonic-gate of 'md', i.e. 80 bits. ssleay_rand_add, on the other hand, chains 45520Sstevel@tonic-gate all of 'md', and seeding with STATE_SIZE dummy bytes will result 45530Sstevel@tonic-gate in all of 'state' being rewritten, with the new values depending 45540Sstevel@tonic-gate on virtually all of 'md'. This overcomes the 80 bit limitation.) 45550Sstevel@tonic-gate [Bodo Moeller] 45560Sstevel@tonic-gate 45570Sstevel@tonic-gate *) In ssl/s2_clnt.c and ssl/s3_clnt.c, call ERR_clear_error() when 45580Sstevel@tonic-gate the handshake is continued after ssl_verify_cert_chain(); 45590Sstevel@tonic-gate otherwise, if SSL_VERIFY_NONE is set, remaining error codes 45600Sstevel@tonic-gate can lead to 'unexplainable' connection aborts later. 45610Sstevel@tonic-gate [Bodo Moeller; problem tracked down by Lutz Jaenicke] 45620Sstevel@tonic-gate 45630Sstevel@tonic-gate *) Major EVP API cipher revision. 45640Sstevel@tonic-gate Add hooks for extra EVP features. This allows various cipher 45650Sstevel@tonic-gate parameters to be set in the EVP interface. Support added for variable 45660Sstevel@tonic-gate key length ciphers via the EVP_CIPHER_CTX_set_key_length() function and 45670Sstevel@tonic-gate setting of RC2 and RC5 parameters. 45680Sstevel@tonic-gate 45690Sstevel@tonic-gate Modify EVP_OpenInit() and EVP_SealInit() to cope with variable key length 45700Sstevel@tonic-gate ciphers. 45710Sstevel@tonic-gate 45720Sstevel@tonic-gate Remove lots of duplicated code from the EVP library. For example *every* 45730Sstevel@tonic-gate cipher init() function handles the 'iv' in the same way according to the 45740Sstevel@tonic-gate cipher mode. They also all do nothing if the 'key' parameter is NULL and 45750Sstevel@tonic-gate for CFB and OFB modes they zero ctx->num. 45760Sstevel@tonic-gate 45770Sstevel@tonic-gate New functionality allows removal of S/MIME code RC2 hack. 45780Sstevel@tonic-gate 45790Sstevel@tonic-gate Most of the routines have the same form and so can be declared in terms 45800Sstevel@tonic-gate of macros. 45810Sstevel@tonic-gate 45820Sstevel@tonic-gate By shifting this to the top level EVP_CipherInit() it can be removed from 45830Sstevel@tonic-gate all individual ciphers. If the cipher wants to handle IVs or keys 45840Sstevel@tonic-gate differently it can set the EVP_CIPH_CUSTOM_IV or EVP_CIPH_ALWAYS_CALL_INIT 45850Sstevel@tonic-gate flags. 45860Sstevel@tonic-gate 45870Sstevel@tonic-gate Change lots of functions like EVP_EncryptUpdate() to now return a 45880Sstevel@tonic-gate value: although software versions of the algorithms cannot fail 45890Sstevel@tonic-gate any installed hardware versions can. 45900Sstevel@tonic-gate [Steve Henson] 45910Sstevel@tonic-gate 45920Sstevel@tonic-gate *) Implement SSL_OP_TLS_ROLLBACK_BUG: In ssl3_get_client_key_exchange, if 45930Sstevel@tonic-gate this option is set, tolerate broken clients that send the negotiated 45940Sstevel@tonic-gate protocol version number instead of the requested protocol version 45950Sstevel@tonic-gate number. 45960Sstevel@tonic-gate [Bodo Moeller] 45970Sstevel@tonic-gate 45980Sstevel@tonic-gate *) Call dh_tmp_cb (set by ..._TMP_DH_CB) with correct 'is_export' flag; 45990Sstevel@tonic-gate i.e. non-zero for export ciphersuites, zero otherwise. 46000Sstevel@tonic-gate Previous versions had this flag inverted, inconsistent with 46010Sstevel@tonic-gate rsa_tmp_cb (..._TMP_RSA_CB). 46020Sstevel@tonic-gate [Bodo Moeller; problem reported by Amit Chopra] 46030Sstevel@tonic-gate 46040Sstevel@tonic-gate *) Add missing DSA library text string. Work around for some IIS 46050Sstevel@tonic-gate key files with invalid SEQUENCE encoding. 46060Sstevel@tonic-gate [Steve Henson] 46070Sstevel@tonic-gate 46080Sstevel@tonic-gate *) Add a document (doc/standards.txt) that list all kinds of standards 46090Sstevel@tonic-gate and so on that are implemented in OpenSSL. 46100Sstevel@tonic-gate [Richard Levitte] 46110Sstevel@tonic-gate 46120Sstevel@tonic-gate *) Enhance c_rehash script. Old version would mishandle certificates 46130Sstevel@tonic-gate with the same subject name hash and wouldn't handle CRLs at all. 46140Sstevel@tonic-gate Added -fingerprint option to crl utility, to support new c_rehash 46150Sstevel@tonic-gate features. 46160Sstevel@tonic-gate [Steve Henson] 46170Sstevel@tonic-gate 46180Sstevel@tonic-gate *) Eliminate non-ANSI declarations in crypto.h and stack.h. 46190Sstevel@tonic-gate [Ulf M�ller] 46200Sstevel@tonic-gate 46210Sstevel@tonic-gate *) Fix for SSL server purpose checking. Server checking was 46220Sstevel@tonic-gate rejecting certificates which had extended key usage present 46230Sstevel@tonic-gate but no ssl client purpose. 46240Sstevel@tonic-gate [Steve Henson, reported by Rene Grosser <grosser@hisolutions.com>] 46250Sstevel@tonic-gate 46260Sstevel@tonic-gate *) Make PKCS#12 code work with no password. The PKCS#12 spec 46270Sstevel@tonic-gate is a little unclear about how a blank password is handled. 46280Sstevel@tonic-gate Since the password in encoded as a BMPString with terminating 46290Sstevel@tonic-gate double NULL a zero length password would end up as just the 46300Sstevel@tonic-gate double NULL. However no password at all is different and is 46310Sstevel@tonic-gate handled differently in the PKCS#12 key generation code. NS 46320Sstevel@tonic-gate treats a blank password as zero length. MSIE treats it as no 46330Sstevel@tonic-gate password on export: but it will try both on import. We now do 46340Sstevel@tonic-gate the same: PKCS12_parse() tries zero length and no password if 46350Sstevel@tonic-gate the password is set to "" or NULL (NULL is now a valid password: 46360Sstevel@tonic-gate it wasn't before) as does the pkcs12 application. 46370Sstevel@tonic-gate [Steve Henson] 46380Sstevel@tonic-gate 46390Sstevel@tonic-gate *) Bugfixes in apps/x509.c: Avoid a memory leak; and don't use 46400Sstevel@tonic-gate perror when PEM_read_bio_X509_REQ fails, the error message must 46410Sstevel@tonic-gate be obtained from the error queue. 46420Sstevel@tonic-gate [Bodo Moeller] 46430Sstevel@tonic-gate 46440Sstevel@tonic-gate *) Avoid 'thread_hash' memory leak in crypto/err/err.c by freeing 46450Sstevel@tonic-gate it in ERR_remove_state if appropriate, and change ERR_get_state 46460Sstevel@tonic-gate accordingly to avoid race conditions (this is necessary because 46470Sstevel@tonic-gate thread_hash is no longer constant once set). 46480Sstevel@tonic-gate [Bodo Moeller] 46490Sstevel@tonic-gate 46500Sstevel@tonic-gate *) Bugfix for linux-elf makefile.one. 46510Sstevel@tonic-gate [Ulf M�ller] 46520Sstevel@tonic-gate 46530Sstevel@tonic-gate *) RSA_get_default_method() will now cause a default 46540Sstevel@tonic-gate RSA_METHOD to be chosen if one doesn't exist already. 46550Sstevel@tonic-gate Previously this was only set during a call to RSA_new() 46560Sstevel@tonic-gate or RSA_new_method(NULL) meaning it was possible for 46570Sstevel@tonic-gate RSA_get_default_method() to return NULL. 46580Sstevel@tonic-gate [Geoff Thorpe] 46590Sstevel@tonic-gate 46600Sstevel@tonic-gate *) Added native name translation to the existing DSO code 46610Sstevel@tonic-gate that will convert (if the flag to do so is set) filenames 46620Sstevel@tonic-gate that are sufficiently small and have no path information 46630Sstevel@tonic-gate into a canonical native form. Eg. "blah" converted to 46640Sstevel@tonic-gate "libblah.so" or "blah.dll" etc. 46650Sstevel@tonic-gate [Geoff Thorpe] 46660Sstevel@tonic-gate 46670Sstevel@tonic-gate *) New function ERR_error_string_n(e, buf, len) which is like 46680Sstevel@tonic-gate ERR_error_string(e, buf), but writes at most 'len' bytes 46690Sstevel@tonic-gate including the 0 terminator. For ERR_error_string_n, 'buf' 46700Sstevel@tonic-gate may not be NULL. 46710Sstevel@tonic-gate [Damien Miller <djm@mindrot.org>, Bodo Moeller] 46720Sstevel@tonic-gate 46730Sstevel@tonic-gate *) CONF library reworked to become more general. A new CONF 46740Sstevel@tonic-gate configuration file reader "class" is implemented as well as a 46750Sstevel@tonic-gate new functions (NCONF_*, for "New CONF") to handle it. The now 46760Sstevel@tonic-gate old CONF_* functions are still there, but are reimplemented to 46770Sstevel@tonic-gate work in terms of the new functions. Also, a set of functions 46780Sstevel@tonic-gate to handle the internal storage of the configuration data is 46790Sstevel@tonic-gate provided to make it easier to write new configuration file 46800Sstevel@tonic-gate reader "classes" (I can definitely see something reading a 46810Sstevel@tonic-gate configuration file in XML format, for example), called _CONF_*, 46820Sstevel@tonic-gate or "the configuration storage API"... 46830Sstevel@tonic-gate 46840Sstevel@tonic-gate The new configuration file reading functions are: 46850Sstevel@tonic-gate 46860Sstevel@tonic-gate NCONF_new, NCONF_free, NCONF_load, NCONF_load_fp, NCONF_load_bio, 46870Sstevel@tonic-gate NCONF_get_section, NCONF_get_string, NCONF_get_numbre 46880Sstevel@tonic-gate 46890Sstevel@tonic-gate NCONF_default, NCONF_WIN32 46900Sstevel@tonic-gate 46910Sstevel@tonic-gate NCONF_dump_fp, NCONF_dump_bio 46920Sstevel@tonic-gate 46930Sstevel@tonic-gate NCONF_default and NCONF_WIN32 are method (or "class") choosers, 46940Sstevel@tonic-gate NCONF_new creates a new CONF object. This works in the same way 46950Sstevel@tonic-gate as other interfaces in OpenSSL, like the BIO interface. 46960Sstevel@tonic-gate NCONF_dump_* dump the internal storage of the configuration file, 46970Sstevel@tonic-gate which is useful for debugging. All other functions take the same 46980Sstevel@tonic-gate arguments as the old CONF_* functions wth the exception of the 46990Sstevel@tonic-gate first that must be a `CONF *' instead of a `LHASH *'. 47000Sstevel@tonic-gate 47010Sstevel@tonic-gate To make it easer to use the new classes with the old CONF_* functions, 47020Sstevel@tonic-gate the function CONF_set_default_method is provided. 47030Sstevel@tonic-gate [Richard Levitte] 47040Sstevel@tonic-gate 47050Sstevel@tonic-gate *) Add '-tls1' option to 'openssl ciphers', which was already 47060Sstevel@tonic-gate mentioned in the documentation but had not been implemented. 47070Sstevel@tonic-gate (This option is not yet really useful because even the additional 47080Sstevel@tonic-gate experimental TLS 1.0 ciphers are currently treated as SSL 3.0 ciphers.) 47090Sstevel@tonic-gate [Bodo Moeller] 47100Sstevel@tonic-gate 47110Sstevel@tonic-gate *) Initial DSO code added into libcrypto for letting OpenSSL (and 47120Sstevel@tonic-gate OpenSSL-based applications) load shared libraries and bind to 47130Sstevel@tonic-gate them in a portable way. 47140Sstevel@tonic-gate [Geoff Thorpe, with contributions from Richard Levitte] 47150Sstevel@tonic-gate 47160Sstevel@tonic-gate Changes between 0.9.5 and 0.9.5a [1 Apr 2000] 47170Sstevel@tonic-gate 47180Sstevel@tonic-gate *) Make sure _lrotl and _lrotr are only used with MSVC. 47190Sstevel@tonic-gate 47200Sstevel@tonic-gate *) Use lock CRYPTO_LOCK_RAND correctly in ssleay_rand_status 47210Sstevel@tonic-gate (the default implementation of RAND_status). 47220Sstevel@tonic-gate 47230Sstevel@tonic-gate *) Rename openssl x509 option '-crlext', which was added in 0.9.5, 47240Sstevel@tonic-gate to '-clrext' (= clear extensions), as intended and documented. 47250Sstevel@tonic-gate [Bodo Moeller; inconsistency pointed out by Michael Attili 47260Sstevel@tonic-gate <attili@amaxo.com>] 47270Sstevel@tonic-gate 47280Sstevel@tonic-gate *) Fix for HMAC. It wasn't zeroing the rest of the block if the key length 47290Sstevel@tonic-gate was larger than the MD block size. 47300Sstevel@tonic-gate [Steve Henson, pointed out by Yost William <YostW@tce.com>] 47310Sstevel@tonic-gate 47320Sstevel@tonic-gate *) Modernise PKCS12_parse() so it uses STACK_OF(X509) for its ca argument 47330Sstevel@tonic-gate fix a leak when the ca argument was passed as NULL. Stop X509_PUBKEY_set() 47340Sstevel@tonic-gate using the passed key: if the passed key was a private key the result 47350Sstevel@tonic-gate of X509_print(), for example, would be to print out all the private key 47360Sstevel@tonic-gate components. 47370Sstevel@tonic-gate [Steve Henson] 47380Sstevel@tonic-gate 47390Sstevel@tonic-gate *) des_quad_cksum() byte order bug fix. 47400Sstevel@tonic-gate [Ulf M�ller, using the problem description in krb4-0.9.7, where 47410Sstevel@tonic-gate the solution is attributed to Derrick J Brashear <shadow@DEMENTIA.ORG>] 47420Sstevel@tonic-gate 47430Sstevel@tonic-gate *) Fix so V_ASN1_APP_CHOOSE works again: however its use is strongly 47440Sstevel@tonic-gate discouraged. 47450Sstevel@tonic-gate [Steve Henson, pointed out by Brian Korver <briank@cs.stanford.edu>] 47460Sstevel@tonic-gate 47470Sstevel@tonic-gate *) For easily testing in shell scripts whether some command 47480Sstevel@tonic-gate 'openssl XXX' exists, the new pseudo-command 'openssl no-XXX' 47490Sstevel@tonic-gate returns with exit code 0 iff no command of the given name is available. 47500Sstevel@tonic-gate 'no-XXX' is printed in this case, 'XXX' otherwise. In both cases, 47510Sstevel@tonic-gate the output goes to stdout and nothing is printed to stderr. 47520Sstevel@tonic-gate Additional arguments are always ignored. 47530Sstevel@tonic-gate 47540Sstevel@tonic-gate Since for each cipher there is a command of the same name, 47550Sstevel@tonic-gate the 'no-cipher' compilation switches can be tested this way. 47560Sstevel@tonic-gate 47570Sstevel@tonic-gate ('openssl no-XXX' is not able to detect pseudo-commands such 47580Sstevel@tonic-gate as 'quit', 'list-XXX-commands', or 'no-XXX' itself.) 47590Sstevel@tonic-gate [Bodo Moeller] 47600Sstevel@tonic-gate 47610Sstevel@tonic-gate *) Update test suite so that 'make test' succeeds in 'no-rsa' configuration. 47620Sstevel@tonic-gate [Bodo Moeller] 47630Sstevel@tonic-gate 47640Sstevel@tonic-gate *) For SSL_[CTX_]set_tmp_dh, don't create a DH key if SSL_OP_SINGLE_DH_USE 47650Sstevel@tonic-gate is set; it will be thrown away anyway because each handshake creates 47660Sstevel@tonic-gate its own key. 47670Sstevel@tonic-gate ssl_cert_dup, which is used by SSL_new, now copies DH keys in addition 47680Sstevel@tonic-gate to parameters -- in previous versions (since OpenSSL 0.9.3) the 47690Sstevel@tonic-gate 'default key' from SSL_CTX_set_tmp_dh would always be lost, meanining 47700Sstevel@tonic-gate you effectivly got SSL_OP_SINGLE_DH_USE when using this macro. 47710Sstevel@tonic-gate [Bodo Moeller] 47720Sstevel@tonic-gate 47730Sstevel@tonic-gate *) New s_client option -ign_eof: EOF at stdin is ignored, and 47740Sstevel@tonic-gate 'Q' and 'R' lose their special meanings (quit/renegotiate). 47750Sstevel@tonic-gate This is part of what -quiet does; unlike -quiet, -ign_eof 47760Sstevel@tonic-gate does not suppress any output. 47770Sstevel@tonic-gate [Richard Levitte] 47780Sstevel@tonic-gate 47790Sstevel@tonic-gate *) Add compatibility options to the purpose and trust code. The 47800Sstevel@tonic-gate purpose X509_PURPOSE_ANY is "any purpose" which automatically 47810Sstevel@tonic-gate accepts a certificate or CA, this was the previous behaviour, 47820Sstevel@tonic-gate with all the associated security issues. 47830Sstevel@tonic-gate 47840Sstevel@tonic-gate X509_TRUST_COMPAT is the old trust behaviour: only and 47850Sstevel@tonic-gate automatically trust self signed roots in certificate store. A 47860Sstevel@tonic-gate new trust setting X509_TRUST_DEFAULT is used to specify that 47870Sstevel@tonic-gate a purpose has no associated trust setting and it should instead 47880Sstevel@tonic-gate use the value in the default purpose. 47890Sstevel@tonic-gate [Steve Henson] 47900Sstevel@tonic-gate 47910Sstevel@tonic-gate *) Fix the PKCS#8 DSA private key code so it decodes keys again 47920Sstevel@tonic-gate and fix a memory leak. 47930Sstevel@tonic-gate [Steve Henson] 47940Sstevel@tonic-gate 47950Sstevel@tonic-gate *) In util/mkerr.pl (which implements 'make errors'), preserve 47960Sstevel@tonic-gate reason strings from the previous version of the .c file, as 47970Sstevel@tonic-gate the default to have only downcase letters (and digits) in 47980Sstevel@tonic-gate automatically generated reasons codes is not always appropriate. 47990Sstevel@tonic-gate [Bodo Moeller] 48000Sstevel@tonic-gate 48010Sstevel@tonic-gate *) In ERR_load_ERR_strings(), build an ERR_LIB_SYS error reason table 48020Sstevel@tonic-gate using strerror. Previously, ERR_reason_error_string() returned 48030Sstevel@tonic-gate library names as reason strings for SYSerr; but SYSerr is a special 48040Sstevel@tonic-gate case where small numbers are errno values, not library numbers. 48050Sstevel@tonic-gate [Bodo Moeller] 48060Sstevel@tonic-gate 48070Sstevel@tonic-gate *) Add '-dsaparam' option to 'openssl dhparam' application. This 48080Sstevel@tonic-gate converts DSA parameters into DH parameters. (When creating parameters, 48090Sstevel@tonic-gate DSA_generate_parameters is used.) 48100Sstevel@tonic-gate [Bodo Moeller] 48110Sstevel@tonic-gate 48120Sstevel@tonic-gate *) Include 'length' (recommended exponent length) in C code generated 48130Sstevel@tonic-gate by 'openssl dhparam -C'. 48140Sstevel@tonic-gate [Bodo Moeller] 48150Sstevel@tonic-gate 48160Sstevel@tonic-gate *) The second argument to set_label in perlasm was already being used 48170Sstevel@tonic-gate so couldn't be used as a "file scope" flag. Moved to third argument 48180Sstevel@tonic-gate which was free. 48190Sstevel@tonic-gate [Steve Henson] 48200Sstevel@tonic-gate 48210Sstevel@tonic-gate *) In PEM_ASN1_write_bio and some other functions, use RAND_pseudo_bytes 48220Sstevel@tonic-gate instead of RAND_bytes for encryption IVs and salts. 48230Sstevel@tonic-gate [Bodo Moeller] 48240Sstevel@tonic-gate 48250Sstevel@tonic-gate *) Include RAND_status() into RAND_METHOD instead of implementing 48260Sstevel@tonic-gate it only for md_rand.c Otherwise replacing the PRNG by calling 48270Sstevel@tonic-gate RAND_set_rand_method would be impossible. 48280Sstevel@tonic-gate [Bodo Moeller] 48290Sstevel@tonic-gate 48300Sstevel@tonic-gate *) Don't let DSA_generate_key() enter an infinite loop if the random 48310Sstevel@tonic-gate number generation fails. 48320Sstevel@tonic-gate [Bodo Moeller] 48330Sstevel@tonic-gate 48340Sstevel@tonic-gate *) New 'rand' application for creating pseudo-random output. 48350Sstevel@tonic-gate [Bodo Moeller] 48360Sstevel@tonic-gate 48370Sstevel@tonic-gate *) Added configuration support for Linux/IA64 48380Sstevel@tonic-gate [Rolf Haberrecker <rolf@suse.de>] 48390Sstevel@tonic-gate 48400Sstevel@tonic-gate *) Assembler module support for Mingw32. 48410Sstevel@tonic-gate [Ulf M�ller] 48420Sstevel@tonic-gate 48430Sstevel@tonic-gate *) Shared library support for HPUX (in shlib/). 48440Sstevel@tonic-gate [Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> and Anonymous] 48450Sstevel@tonic-gate 48460Sstevel@tonic-gate *) Shared library support for Solaris gcc. 48470Sstevel@tonic-gate [Lutz Behnke <behnke@trustcenter.de>] 48480Sstevel@tonic-gate 48490Sstevel@tonic-gate Changes between 0.9.4 and 0.9.5 [28 Feb 2000] 48500Sstevel@tonic-gate 48510Sstevel@tonic-gate *) PKCS7_encrypt() was adding text MIME headers twice because they 48520Sstevel@tonic-gate were added manually and by SMIME_crlf_copy(). 48530Sstevel@tonic-gate [Steve Henson] 48540Sstevel@tonic-gate 48550Sstevel@tonic-gate *) In bntest.c don't call BN_rand with zero bits argument. 48560Sstevel@tonic-gate [Steve Henson, pointed out by Andrew W. Gray <agray@iconsinc.com>] 48570Sstevel@tonic-gate 48580Sstevel@tonic-gate *) BN_mul bugfix: In bn_mul_part_recursion() only the a>a[n] && b>b[n] 48590Sstevel@tonic-gate case was implemented. This caused BN_div_recp() to fail occasionally. 48600Sstevel@tonic-gate [Ulf M�ller] 48610Sstevel@tonic-gate 48620Sstevel@tonic-gate *) Add an optional second argument to the set_label() in the perl 48630Sstevel@tonic-gate assembly language builder. If this argument exists and is set 48640Sstevel@tonic-gate to 1 it signals that the assembler should use a symbol whose 48650Sstevel@tonic-gate scope is the entire file, not just the current function. This 48660Sstevel@tonic-gate is needed with MASM which uses the format label:: for this scope. 48670Sstevel@tonic-gate [Steve Henson, pointed out by Peter Runestig <peter@runestig.com>] 48680Sstevel@tonic-gate 48690Sstevel@tonic-gate *) Change the ASN1 types so they are typedefs by default. Before 48700Sstevel@tonic-gate almost all types were #define'd to ASN1_STRING which was causing 48710Sstevel@tonic-gate STACK_OF() problems: you couldn't declare STACK_OF(ASN1_UTF8STRING) 48720Sstevel@tonic-gate for example. 48730Sstevel@tonic-gate [Steve Henson] 48740Sstevel@tonic-gate 48750Sstevel@tonic-gate *) Change names of new functions to the new get1/get0 naming 48760Sstevel@tonic-gate convention: After 'get1', the caller owns a reference count 48770Sstevel@tonic-gate and has to call ..._free; 'get0' returns a pointer to some 48780Sstevel@tonic-gate data structure without incrementing reference counters. 48790Sstevel@tonic-gate (Some of the existing 'get' functions increment a reference 48800Sstevel@tonic-gate counter, some don't.) 48810Sstevel@tonic-gate Similarly, 'set1' and 'add1' functions increase reference 48820Sstevel@tonic-gate counters or duplicate objects. 48830Sstevel@tonic-gate [Steve Henson] 48840Sstevel@tonic-gate 48850Sstevel@tonic-gate *) Allow for the possibility of temp RSA key generation failure: 48860Sstevel@tonic-gate the code used to assume it always worked and crashed on failure. 48870Sstevel@tonic-gate [Steve Henson] 48880Sstevel@tonic-gate 48890Sstevel@tonic-gate *) Fix potential buffer overrun problem in BIO_printf(). 48900Sstevel@tonic-gate [Ulf M�ller, using public domain code by Patrick Powell; problem 48910Sstevel@tonic-gate pointed out by David Sacerdote <das33@cornell.edu>] 48920Sstevel@tonic-gate 48930Sstevel@tonic-gate *) Support EGD <http://www.lothar.com/tech/crypto/>. New functions 48940Sstevel@tonic-gate RAND_egd() and RAND_status(). In the command line application, 48950Sstevel@tonic-gate the EGD socket can be specified like a seed file using RANDFILE 48960Sstevel@tonic-gate or -rand. 48970Sstevel@tonic-gate [Ulf M�ller] 48980Sstevel@tonic-gate 48990Sstevel@tonic-gate *) Allow the string CERTIFICATE to be tolerated in PKCS#7 structures. 49000Sstevel@tonic-gate Some CAs (e.g. Verisign) distribute certificates in this form. 49010Sstevel@tonic-gate [Steve Henson] 49020Sstevel@tonic-gate 49030Sstevel@tonic-gate *) Remove the SSL_ALLOW_ADH compile option and set the default cipher 49040Sstevel@tonic-gate list to exclude them. This means that no special compilation option 49050Sstevel@tonic-gate is needed to use anonymous DH: it just needs to be included in the 49060Sstevel@tonic-gate cipher list. 49070Sstevel@tonic-gate [Steve Henson] 49080Sstevel@tonic-gate 49090Sstevel@tonic-gate *) Change the EVP_MD_CTX_type macro so its meaning consistent with 49100Sstevel@tonic-gate EVP_MD_type. The old functionality is available in a new macro called 49110Sstevel@tonic-gate EVP_MD_md(). Change code that uses it and update docs. 49120Sstevel@tonic-gate [Steve Henson] 49130Sstevel@tonic-gate 49140Sstevel@tonic-gate *) ..._ctrl functions now have corresponding ..._callback_ctrl functions 49150Sstevel@tonic-gate where the 'void *' argument is replaced by a function pointer argument. 49160Sstevel@tonic-gate Previously 'void *' was abused to point to functions, which works on 49170Sstevel@tonic-gate many platforms, but is not correct. As these functions are usually 49180Sstevel@tonic-gate called by macros defined in OpenSSL header files, most source code 49190Sstevel@tonic-gate should work without changes. 49200Sstevel@tonic-gate [Richard Levitte] 49210Sstevel@tonic-gate 49220Sstevel@tonic-gate *) <openssl/opensslconf.h> (which is created by Configure) now contains 49230Sstevel@tonic-gate sections with information on -D... compiler switches used for 49240Sstevel@tonic-gate compiling the library so that applications can see them. To enable 49250Sstevel@tonic-gate one of these sections, a pre-processor symbol OPENSSL_..._DEFINES 49260Sstevel@tonic-gate must be defined. E.g., 49270Sstevel@tonic-gate #define OPENSSL_ALGORITHM_DEFINES 49280Sstevel@tonic-gate #include <openssl/opensslconf.h> 49290Sstevel@tonic-gate defines all pertinent NO_<algo> symbols, such as NO_IDEA, NO_RSA, etc. 49300Sstevel@tonic-gate [Richard Levitte, Ulf and Bodo M�ller] 49310Sstevel@tonic-gate 49320Sstevel@tonic-gate *) Bugfix: Tolerate fragmentation and interleaving in the SSL 3/TLS 49330Sstevel@tonic-gate record layer. 49340Sstevel@tonic-gate [Bodo Moeller] 49350Sstevel@tonic-gate 49360Sstevel@tonic-gate *) Change the 'other' type in certificate aux info to a STACK_OF 49370Sstevel@tonic-gate X509_ALGOR. Although not an AlgorithmIdentifier as such it has 49380Sstevel@tonic-gate the required ASN1 format: arbitrary types determined by an OID. 49390Sstevel@tonic-gate [Steve Henson] 49400Sstevel@tonic-gate 49410Sstevel@tonic-gate *) Add some PEM_write_X509_REQ_NEW() functions and a command line 49420Sstevel@tonic-gate argument to 'req'. This is not because the function is newer or 49430Sstevel@tonic-gate better than others it just uses the work 'NEW' in the certificate 49440Sstevel@tonic-gate request header lines. Some software needs this. 49450Sstevel@tonic-gate [Steve Henson] 49460Sstevel@tonic-gate 49470Sstevel@tonic-gate *) Reorganise password command line arguments: now passwords can be 49480Sstevel@tonic-gate obtained from various sources. Delete the PEM_cb function and make 49490Sstevel@tonic-gate it the default behaviour: i.e. if the callback is NULL and the 49500Sstevel@tonic-gate usrdata argument is not NULL interpret it as a null terminated pass 49510Sstevel@tonic-gate phrase. If usrdata and the callback are NULL then the pass phrase 49520Sstevel@tonic-gate is prompted for as usual. 49530Sstevel@tonic-gate [Steve Henson] 49540Sstevel@tonic-gate 49550Sstevel@tonic-gate *) Add support for the Compaq Atalla crypto accelerator. If it is installed, 49560Sstevel@tonic-gate the support is automatically enabled. The resulting binaries will 49570Sstevel@tonic-gate autodetect the card and use it if present. 49580Sstevel@tonic-gate [Ben Laurie and Compaq Inc.] 49590Sstevel@tonic-gate 49600Sstevel@tonic-gate *) Work around for Netscape hang bug. This sends certificate request 49610Sstevel@tonic-gate and server done in one record. Since this is perfectly legal in the 49620Sstevel@tonic-gate SSL/TLS protocol it isn't a "bug" option and is on by default. See 49630Sstevel@tonic-gate the bugs/SSLv3 entry for more info. 49640Sstevel@tonic-gate [Steve Henson] 49650Sstevel@tonic-gate 49660Sstevel@tonic-gate *) HP-UX tune-up: new unified configs, HP C compiler bug workaround. 49670Sstevel@tonic-gate [Andy Polyakov] 49680Sstevel@tonic-gate 49690Sstevel@tonic-gate *) Add -rand argument to smime and pkcs12 applications and read/write 49700Sstevel@tonic-gate of seed file. 49710Sstevel@tonic-gate [Steve Henson] 49720Sstevel@tonic-gate 49730Sstevel@tonic-gate *) New 'passwd' tool for crypt(3) and apr1 password hashes. 49740Sstevel@tonic-gate [Bodo Moeller] 49750Sstevel@tonic-gate 49760Sstevel@tonic-gate *) Add command line password options to the remaining applications. 49770Sstevel@tonic-gate [Steve Henson] 49780Sstevel@tonic-gate 49790Sstevel@tonic-gate *) Bug fix for BN_div_recp() for numerators with an even number of 49800Sstevel@tonic-gate bits. 49810Sstevel@tonic-gate [Ulf M�ller] 49820Sstevel@tonic-gate 49830Sstevel@tonic-gate *) More tests in bntest.c, and changed test_bn output. 49840Sstevel@tonic-gate [Ulf M�ller] 49850Sstevel@tonic-gate 49860Sstevel@tonic-gate *) ./config recognizes MacOS X now. 49870Sstevel@tonic-gate [Andy Polyakov] 49880Sstevel@tonic-gate 49890Sstevel@tonic-gate *) Bug fix for BN_div() when the first words of num and divsor are 49900Sstevel@tonic-gate equal (it gave wrong results if (rem=(n1-q*d0)&BN_MASK2) < d0). 49910Sstevel@tonic-gate [Ulf M�ller] 49920Sstevel@tonic-gate 49930Sstevel@tonic-gate *) Add support for various broken PKCS#8 formats, and command line 49940Sstevel@tonic-gate options to produce them. 49950Sstevel@tonic-gate [Steve Henson] 49960Sstevel@tonic-gate 49970Sstevel@tonic-gate *) New functions BN_CTX_start(), BN_CTX_get() and BT_CTX_end() to 49980Sstevel@tonic-gate get temporary BIGNUMs from a BN_CTX. 49990Sstevel@tonic-gate [Ulf M�ller] 50000Sstevel@tonic-gate 50010Sstevel@tonic-gate *) Correct return values in BN_mod_exp_mont() and BN_mod_exp2_mont() 50020Sstevel@tonic-gate for p == 0. 50030Sstevel@tonic-gate [Ulf M�ller] 50040Sstevel@tonic-gate 50050Sstevel@tonic-gate *) Change the SSLeay_add_all_*() functions to OpenSSL_add_all_*() and 50060Sstevel@tonic-gate include a #define from the old name to the new. The original intent 50070Sstevel@tonic-gate was that statically linked binaries could for example just call 50080Sstevel@tonic-gate SSLeay_add_all_ciphers() to just add ciphers to the table and not 50090Sstevel@tonic-gate link with digests. This never worked becayse SSLeay_add_all_digests() 50100Sstevel@tonic-gate and SSLeay_add_all_ciphers() were in the same source file so calling 50110Sstevel@tonic-gate one would link with the other. They are now in separate source files. 50120Sstevel@tonic-gate [Steve Henson] 50130Sstevel@tonic-gate 50140Sstevel@tonic-gate *) Add a new -notext option to 'ca' and a -pubkey option to 'spkac'. 50150Sstevel@tonic-gate [Steve Henson] 50160Sstevel@tonic-gate 50170Sstevel@tonic-gate *) Use a less unusual form of the Miller-Rabin primality test (it used 50180Sstevel@tonic-gate a binary algorithm for exponentiation integrated into the Miller-Rabin 50190Sstevel@tonic-gate loop, our standard modexp algorithms are faster). 50200Sstevel@tonic-gate [Bodo Moeller] 50210Sstevel@tonic-gate 50220Sstevel@tonic-gate *) Support for the EBCDIC character set completed. 50230Sstevel@tonic-gate [Martin Kraemer <Martin.Kraemer@Mch.SNI.De>] 50240Sstevel@tonic-gate 50250Sstevel@tonic-gate *) Source code cleanups: use const where appropriate, eliminate casts, 50260Sstevel@tonic-gate use void * instead of char * in lhash. 50270Sstevel@tonic-gate [Ulf M�ller] 50280Sstevel@tonic-gate 50290Sstevel@tonic-gate *) Bugfix: ssl3_send_server_key_exchange was not restartable 50300Sstevel@tonic-gate (the state was not changed to SSL3_ST_SW_KEY_EXCH_B, and because of 50310Sstevel@tonic-gate this the server could overwrite ephemeral keys that the client 50320Sstevel@tonic-gate has already seen). 50330Sstevel@tonic-gate [Bodo Moeller] 50340Sstevel@tonic-gate 50350Sstevel@tonic-gate *) Turn DSA_is_prime into a macro that calls BN_is_prime, 50360Sstevel@tonic-gate using 50 iterations of the Rabin-Miller test. 50370Sstevel@tonic-gate 50380Sstevel@tonic-gate DSA_generate_parameters now uses BN_is_prime_fasttest (with 50 50390Sstevel@tonic-gate iterations of the Rabin-Miller test as required by the appendix 50400Sstevel@tonic-gate to FIPS PUB 186[-1]) instead of DSA_is_prime. 50410Sstevel@tonic-gate As BN_is_prime_fasttest includes trial division, DSA parameter 50420Sstevel@tonic-gate generation becomes much faster. 50430Sstevel@tonic-gate 50440Sstevel@tonic-gate This implies a change for the callback functions in DSA_is_prime 50450Sstevel@tonic-gate and DSA_generate_parameters: The callback function is called once 50460Sstevel@tonic-gate for each positive witness in the Rabin-Miller test, not just 50470Sstevel@tonic-gate occasionally in the inner loop; and the parameters to the 50480Sstevel@tonic-gate callback function now provide an iteration count for the outer 50490Sstevel@tonic-gate loop rather than for the current invocation of the inner loop. 50500Sstevel@tonic-gate DSA_generate_parameters additionally can call the callback 50510Sstevel@tonic-gate function with an 'iteration count' of -1, meaning that a 50520Sstevel@tonic-gate candidate has passed the trial division test (when q is generated 50530Sstevel@tonic-gate from an application-provided seed, trial division is skipped). 50540Sstevel@tonic-gate [Bodo Moeller] 50550Sstevel@tonic-gate 50560Sstevel@tonic-gate *) New function BN_is_prime_fasttest that optionally does trial 50570Sstevel@tonic-gate division before starting the Rabin-Miller test and has 50580Sstevel@tonic-gate an additional BN_CTX * argument (whereas BN_is_prime always 50590Sstevel@tonic-gate has to allocate at least one BN_CTX). 50600Sstevel@tonic-gate 'callback(1, -1, cb_arg)' is called when a number has passed the 50610Sstevel@tonic-gate trial division stage. 50620Sstevel@tonic-gate [Bodo Moeller] 50630Sstevel@tonic-gate 50640Sstevel@tonic-gate *) Fix for bug in CRL encoding. The validity dates weren't being handled 50650Sstevel@tonic-gate as ASN1_TIME. 50660Sstevel@tonic-gate [Steve Henson] 50670Sstevel@tonic-gate 50680Sstevel@tonic-gate *) New -pkcs12 option to CA.pl script to write out a PKCS#12 file. 50690Sstevel@tonic-gate [Steve Henson] 50700Sstevel@tonic-gate 50710Sstevel@tonic-gate *) New function BN_pseudo_rand(). 50720Sstevel@tonic-gate [Ulf M�ller] 50730Sstevel@tonic-gate 50740Sstevel@tonic-gate *) Clean up BN_mod_mul_montgomery(): replace the broken (and unreadable) 50750Sstevel@tonic-gate bignum version of BN_from_montgomery() with the working code from 50760Sstevel@tonic-gate SSLeay 0.9.0 (the word based version is faster anyway), and clean up 50770Sstevel@tonic-gate the comments. 50780Sstevel@tonic-gate [Ulf M�ller] 50790Sstevel@tonic-gate 50800Sstevel@tonic-gate *) Avoid a race condition in s2_clnt.c (function get_server_hello) that 50810Sstevel@tonic-gate made it impossible to use the same SSL_SESSION data structure in 50820Sstevel@tonic-gate SSL2 clients in multiple threads. 50830Sstevel@tonic-gate [Bodo Moeller] 50840Sstevel@tonic-gate 50850Sstevel@tonic-gate *) The return value of RAND_load_file() no longer counts bytes obtained 50860Sstevel@tonic-gate by stat(). RAND_load_file(..., -1) is new and uses the complete file 50870Sstevel@tonic-gate to seed the PRNG (previously an explicit byte count was required). 50880Sstevel@tonic-gate [Ulf M�ller, Bodo M�ller] 50890Sstevel@tonic-gate 50900Sstevel@tonic-gate *) Clean up CRYPTO_EX_DATA functions, some of these didn't have prototypes 50910Sstevel@tonic-gate used (char *) instead of (void *) and had casts all over the place. 50920Sstevel@tonic-gate [Steve Henson] 50930Sstevel@tonic-gate 50940Sstevel@tonic-gate *) Make BN_generate_prime() return NULL on error if ret!=NULL. 50950Sstevel@tonic-gate [Ulf M�ller] 50960Sstevel@tonic-gate 50970Sstevel@tonic-gate *) Retain source code compatibility for BN_prime_checks macro: 50980Sstevel@tonic-gate BN_is_prime(..., BN_prime_checks, ...) now uses 50990Sstevel@tonic-gate BN_prime_checks_for_size to determine the appropriate number of 51000Sstevel@tonic-gate Rabin-Miller iterations. 51010Sstevel@tonic-gate [Ulf M�ller] 51020Sstevel@tonic-gate 51030Sstevel@tonic-gate *) Diffie-Hellman uses "safe" primes: DH_check() return code renamed to 51040Sstevel@tonic-gate DH_CHECK_P_NOT_SAFE_PRIME. 51050Sstevel@tonic-gate (Check if this is true? OpenPGP calls them "strong".) 51060Sstevel@tonic-gate [Ulf M�ller] 51070Sstevel@tonic-gate 51080Sstevel@tonic-gate *) Merge the functionality of "dh" and "gendh" programs into a new program 51090Sstevel@tonic-gate "dhparam". The old programs are retained for now but will handle DH keys 51100Sstevel@tonic-gate (instead of parameters) in future. 51110Sstevel@tonic-gate [Steve Henson] 51120Sstevel@tonic-gate 51130Sstevel@tonic-gate *) Make the ciphers, s_server and s_client programs check the return values 51140Sstevel@tonic-gate when a new cipher list is set. 51150Sstevel@tonic-gate [Steve Henson] 51160Sstevel@tonic-gate 51170Sstevel@tonic-gate *) Enhance the SSL/TLS cipher mechanism to correctly handle the TLS 56bit 51180Sstevel@tonic-gate ciphers. Before when the 56bit ciphers were enabled the sorting was 51190Sstevel@tonic-gate wrong. 51200Sstevel@tonic-gate 51210Sstevel@tonic-gate The syntax for the cipher sorting has been extended to support sorting by 51220Sstevel@tonic-gate cipher-strength (using the strength_bits hard coded in the tables). 51230Sstevel@tonic-gate The new command is "@STRENGTH" (see also doc/apps/ciphers.pod). 51240Sstevel@tonic-gate 51250Sstevel@tonic-gate Fix a bug in the cipher-command parser: when supplying a cipher command 51260Sstevel@tonic-gate string with an "undefined" symbol (neither command nor alphanumeric 51270Sstevel@tonic-gate [A-Za-z0-9], ssl_set_cipher_list used to hang in an endless loop. Now 51280Sstevel@tonic-gate an error is flagged. 51290Sstevel@tonic-gate 51300Sstevel@tonic-gate Due to the strength-sorting extension, the code of the 51310Sstevel@tonic-gate ssl_create_cipher_list() function was completely rearranged. I hope that 51320Sstevel@tonic-gate the readability was also increased :-) 51330Sstevel@tonic-gate [Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>] 51340Sstevel@tonic-gate 51350Sstevel@tonic-gate *) Minor change to 'x509' utility. The -CAcreateserial option now uses 1 51360Sstevel@tonic-gate for the first serial number and places 2 in the serial number file. This 51370Sstevel@tonic-gate avoids problems when the root CA is created with serial number zero and 51380Sstevel@tonic-gate the first user certificate has the same issuer name and serial number 51390Sstevel@tonic-gate as the root CA. 51400Sstevel@tonic-gate [Steve Henson] 51410Sstevel@tonic-gate 51420Sstevel@tonic-gate *) Fixes to X509_ATTRIBUTE utilities, change the 'req' program so it uses 51430Sstevel@tonic-gate the new code. Add documentation for this stuff. 51440Sstevel@tonic-gate [Steve Henson] 51450Sstevel@tonic-gate 51460Sstevel@tonic-gate *) Changes to X509_ATTRIBUTE utilities. These have been renamed from 51470Sstevel@tonic-gate X509_*() to X509at_*() on the grounds that they don't handle X509 51480Sstevel@tonic-gate structures and behave in an analagous way to the X509v3 functions: 51490Sstevel@tonic-gate they shouldn't be called directly but wrapper functions should be used 51500Sstevel@tonic-gate instead. 51510Sstevel@tonic-gate 51520Sstevel@tonic-gate So we also now have some wrapper functions that call the X509at functions 51530Sstevel@tonic-gate when passed certificate requests. (TO DO: similar things can be done with 51540Sstevel@tonic-gate PKCS#7 signed and unsigned attributes, PKCS#12 attributes and a few other 51550Sstevel@tonic-gate things. Some of these need some d2i or i2d and print functionality 51560Sstevel@tonic-gate because they handle more complex structures.) 51570Sstevel@tonic-gate [Steve Henson] 51580Sstevel@tonic-gate 51590Sstevel@tonic-gate *) Add missing #ifndefs that caused missing symbols when building libssl 51600Sstevel@tonic-gate as a shared library without RSA. Use #ifndef NO_SSL2 instead of 51610Sstevel@tonic-gate NO_RSA in ssl/s2*.c. 51620Sstevel@tonic-gate [Kris Kennaway <kris@hub.freebsd.org>, modified by Ulf M�ller] 51630Sstevel@tonic-gate 51640Sstevel@tonic-gate *) Precautions against using the PRNG uninitialized: RAND_bytes() now 51650Sstevel@tonic-gate has a return value which indicates the quality of the random data 51660Sstevel@tonic-gate (1 = ok, 0 = not seeded). Also an error is recorded on the thread's 51670Sstevel@tonic-gate error queue. New function RAND_pseudo_bytes() generates output that is 51680Sstevel@tonic-gate guaranteed to be unique but not unpredictable. RAND_add is like 51690Sstevel@tonic-gate RAND_seed, but takes an extra argument for an entropy estimate 51700Sstevel@tonic-gate (RAND_seed always assumes full entropy). 51710Sstevel@tonic-gate [Ulf M�ller] 51720Sstevel@tonic-gate 51730Sstevel@tonic-gate *) Do more iterations of Rabin-Miller probable prime test (specifically, 51740Sstevel@tonic-gate 3 for 1024-bit primes, 6 for 512-bit primes, 12 for 256-bit primes 51750Sstevel@tonic-gate instead of only 2 for all lengths; see BN_prime_checks_for_size definition 51760Sstevel@tonic-gate in crypto/bn/bn_prime.c for the complete table). This guarantees a 51770Sstevel@tonic-gate false-positive rate of at most 2^-80 for random input. 51780Sstevel@tonic-gate [Bodo Moeller] 51790Sstevel@tonic-gate 51800Sstevel@tonic-gate *) Rewrite ssl3_read_n (ssl/s3_pkt.c) avoiding a couple of bugs. 51810Sstevel@tonic-gate [Bodo Moeller] 51820Sstevel@tonic-gate 51830Sstevel@tonic-gate *) New function X509_CTX_rget_chain() (renamed to X509_CTX_get1_chain 51840Sstevel@tonic-gate in the 0.9.5 release), this returns the chain 51850Sstevel@tonic-gate from an X509_CTX structure with a dup of the stack and all 51860Sstevel@tonic-gate the X509 reference counts upped: so the stack will exist 51870Sstevel@tonic-gate after X509_CTX_cleanup() has been called. Modify pkcs12.c 51880Sstevel@tonic-gate to use this. 51890Sstevel@tonic-gate 51900Sstevel@tonic-gate Also make SSL_SESSION_print() print out the verify return 51910Sstevel@tonic-gate code. 51920Sstevel@tonic-gate [Steve Henson] 51930Sstevel@tonic-gate 51940Sstevel@tonic-gate *) Add manpage for the pkcs12 command. Also change the default 51950Sstevel@tonic-gate behaviour so MAC iteration counts are used unless the new 51960Sstevel@tonic-gate -nomaciter option is used. This improves file security and 51970Sstevel@tonic-gate only older versions of MSIE (4.0 for example) need it. 51980Sstevel@tonic-gate [Steve Henson] 51990Sstevel@tonic-gate 52000Sstevel@tonic-gate *) Honor the no-xxx Configure options when creating .DEF files. 52010Sstevel@tonic-gate [Ulf M�ller] 52020Sstevel@tonic-gate 52030Sstevel@tonic-gate *) Add PKCS#10 attributes to field table: challengePassword, 52040Sstevel@tonic-gate unstructuredName and unstructuredAddress. These are taken from 52050Sstevel@tonic-gate draft PKCS#9 v2.0 but are compatible with v1.2 provided no 52060Sstevel@tonic-gate international characters are used. 52070Sstevel@tonic-gate 52080Sstevel@tonic-gate More changes to X509_ATTRIBUTE code: allow the setting of types 52090Sstevel@tonic-gate based on strings. Remove the 'loc' parameter when adding 52100Sstevel@tonic-gate attributes because these will be a SET OF encoding which is sorted 52110Sstevel@tonic-gate in ASN1 order. 52120Sstevel@tonic-gate [Steve Henson] 52130Sstevel@tonic-gate 52140Sstevel@tonic-gate *) Initial changes to the 'req' utility to allow request generation 52150Sstevel@tonic-gate automation. This will allow an application to just generate a template 52160Sstevel@tonic-gate file containing all the field values and have req construct the 52170Sstevel@tonic-gate request. 52180Sstevel@tonic-gate 52190Sstevel@tonic-gate Initial support for X509_ATTRIBUTE handling. Stacks of these are 52200Sstevel@tonic-gate used all over the place including certificate requests and PKCS#7 52210Sstevel@tonic-gate structures. They are currently handled manually where necessary with 52220Sstevel@tonic-gate some primitive wrappers for PKCS#7. The new functions behave in a 52230Sstevel@tonic-gate manner analogous to the X509 extension functions: they allow 52240Sstevel@tonic-gate attributes to be looked up by NID and added. 52250Sstevel@tonic-gate 52260Sstevel@tonic-gate Later something similar to the X509V3 code would be desirable to 52270Sstevel@tonic-gate automatically handle the encoding, decoding and printing of the 52280Sstevel@tonic-gate more complex types. The string types like challengePassword can 52290Sstevel@tonic-gate be handled by the string table functions. 52300Sstevel@tonic-gate 52310Sstevel@tonic-gate Also modified the multi byte string table handling. Now there is 52320Sstevel@tonic-gate a 'global mask' which masks out certain types. The table itself 52330Sstevel@tonic-gate can use the flag STABLE_NO_MASK to ignore the mask setting: this 52340Sstevel@tonic-gate is useful when for example there is only one permissible type 52350Sstevel@tonic-gate (as in countryName) and using the mask might result in no valid 52360Sstevel@tonic-gate types at all. 52370Sstevel@tonic-gate [Steve Henson] 52380Sstevel@tonic-gate 52390Sstevel@tonic-gate *) Clean up 'Finished' handling, and add functions SSL_get_finished and 52400Sstevel@tonic-gate SSL_get_peer_finished to allow applications to obtain the latest 52410Sstevel@tonic-gate Finished messages sent to the peer or expected from the peer, 52420Sstevel@tonic-gate respectively. (SSL_get_peer_finished is usually the Finished message 52430Sstevel@tonic-gate actually received from the peer, otherwise the protocol will be aborted.) 52440Sstevel@tonic-gate 52450Sstevel@tonic-gate As the Finished message are message digests of the complete handshake 52460Sstevel@tonic-gate (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can 52470Sstevel@tonic-gate be used for external authentication procedures when the authentication 52480Sstevel@tonic-gate provided by SSL/TLS is not desired or is not enough. 52490Sstevel@tonic-gate [Bodo Moeller] 52500Sstevel@tonic-gate 52510Sstevel@tonic-gate *) Enhanced support for Alpha Linux is added. Now ./config checks if 52520Sstevel@tonic-gate the host supports BWX extension and if Compaq C is present on the 52530Sstevel@tonic-gate $PATH. Just exploiting of the BWX extension results in 20-30% 52540Sstevel@tonic-gate performance kick for some algorithms, e.g. DES and RC4 to mention 52550Sstevel@tonic-gate a couple. Compaq C in turn generates ~20% faster code for MD5 and 52560Sstevel@tonic-gate SHA1. 52570Sstevel@tonic-gate [Andy Polyakov] 52580Sstevel@tonic-gate 52590Sstevel@tonic-gate *) Add support for MS "fast SGC". This is arguably a violation of the 52600Sstevel@tonic-gate SSL3/TLS protocol. Netscape SGC does two handshakes: the first with 52610Sstevel@tonic-gate weak crypto and after checking the certificate is SGC a second one 52620Sstevel@tonic-gate with strong crypto. MS SGC stops the first handshake after receiving 52630Sstevel@tonic-gate the server certificate message and sends a second client hello. Since 52640Sstevel@tonic-gate a server will typically do all the time consuming operations before 52650Sstevel@tonic-gate expecting any further messages from the client (server key exchange 52660Sstevel@tonic-gate is the most expensive) there is little difference between the two. 52670Sstevel@tonic-gate 52680Sstevel@tonic-gate To get OpenSSL to support MS SGC we have to permit a second client 52690Sstevel@tonic-gate hello message after we have sent server done. In addition we have to 52700Sstevel@tonic-gate reset the MAC if we do get this second client hello. 52710Sstevel@tonic-gate [Steve Henson] 52720Sstevel@tonic-gate 52730Sstevel@tonic-gate *) Add a function 'd2i_AutoPrivateKey()' this will automatically decide 52740Sstevel@tonic-gate if a DER encoded private key is RSA or DSA traditional format. Changed 52750Sstevel@tonic-gate d2i_PrivateKey_bio() to use it. This is only needed for the "traditional" 52760Sstevel@tonic-gate format DER encoded private key. Newer code should use PKCS#8 format which 52770Sstevel@tonic-gate has the key type encoded in the ASN1 structure. Added DER private key 52780Sstevel@tonic-gate support to pkcs8 application. 52790Sstevel@tonic-gate [Steve Henson] 52800Sstevel@tonic-gate 52810Sstevel@tonic-gate *) SSL 3/TLS 1 servers now don't request certificates when an anonymous 52820Sstevel@tonic-gate ciphersuites has been selected (as required by the SSL 3/TLS 1 52830Sstevel@tonic-gate specifications). Exception: When SSL_VERIFY_FAIL_IF_NO_PEER_CERT 52840Sstevel@tonic-gate is set, we interpret this as a request to violate the specification 52850Sstevel@tonic-gate (the worst that can happen is a handshake failure, and 'correct' 52860Sstevel@tonic-gate behaviour would result in a handshake failure anyway). 52870Sstevel@tonic-gate [Bodo Moeller] 52880Sstevel@tonic-gate 52890Sstevel@tonic-gate *) In SSL_CTX_add_session, take into account that there might be multiple 52900Sstevel@tonic-gate SSL_SESSION structures with the same session ID (e.g. when two threads 52910Sstevel@tonic-gate concurrently obtain them from an external cache). 52920Sstevel@tonic-gate The internal cache can handle only one SSL_SESSION with a given ID, 52930Sstevel@tonic-gate so if there's a conflict, we now throw out the old one to achieve 52940Sstevel@tonic-gate consistency. 52950Sstevel@tonic-gate [Bodo Moeller] 52960Sstevel@tonic-gate 52970Sstevel@tonic-gate *) Add OIDs for idea and blowfish in CBC mode. This will allow both 52980Sstevel@tonic-gate to be used in PKCS#5 v2.0 and S/MIME. Also add checking to 52990Sstevel@tonic-gate some routines that use cipher OIDs: some ciphers do not have OIDs 53000Sstevel@tonic-gate defined and so they cannot be used for S/MIME and PKCS#5 v2.0 for 53010Sstevel@tonic-gate example. 53020Sstevel@tonic-gate [Steve Henson] 53030Sstevel@tonic-gate 53040Sstevel@tonic-gate *) Simplify the trust setting structure and code. Now we just have 53050Sstevel@tonic-gate two sequences of OIDs for trusted and rejected settings. These will 53060Sstevel@tonic-gate typically have values the same as the extended key usage extension 53070Sstevel@tonic-gate and any application specific purposes. 53080Sstevel@tonic-gate 53090Sstevel@tonic-gate The trust checking code now has a default behaviour: it will just 53100Sstevel@tonic-gate check for an object with the same NID as the passed id. Functions can 53110Sstevel@tonic-gate be provided to override either the default behaviour or the behaviour 53120Sstevel@tonic-gate for a given id. SSL client, server and email already have functions 53130Sstevel@tonic-gate in place for compatibility: they check the NID and also return "trusted" 53140Sstevel@tonic-gate if the certificate is self signed. 53150Sstevel@tonic-gate [Steve Henson] 53160Sstevel@tonic-gate 53170Sstevel@tonic-gate *) Add d2i,i2d bio/fp functions for PrivateKey: these convert the 53180Sstevel@tonic-gate traditional format into an EVP_PKEY structure. 53190Sstevel@tonic-gate [Steve Henson] 53200Sstevel@tonic-gate 53210Sstevel@tonic-gate *) Add a password callback function PEM_cb() which either prompts for 53220Sstevel@tonic-gate a password if usr_data is NULL or otherwise assumes it is a null 53230Sstevel@tonic-gate terminated password. Allow passwords to be passed on command line 53240Sstevel@tonic-gate environment or config files in a few more utilities. 53250Sstevel@tonic-gate [Steve Henson] 53260Sstevel@tonic-gate 53270Sstevel@tonic-gate *) Add a bunch of DER and PEM functions to handle PKCS#8 format private 53280Sstevel@tonic-gate keys. Add some short names for PKCS#8 PBE algorithms and allow them 53290Sstevel@tonic-gate to be specified on the command line for the pkcs8 and pkcs12 utilities. 53300Sstevel@tonic-gate Update documentation. 53310Sstevel@tonic-gate [Steve Henson] 53320Sstevel@tonic-gate 53330Sstevel@tonic-gate *) Support for ASN1 "NULL" type. This could be handled before by using 53340Sstevel@tonic-gate ASN1_TYPE but there wasn't any function that would try to read a NULL 53350Sstevel@tonic-gate and produce an error if it couldn't. For compatibility we also have 53360Sstevel@tonic-gate ASN1_NULL_new() and ASN1_NULL_free() functions but these are faked and 53370Sstevel@tonic-gate don't allocate anything because they don't need to. 53380Sstevel@tonic-gate [Steve Henson] 53390Sstevel@tonic-gate 53400Sstevel@tonic-gate *) Initial support for MacOS is now provided. Examine INSTALL.MacOS 53410Sstevel@tonic-gate for details. 53420Sstevel@tonic-gate [Andy Polyakov, Roy Woods <roy@centicsystems.ca>] 53430Sstevel@tonic-gate 53440Sstevel@tonic-gate *) Rebuild of the memory allocation routines used by OpenSSL code and 53450Sstevel@tonic-gate possibly others as well. The purpose is to make an interface that 53460Sstevel@tonic-gate provide hooks so anyone can build a separate set of allocation and 53470Sstevel@tonic-gate deallocation routines to be used by OpenSSL, for example memory 53480Sstevel@tonic-gate pool implementations, or something else, which was previously hard 53490Sstevel@tonic-gate since Malloc(), Realloc() and Free() were defined as macros having 53500Sstevel@tonic-gate the values malloc, realloc and free, respectively (except for Win32 53510Sstevel@tonic-gate compilations). The same is provided for memory debugging code. 53520Sstevel@tonic-gate OpenSSL already comes with functionality to find memory leaks, but 53530Sstevel@tonic-gate this gives people a chance to debug other memory problems. 53540Sstevel@tonic-gate 53550Sstevel@tonic-gate With these changes, a new set of functions and macros have appeared: 53560Sstevel@tonic-gate 53570Sstevel@tonic-gate CRYPTO_set_mem_debug_functions() [F] 53580Sstevel@tonic-gate CRYPTO_get_mem_debug_functions() [F] 53590Sstevel@tonic-gate CRYPTO_dbg_set_options() [F] 53600Sstevel@tonic-gate CRYPTO_dbg_get_options() [F] 53610Sstevel@tonic-gate CRYPTO_malloc_debug_init() [M] 53620Sstevel@tonic-gate 53630Sstevel@tonic-gate The memory debug functions are NULL by default, unless the library 53640Sstevel@tonic-gate is compiled with CRYPTO_MDEBUG or friends is defined. If someone 53650Sstevel@tonic-gate wants to debug memory anyway, CRYPTO_malloc_debug_init() (which 53660Sstevel@tonic-gate gives the standard debugging functions that come with OpenSSL) or 53670Sstevel@tonic-gate CRYPTO_set_mem_debug_functions() (tells OpenSSL to use functions 53680Sstevel@tonic-gate provided by the library user) must be used. When the standard 53690Sstevel@tonic-gate debugging functions are used, CRYPTO_dbg_set_options can be used to 53700Sstevel@tonic-gate request additional information: 53710Sstevel@tonic-gate CRYPTO_dbg_set_options(V_CYRPTO_MDEBUG_xxx) corresponds to setting 53720Sstevel@tonic-gate the CRYPTO_MDEBUG_xxx macro when compiling the library. 53730Sstevel@tonic-gate 53740Sstevel@tonic-gate Also, things like CRYPTO_set_mem_functions will always give the 53750Sstevel@tonic-gate expected result (the new set of functions is used for allocation 53760Sstevel@tonic-gate and deallocation) at all times, regardless of platform and compiler 53770Sstevel@tonic-gate options. 53780Sstevel@tonic-gate 53790Sstevel@tonic-gate To finish it up, some functions that were never use in any other 53800Sstevel@tonic-gate way than through macros have a new API and new semantic: 53810Sstevel@tonic-gate 53820Sstevel@tonic-gate CRYPTO_dbg_malloc() 53830Sstevel@tonic-gate CRYPTO_dbg_realloc() 53840Sstevel@tonic-gate CRYPTO_dbg_free() 53850Sstevel@tonic-gate 53860Sstevel@tonic-gate All macros of value have retained their old syntax. 53870Sstevel@tonic-gate [Richard Levitte and Bodo Moeller] 53880Sstevel@tonic-gate 53890Sstevel@tonic-gate *) Some S/MIME fixes. The OID for SMIMECapabilities was wrong, the 53900Sstevel@tonic-gate ordering of SMIMECapabilities wasn't in "strength order" and there 53910Sstevel@tonic-gate was a missing NULL in the AlgorithmIdentifier for the SHA1 signature 53920Sstevel@tonic-gate algorithm. 53930Sstevel@tonic-gate [Steve Henson] 53940Sstevel@tonic-gate 53950Sstevel@tonic-gate *) Some ASN1 types with illegal zero length encoding (INTEGER, 53960Sstevel@tonic-gate ENUMERATED and OBJECT IDENTIFIER) choked the ASN1 routines. 53970Sstevel@tonic-gate [Frans Heymans <fheymans@isaserver.be>, modified by Steve Henson] 53980Sstevel@tonic-gate 53990Sstevel@tonic-gate *) Merge in my S/MIME library for OpenSSL. This provides a simple 54000Sstevel@tonic-gate S/MIME API on top of the PKCS#7 code, a MIME parser (with enough 54010Sstevel@tonic-gate functionality to handle multipart/signed properly) and a utility 54020Sstevel@tonic-gate called 'smime' to call all this stuff. This is based on code I 54030Sstevel@tonic-gate originally wrote for Celo who have kindly allowed it to be 54040Sstevel@tonic-gate included in OpenSSL. 54050Sstevel@tonic-gate [Steve Henson] 54060Sstevel@tonic-gate 54070Sstevel@tonic-gate *) Add variants des_set_key_checked and des_set_key_unchecked of 54080Sstevel@tonic-gate des_set_key (aka des_key_sched). Global variable des_check_key 54090Sstevel@tonic-gate decides which of these is called by des_set_key; this way 54100Sstevel@tonic-gate des_check_key behaves as it always did, but applications and 54110Sstevel@tonic-gate the library itself, which was buggy for des_check_key == 1, 54120Sstevel@tonic-gate have a cleaner way to pick the version they need. 54130Sstevel@tonic-gate [Bodo Moeller] 54140Sstevel@tonic-gate 54150Sstevel@tonic-gate *) New function PKCS12_newpass() which changes the password of a 54160Sstevel@tonic-gate PKCS12 structure. 54170Sstevel@tonic-gate [Steve Henson] 54180Sstevel@tonic-gate 54190Sstevel@tonic-gate *) Modify X509_TRUST and X509_PURPOSE so it also uses a static and 54200Sstevel@tonic-gate dynamic mix. In both cases the ids can be used as an index into the 54210Sstevel@tonic-gate table. Also modified the X509_TRUST_add() and X509_PURPOSE_add() 54220Sstevel@tonic-gate functions so they accept a list of the field values and the 54230Sstevel@tonic-gate application doesn't need to directly manipulate the X509_TRUST 54240Sstevel@tonic-gate structure. 54250Sstevel@tonic-gate [Steve Henson] 54260Sstevel@tonic-gate 54270Sstevel@tonic-gate *) Modify the ASN1_STRING_TABLE stuff so it also uses bsearch and doesn't 54280Sstevel@tonic-gate need initialising. 54290Sstevel@tonic-gate [Steve Henson] 54300Sstevel@tonic-gate 54310Sstevel@tonic-gate *) Modify the way the V3 extension code looks up extensions. This now 54320Sstevel@tonic-gate works in a similar way to the object code: we have some "standard" 54330Sstevel@tonic-gate extensions in a static table which is searched with OBJ_bsearch() 54340Sstevel@tonic-gate and the application can add dynamic ones if needed. The file 54350Sstevel@tonic-gate crypto/x509v3/ext_dat.h now has the info: this file needs to be 54360Sstevel@tonic-gate updated whenever a new extension is added to the core code and kept 54370Sstevel@tonic-gate in ext_nid order. There is a simple program 'tabtest.c' which checks 54380Sstevel@tonic-gate this. New extensions are not added too often so this file can readily 54390Sstevel@tonic-gate be maintained manually. 54400Sstevel@tonic-gate 54410Sstevel@tonic-gate There are two big advantages in doing things this way. The extensions 54420Sstevel@tonic-gate can be looked up immediately and no longer need to be "added" using 54430Sstevel@tonic-gate X509V3_add_standard_extensions(): this function now does nothing. 54440Sstevel@tonic-gate [Side note: I get *lots* of email saying the extension code doesn't 54450Sstevel@tonic-gate work because people forget to call this function] 54460Sstevel@tonic-gate Also no dynamic allocation is done unless new extensions are added: 54470Sstevel@tonic-gate so if we don't add custom extensions there is no need to call 54480Sstevel@tonic-gate X509V3_EXT_cleanup(). 54490Sstevel@tonic-gate [Steve Henson] 54500Sstevel@tonic-gate 54510Sstevel@tonic-gate *) Modify enc utility's salting as follows: make salting the default. Add a 54520Sstevel@tonic-gate magic header, so unsalted files fail gracefully instead of just decrypting 54530Sstevel@tonic-gate to garbage. This is because not salting is a big security hole, so people 54540Sstevel@tonic-gate should be discouraged from doing it. 54550Sstevel@tonic-gate [Ben Laurie] 54560Sstevel@tonic-gate 54570Sstevel@tonic-gate *) Fixes and enhancements to the 'x509' utility. It allowed a message 54580Sstevel@tonic-gate digest to be passed on the command line but it only used this 54590Sstevel@tonic-gate parameter when signing a certificate. Modified so all relevant 54600Sstevel@tonic-gate operations are affected by the digest parameter including the 54610Sstevel@tonic-gate -fingerprint and -x509toreq options. Also -x509toreq choked if a 54620Sstevel@tonic-gate DSA key was used because it didn't fix the digest. 54630Sstevel@tonic-gate [Steve Henson] 54640Sstevel@tonic-gate 54650Sstevel@tonic-gate *) Initial certificate chain verify code. Currently tests the untrusted 54660Sstevel@tonic-gate certificates for consistency with the verify purpose (which is set 54670Sstevel@tonic-gate when the X509_STORE_CTX structure is set up) and checks the pathlength. 54680Sstevel@tonic-gate 54690Sstevel@tonic-gate There is a NO_CHAIN_VERIFY compilation option to keep the old behaviour: 54700Sstevel@tonic-gate this is because it will reject chains with invalid extensions whereas 54710Sstevel@tonic-gate every previous version of OpenSSL and SSLeay made no checks at all. 54720Sstevel@tonic-gate 54730Sstevel@tonic-gate Trust code: checks the root CA for the relevant trust settings. Trust 54740Sstevel@tonic-gate settings have an initial value consistent with the verify purpose: e.g. 54750Sstevel@tonic-gate if the verify purpose is for SSL client use it expects the CA to be 54760Sstevel@tonic-gate trusted for SSL client use. However the default value can be changed to 54770Sstevel@tonic-gate permit custom trust settings: one example of this would be to only trust 54780Sstevel@tonic-gate certificates from a specific "secure" set of CAs. 54790Sstevel@tonic-gate 54800Sstevel@tonic-gate Also added X509_STORE_CTX_new() and X509_STORE_CTX_free() functions 54810Sstevel@tonic-gate which should be used for version portability: especially since the 54820Sstevel@tonic-gate verify structure is likely to change more often now. 54830Sstevel@tonic-gate 54840Sstevel@tonic-gate SSL integration. Add purpose and trust to SSL_CTX and SSL and functions 54850Sstevel@tonic-gate to set them. If not set then assume SSL clients will verify SSL servers 54860Sstevel@tonic-gate and vice versa. 54870Sstevel@tonic-gate 54880Sstevel@tonic-gate Two new options to the verify program: -untrusted allows a set of 54890Sstevel@tonic-gate untrusted certificates to be passed in and -purpose which sets the 54900Sstevel@tonic-gate intended purpose of the certificate. If a purpose is set then the 54910Sstevel@tonic-gate new chain verify code is used to check extension consistency. 54920Sstevel@tonic-gate [Steve Henson] 54930Sstevel@tonic-gate 54940Sstevel@tonic-gate *) Support for the authority information access extension. 54950Sstevel@tonic-gate [Steve Henson] 54960Sstevel@tonic-gate 54970Sstevel@tonic-gate *) Modify RSA and DSA PEM read routines to transparently handle 54980Sstevel@tonic-gate PKCS#8 format private keys. New *_PUBKEY_* functions that handle 54990Sstevel@tonic-gate public keys in a format compatible with certificate 55000Sstevel@tonic-gate SubjectPublicKeyInfo structures. Unfortunately there were already 55010Sstevel@tonic-gate functions called *_PublicKey_* which used various odd formats so 55020Sstevel@tonic-gate these are retained for compatibility: however the DSA variants were 55030Sstevel@tonic-gate never in a public release so they have been deleted. Changed dsa/rsa 55040Sstevel@tonic-gate utilities to handle the new format: note no releases ever handled public 55050Sstevel@tonic-gate keys so we should be OK. 55060Sstevel@tonic-gate 55070Sstevel@tonic-gate The primary motivation for this change is to avoid the same fiasco 55080Sstevel@tonic-gate that dogs private keys: there are several incompatible private key 55090Sstevel@tonic-gate formats some of which are standard and some OpenSSL specific and 55100Sstevel@tonic-gate require various evil hacks to allow partial transparent handling and 55110Sstevel@tonic-gate even then it doesn't work with DER formats. Given the option anything 55120Sstevel@tonic-gate other than PKCS#8 should be dumped: but the other formats have to 55130Sstevel@tonic-gate stay in the name of compatibility. 55140Sstevel@tonic-gate 55150Sstevel@tonic-gate With public keys and the benefit of hindsight one standard format 55160Sstevel@tonic-gate is used which works with EVP_PKEY, RSA or DSA structures: though 55170Sstevel@tonic-gate it clearly returns an error if you try to read the wrong kind of key. 55180Sstevel@tonic-gate 55190Sstevel@tonic-gate Added a -pubkey option to the 'x509' utility to output the public key. 55200Sstevel@tonic-gate Also rename the EVP_PKEY_get_*() to EVP_PKEY_rget_*() 55210Sstevel@tonic-gate (renamed to EVP_PKEY_get1_*() in the OpenSSL 0.9.5 release) and add 55220Sstevel@tonic-gate EVP_PKEY_rset_*() functions (renamed to EVP_PKEY_set1_*()) 55230Sstevel@tonic-gate that do the same as the EVP_PKEY_assign_*() except they up the 55240Sstevel@tonic-gate reference count of the added key (they don't "swallow" the 55250Sstevel@tonic-gate supplied key). 55260Sstevel@tonic-gate [Steve Henson] 55270Sstevel@tonic-gate 55280Sstevel@tonic-gate *) Fixes to crypto/x509/by_file.c the code to read in certificates and 55290Sstevel@tonic-gate CRLs would fail if the file contained no certificates or no CRLs: 55300Sstevel@tonic-gate added a new function to read in both types and return the number 55310Sstevel@tonic-gate read: this means that if none are read it will be an error. The 55320Sstevel@tonic-gate DER versions of the certificate and CRL reader would always fail 55330Sstevel@tonic-gate because it isn't possible to mix certificates and CRLs in DER format 55340Sstevel@tonic-gate without choking one or the other routine. Changed this to just read 55350Sstevel@tonic-gate a certificate: this is the best we can do. Also modified the code 55360Sstevel@tonic-gate in apps/verify.c to take notice of return codes: it was previously 55370Sstevel@tonic-gate attempting to read in certificates from NULL pointers and ignoring 55380Sstevel@tonic-gate any errors: this is one reason why the cert and CRL reader seemed 55390Sstevel@tonic-gate to work. It doesn't check return codes from the default certificate 55400Sstevel@tonic-gate routines: these may well fail if the certificates aren't installed. 55410Sstevel@tonic-gate [Steve Henson] 55420Sstevel@tonic-gate 55430Sstevel@tonic-gate *) Code to support otherName option in GeneralName. 55440Sstevel@tonic-gate [Steve Henson] 55450Sstevel@tonic-gate 55460Sstevel@tonic-gate *) First update to verify code. Change the verify utility 55470Sstevel@tonic-gate so it warns if it is passed a self signed certificate: 55480Sstevel@tonic-gate for consistency with the normal behaviour. X509_verify 55490Sstevel@tonic-gate has been modified to it will now verify a self signed 55500Sstevel@tonic-gate certificate if *exactly* the same certificate appears 55510Sstevel@tonic-gate in the store: it was previously impossible to trust a 55520Sstevel@tonic-gate single self signed certificate. This means that: 55530Sstevel@tonic-gate openssl verify ss.pem 55540Sstevel@tonic-gate now gives a warning about a self signed certificate but 55550Sstevel@tonic-gate openssl verify -CAfile ss.pem ss.pem 55560Sstevel@tonic-gate is OK. 55570Sstevel@tonic-gate [Steve Henson] 55580Sstevel@tonic-gate 55590Sstevel@tonic-gate *) For servers, store verify_result in SSL_SESSION data structure 55600Sstevel@tonic-gate (and add it to external session representation). 55610Sstevel@tonic-gate This is needed when client certificate verifications fails, 55620Sstevel@tonic-gate but an application-provided verification callback (set by 55630Sstevel@tonic-gate SSL_CTX_set_cert_verify_callback) allows accepting the session 55640Sstevel@tonic-gate anyway (i.e. leaves x509_store_ctx->error != X509_V_OK 55650Sstevel@tonic-gate but returns 1): When the session is reused, we have to set 55660Sstevel@tonic-gate ssl->verify_result to the appropriate error code to avoid 55670Sstevel@tonic-gate security holes. 55680Sstevel@tonic-gate [Bodo Moeller, problem pointed out by Lutz Jaenicke] 55690Sstevel@tonic-gate 55700Sstevel@tonic-gate *) Fix a bug in the new PKCS#7 code: it didn't consider the 55710Sstevel@tonic-gate case in PKCS7_dataInit() where the signed PKCS7 structure 55720Sstevel@tonic-gate didn't contain any existing data because it was being created. 55730Sstevel@tonic-gate [Po-Cheng Chen <pocheng@nst.com.tw>, slightly modified by Steve Henson] 55740Sstevel@tonic-gate 55750Sstevel@tonic-gate *) Add a salt to the key derivation routines in enc.c. This 55760Sstevel@tonic-gate forms the first 8 bytes of the encrypted file. Also add a 55770Sstevel@tonic-gate -S option to allow a salt to be input on the command line. 55780Sstevel@tonic-gate [Steve Henson] 55790Sstevel@tonic-gate 55800Sstevel@tonic-gate *) New function X509_cmp(). Oddly enough there wasn't a function 55810Sstevel@tonic-gate to compare two certificates. We do this by working out the SHA1 55820Sstevel@tonic-gate hash and comparing that. X509_cmp() will be needed by the trust 55830Sstevel@tonic-gate code. 55840Sstevel@tonic-gate [Steve Henson] 55850Sstevel@tonic-gate 55860Sstevel@tonic-gate *) SSL_get1_session() is like SSL_get_session(), but increments 55870Sstevel@tonic-gate the reference count in the SSL_SESSION returned. 55880Sstevel@tonic-gate [Geoff Thorpe <geoff@eu.c2.net>] 55890Sstevel@tonic-gate 55900Sstevel@tonic-gate *) Fix for 'req': it was adding a null to request attributes. 55910Sstevel@tonic-gate Also change the X509_LOOKUP and X509_INFO code to handle 55920Sstevel@tonic-gate certificate auxiliary information. 55930Sstevel@tonic-gate [Steve Henson] 55940Sstevel@tonic-gate 55950Sstevel@tonic-gate *) Add support for 40 and 64 bit RC2 and RC4 algorithms: document 55960Sstevel@tonic-gate the 'enc' command. 55970Sstevel@tonic-gate [Steve Henson] 55980Sstevel@tonic-gate 55990Sstevel@tonic-gate *) Add the possibility to add extra information to the memory leak 56000Sstevel@tonic-gate detecting output, to form tracebacks, showing from where each 56010Sstevel@tonic-gate allocation was originated: CRYPTO_push_info("constant string") adds 56020Sstevel@tonic-gate the string plus current file name and line number to a per-thread 56030Sstevel@tonic-gate stack, CRYPTO_pop_info() does the obvious, CRYPTO_remove_all_info() 56040Sstevel@tonic-gate is like calling CYRPTO_pop_info() until the stack is empty. 56050Sstevel@tonic-gate Also updated memory leak detection code to be multi-thread-safe. 56060Sstevel@tonic-gate [Richard Levitte] 56070Sstevel@tonic-gate 56080Sstevel@tonic-gate *) Add options -text and -noout to pkcs7 utility and delete the 56090Sstevel@tonic-gate encryption options which never did anything. Update docs. 56100Sstevel@tonic-gate [Steve Henson] 56110Sstevel@tonic-gate 56120Sstevel@tonic-gate *) Add options to some of the utilities to allow the pass phrase 56130Sstevel@tonic-gate to be included on either the command line (not recommended on 56140Sstevel@tonic-gate OSes like Unix) or read from the environment. Update the 56150Sstevel@tonic-gate manpages and fix a few bugs. 56160Sstevel@tonic-gate [Steve Henson] 56170Sstevel@tonic-gate 56180Sstevel@tonic-gate *) Add a few manpages for some of the openssl commands. 56190Sstevel@tonic-gate [Steve Henson] 56200Sstevel@tonic-gate 56210Sstevel@tonic-gate *) Fix the -revoke option in ca. It was freeing up memory twice, 56220Sstevel@tonic-gate leaking and not finding already revoked certificates. 56230Sstevel@tonic-gate [Steve Henson] 56240Sstevel@tonic-gate 56250Sstevel@tonic-gate *) Extensive changes to support certificate auxiliary information. 56260Sstevel@tonic-gate This involves the use of X509_CERT_AUX structure and X509_AUX 56270Sstevel@tonic-gate functions. An X509_AUX function such as PEM_read_X509_AUX() 56280Sstevel@tonic-gate can still read in a certificate file in the usual way but it 56290Sstevel@tonic-gate will also read in any additional "auxiliary information". By 56300Sstevel@tonic-gate doing things this way a fair degree of compatibility can be 56310Sstevel@tonic-gate retained: existing certificates can have this information added 56320Sstevel@tonic-gate using the new 'x509' options. 56330Sstevel@tonic-gate 56340Sstevel@tonic-gate Current auxiliary information includes an "alias" and some trust 56350Sstevel@tonic-gate settings. The trust settings will ultimately be used in enhanced 56360Sstevel@tonic-gate certificate chain verification routines: currently a certificate 56370Sstevel@tonic-gate can only be trusted if it is self signed and then it is trusted 56380Sstevel@tonic-gate for all purposes. 56390Sstevel@tonic-gate [Steve Henson] 56400Sstevel@tonic-gate 56410Sstevel@tonic-gate *) Fix assembler for Alpha (tested only on DEC OSF not Linux or *BSD). 56420Sstevel@tonic-gate The problem was that one of the replacement routines had not been working 56430Sstevel@tonic-gate since SSLeay releases. For now the offending routine has been replaced 56440Sstevel@tonic-gate with non-optimised assembler. Even so, this now gives around 95% 56450Sstevel@tonic-gate performance improvement for 1024 bit RSA signs. 56460Sstevel@tonic-gate [Mark Cox] 56470Sstevel@tonic-gate 56480Sstevel@tonic-gate *) Hack to fix PKCS#7 decryption when used with some unorthodox RC2 56490Sstevel@tonic-gate handling. Most clients have the effective key size in bits equal to 56500Sstevel@tonic-gate the key length in bits: so a 40 bit RC2 key uses a 40 bit (5 byte) key. 56510Sstevel@tonic-gate A few however don't do this and instead use the size of the decrypted key 56520Sstevel@tonic-gate to determine the RC2 key length and the AlgorithmIdentifier to determine 56530Sstevel@tonic-gate the effective key length. In this case the effective key length can still 56540Sstevel@tonic-gate be 40 bits but the key length can be 168 bits for example. This is fixed 56550Sstevel@tonic-gate by manually forcing an RC2 key into the EVP_PKEY structure because the 56560Sstevel@tonic-gate EVP code can't currently handle unusual RC2 key sizes: it always assumes 56570Sstevel@tonic-gate the key length and effective key length are equal. 56580Sstevel@tonic-gate [Steve Henson] 56590Sstevel@tonic-gate 56600Sstevel@tonic-gate *) Add a bunch of functions that should simplify the creation of 56610Sstevel@tonic-gate X509_NAME structures. Now you should be able to do: 56620Sstevel@tonic-gate X509_NAME_add_entry_by_txt(nm, "CN", MBSTRING_ASC, "Steve", -1, -1, 0); 56630Sstevel@tonic-gate and have it automatically work out the correct field type and fill in 56640Sstevel@tonic-gate the structures. The more adventurous can try: 56650Sstevel@tonic-gate X509_NAME_add_entry_by_txt(nm, field, MBSTRING_UTF8, str, -1, -1, 0); 56660Sstevel@tonic-gate and it will (hopefully) work out the correct multibyte encoding. 56670Sstevel@tonic-gate [Steve Henson] 56680Sstevel@tonic-gate 56690Sstevel@tonic-gate *) Change the 'req' utility to use the new field handling and multibyte 56700Sstevel@tonic-gate copy routines. Before the DN field creation was handled in an ad hoc 56710Sstevel@tonic-gate way in req, ca, and x509 which was rather broken and didn't support 56720Sstevel@tonic-gate BMPStrings or UTF8Strings. Since some software doesn't implement 56730Sstevel@tonic-gate BMPStrings or UTF8Strings yet, they can be enabled using the config file 56740Sstevel@tonic-gate using the dirstring_type option. See the new comment in the default 56750Sstevel@tonic-gate openssl.cnf for more info. 56760Sstevel@tonic-gate [Steve Henson] 56770Sstevel@tonic-gate 56780Sstevel@tonic-gate *) Make crypto/rand/md_rand.c more robust: 56790Sstevel@tonic-gate - Assure unique random numbers after fork(). 56800Sstevel@tonic-gate - Make sure that concurrent threads access the global counter and 56810Sstevel@tonic-gate md serializably so that we never lose entropy in them 56820Sstevel@tonic-gate or use exactly the same state in multiple threads. 56830Sstevel@tonic-gate Access to the large state is not always serializable because 56840Sstevel@tonic-gate the additional locking could be a performance killer, and 56850Sstevel@tonic-gate md should be large enough anyway. 56860Sstevel@tonic-gate [Bodo Moeller] 56870Sstevel@tonic-gate 56880Sstevel@tonic-gate *) New file apps/app_rand.c with commonly needed functionality 56890Sstevel@tonic-gate for handling the random seed file. 56900Sstevel@tonic-gate 56910Sstevel@tonic-gate Use the random seed file in some applications that previously did not: 56920Sstevel@tonic-gate ca, 56930Sstevel@tonic-gate dsaparam -genkey (which also ignored its '-rand' option), 56940Sstevel@tonic-gate s_client, 56950Sstevel@tonic-gate s_server, 56960Sstevel@tonic-gate x509 (when signing). 56970Sstevel@tonic-gate Except on systems with /dev/urandom, it is crucial to have a random 56980Sstevel@tonic-gate seed file at least for key creation, DSA signing, and for DH exchanges; 56990Sstevel@tonic-gate for RSA signatures we could do without one. 57000Sstevel@tonic-gate 57010Sstevel@tonic-gate gendh and gendsa (unlike genrsa) used to read only the first byte 57020Sstevel@tonic-gate of each file listed in the '-rand' option. The function as previously 57030Sstevel@tonic-gate found in genrsa is now in app_rand.c and is used by all programs 57040Sstevel@tonic-gate that support '-rand'. 57050Sstevel@tonic-gate [Bodo Moeller] 57060Sstevel@tonic-gate 57070Sstevel@tonic-gate *) In RAND_write_file, use mode 0600 for creating files; 57080Sstevel@tonic-gate don't just chmod when it may be too late. 57090Sstevel@tonic-gate [Bodo Moeller] 57100Sstevel@tonic-gate 57110Sstevel@tonic-gate *) Report an error from X509_STORE_load_locations 57120Sstevel@tonic-gate when X509_LOOKUP_load_file or X509_LOOKUP_add_dir failed. 57130Sstevel@tonic-gate [Bill Perry] 57140Sstevel@tonic-gate 57150Sstevel@tonic-gate *) New function ASN1_mbstring_copy() this copies a string in either 57160Sstevel@tonic-gate ASCII, Unicode, Universal (4 bytes per character) or UTF8 format 57170Sstevel@tonic-gate into an ASN1_STRING type. A mask of permissible types is passed 57180Sstevel@tonic-gate and it chooses the "minimal" type to use or an error if not type 57190Sstevel@tonic-gate is suitable. 57200Sstevel@tonic-gate [Steve Henson] 57210Sstevel@tonic-gate 57220Sstevel@tonic-gate *) Add function equivalents to the various macros in asn1.h. The old 57230Sstevel@tonic-gate macros are retained with an M_ prefix. Code inside the library can 57240Sstevel@tonic-gate use the M_ macros. External code (including the openssl utility) 57250Sstevel@tonic-gate should *NOT* in order to be "shared library friendly". 57260Sstevel@tonic-gate [Steve Henson] 57270Sstevel@tonic-gate 57280Sstevel@tonic-gate *) Add various functions that can check a certificate's extensions 57290Sstevel@tonic-gate to see if it usable for various purposes such as SSL client, 57300Sstevel@tonic-gate server or S/MIME and CAs of these types. This is currently 57310Sstevel@tonic-gate VERY EXPERIMENTAL but will ultimately be used for certificate chain 57320Sstevel@tonic-gate verification. Also added a -purpose flag to x509 utility to 57330Sstevel@tonic-gate print out all the purposes. 57340Sstevel@tonic-gate [Steve Henson] 57350Sstevel@tonic-gate 57360Sstevel@tonic-gate *) Add a CRYPTO_EX_DATA to X509 certificate structure and associated 57370Sstevel@tonic-gate functions. 57380Sstevel@tonic-gate [Steve Henson] 57390Sstevel@tonic-gate 57400Sstevel@tonic-gate *) New X509V3_{X509,CRL,REVOKED}_get_d2i() functions. These will search 57410Sstevel@tonic-gate for, obtain and decode and extension and obtain its critical flag. 57420Sstevel@tonic-gate This allows all the necessary extension code to be handled in a 57430Sstevel@tonic-gate single function call. 57440Sstevel@tonic-gate [Steve Henson] 57450Sstevel@tonic-gate 57460Sstevel@tonic-gate *) RC4 tune-up featuring 30-40% performance improvement on most RISC 57470Sstevel@tonic-gate platforms. See crypto/rc4/rc4_enc.c for further details. 57480Sstevel@tonic-gate [Andy Polyakov] 57490Sstevel@tonic-gate 57500Sstevel@tonic-gate *) New -noout option to asn1parse. This causes no output to be produced 57510Sstevel@tonic-gate its main use is when combined with -strparse and -out to extract data 57520Sstevel@tonic-gate from a file (which may not be in ASN.1 format). 57530Sstevel@tonic-gate [Steve Henson] 57540Sstevel@tonic-gate 57550Sstevel@tonic-gate *) Fix for pkcs12 program. It was hashing an invalid certificate pointer 57560Sstevel@tonic-gate when producing the local key id. 57570Sstevel@tonic-gate [Richard Levitte <levitte@stacken.kth.se>] 57580Sstevel@tonic-gate 57590Sstevel@tonic-gate *) New option -dhparam in s_server. This allows a DH parameter file to be 57600Sstevel@tonic-gate stated explicitly. If it is not stated then it tries the first server 57610Sstevel@tonic-gate certificate file. The previous behaviour hard coded the filename 57620Sstevel@tonic-gate "server.pem". 57630Sstevel@tonic-gate [Steve Henson] 57640Sstevel@tonic-gate 57650Sstevel@tonic-gate *) Add -pubin and -pubout options to the rsa and dsa commands. These allow 57660Sstevel@tonic-gate a public key to be input or output. For example: 57670Sstevel@tonic-gate openssl rsa -in key.pem -pubout -out pubkey.pem 57680Sstevel@tonic-gate Also added necessary DSA public key functions to handle this. 57690Sstevel@tonic-gate [Steve Henson] 57700Sstevel@tonic-gate 57710Sstevel@tonic-gate *) Fix so PKCS7_dataVerify() doesn't crash if no certificates are contained 57720Sstevel@tonic-gate in the message. This was handled by allowing 57730Sstevel@tonic-gate X509_find_by_issuer_and_serial() to tolerate a NULL passed to it. 57740Sstevel@tonic-gate [Steve Henson, reported by Sampo Kellomaki <sampo@mail.neuronio.pt>] 57750Sstevel@tonic-gate 57760Sstevel@tonic-gate *) Fix for bug in d2i_ASN1_bytes(): other ASN1 functions add an extra null 57770Sstevel@tonic-gate to the end of the strings whereas this didn't. This would cause problems 57780Sstevel@tonic-gate if strings read with d2i_ASN1_bytes() were later modified. 57790Sstevel@tonic-gate [Steve Henson, reported by Arne Ansper <arne@ats.cyber.ee>] 57800Sstevel@tonic-gate 57810Sstevel@tonic-gate *) Fix for base64 decode bug. When a base64 bio reads only one line of 57820Sstevel@tonic-gate data and it contains EOF it will end up returning an error. This is 57830Sstevel@tonic-gate caused by input 46 bytes long. The cause is due to the way base64 57840Sstevel@tonic-gate BIOs find the start of base64 encoded data. They do this by trying a 57850Sstevel@tonic-gate trial decode on each line until they find one that works. When they 57860Sstevel@tonic-gate do a flag is set and it starts again knowing it can pass all the 57870Sstevel@tonic-gate data directly through the decoder. Unfortunately it doesn't reset 57880Sstevel@tonic-gate the context it uses. This means that if EOF is reached an attempt 57890Sstevel@tonic-gate is made to pass two EOFs through the context and this causes the 57900Sstevel@tonic-gate resulting error. This can also cause other problems as well. As is 57910Sstevel@tonic-gate usual with these problems it takes *ages* to find and the fix is 57920Sstevel@tonic-gate trivial: move one line. 57930Sstevel@tonic-gate [Steve Henson, reported by ian@uns.ns.ac.yu (Ivan Nejgebauer) ] 57940Sstevel@tonic-gate 57950Sstevel@tonic-gate *) Ugly workaround to get s_client and s_server working under Windows. The 57960Sstevel@tonic-gate old code wouldn't work because it needed to select() on sockets and the 57970Sstevel@tonic-gate tty (for keypresses and to see if data could be written). Win32 only 57980Sstevel@tonic-gate supports select() on sockets so we select() with a 1s timeout on the 57990Sstevel@tonic-gate sockets and then see if any characters are waiting to be read, if none 58000Sstevel@tonic-gate are present then we retry, we also assume we can always write data to 58010Sstevel@tonic-gate the tty. This isn't nice because the code then blocks until we've 58020Sstevel@tonic-gate received a complete line of data and it is effectively polling the 58030Sstevel@tonic-gate keyboard at 1s intervals: however it's quite a bit better than not 58040Sstevel@tonic-gate working at all :-) A dedicated Windows application might handle this 58050Sstevel@tonic-gate with an event loop for example. 58060Sstevel@tonic-gate [Steve Henson] 58070Sstevel@tonic-gate 58080Sstevel@tonic-gate *) Enhance RSA_METHOD structure. Now there are two extra methods, rsa_sign 58090Sstevel@tonic-gate and rsa_verify. When the RSA_FLAGS_SIGN_VER option is set these functions 58100Sstevel@tonic-gate will be called when RSA_sign() and RSA_verify() are used. This is useful 58110Sstevel@tonic-gate if rsa_pub_dec() and rsa_priv_enc() equivalents are not available. 58120Sstevel@tonic-gate For this to work properly RSA_public_decrypt() and RSA_private_encrypt() 58130Sstevel@tonic-gate should *not* be used: RSA_sign() and RSA_verify() must be used instead. 58140Sstevel@tonic-gate This necessitated the support of an extra signature type NID_md5_sha1 58150Sstevel@tonic-gate for SSL signatures and modifications to the SSL library to use it instead 58160Sstevel@tonic-gate of calling RSA_public_decrypt() and RSA_private_encrypt(). 58170Sstevel@tonic-gate [Steve Henson] 58180Sstevel@tonic-gate 58190Sstevel@tonic-gate *) Add new -verify -CAfile and -CApath options to the crl program, these 58200Sstevel@tonic-gate will lookup a CRL issuers certificate and verify the signature in a 58210Sstevel@tonic-gate similar way to the verify program. Tidy up the crl program so it 58220Sstevel@tonic-gate no longer accesses structures directly. Make the ASN1 CRL parsing a bit 58230Sstevel@tonic-gate less strict. It will now permit CRL extensions even if it is not 58240Sstevel@tonic-gate a V2 CRL: this will allow it to tolerate some broken CRLs. 58250Sstevel@tonic-gate [Steve Henson] 58260Sstevel@tonic-gate 58270Sstevel@tonic-gate *) Initialize all non-automatic variables each time one of the openssl 58280Sstevel@tonic-gate sub-programs is started (this is necessary as they may be started 58290Sstevel@tonic-gate multiple times from the "OpenSSL>" prompt). 58300Sstevel@tonic-gate [Lennart Bang, Bodo Moeller] 58310Sstevel@tonic-gate 58320Sstevel@tonic-gate *) Preliminary compilation option RSA_NULL which disables RSA crypto without 58330Sstevel@tonic-gate removing all other RSA functionality (this is what NO_RSA does). This 58340Sstevel@tonic-gate is so (for example) those in the US can disable those operations covered 58350Sstevel@tonic-gate by the RSA patent while allowing storage and parsing of RSA keys and RSA 58360Sstevel@tonic-gate key generation. 58370Sstevel@tonic-gate [Steve Henson] 58380Sstevel@tonic-gate 58390Sstevel@tonic-gate *) Non-copying interface to BIO pairs. 58400Sstevel@tonic-gate (still largely untested) 58410Sstevel@tonic-gate [Bodo Moeller] 58420Sstevel@tonic-gate 58430Sstevel@tonic-gate *) New function ANS1_tag2str() to convert an ASN1 tag to a descriptive 58440Sstevel@tonic-gate ASCII string. This was handled independently in various places before. 58450Sstevel@tonic-gate [Steve Henson] 58460Sstevel@tonic-gate 58470Sstevel@tonic-gate *) New functions UTF8_getc() and UTF8_putc() that parse and generate 58480Sstevel@tonic-gate UTF8 strings a character at a time. 58490Sstevel@tonic-gate [Steve Henson] 58500Sstevel@tonic-gate 58510Sstevel@tonic-gate *) Use client_version from client hello to select the protocol 58520Sstevel@tonic-gate (s23_srvr.c) and for RSA client key exchange verification 58530Sstevel@tonic-gate (s3_srvr.c), as required by the SSL 3.0/TLS 1.0 specifications. 58540Sstevel@tonic-gate [Bodo Moeller] 58550Sstevel@tonic-gate 58560Sstevel@tonic-gate *) Add various utility functions to handle SPKACs, these were previously 58570Sstevel@tonic-gate handled by poking round in the structure internals. Added new function 58580Sstevel@tonic-gate NETSCAPE_SPKI_print() to print out SPKAC and a new utility 'spkac' to 58590Sstevel@tonic-gate print, verify and generate SPKACs. Based on an original idea from 58600Sstevel@tonic-gate Massimiliano Pala <madwolf@comune.modena.it> but extensively modified. 58610Sstevel@tonic-gate [Steve Henson] 58620Sstevel@tonic-gate 58630Sstevel@tonic-gate *) RIPEMD160 is operational on all platforms and is back in 'make test'. 58640Sstevel@tonic-gate [Andy Polyakov] 58650Sstevel@tonic-gate 58660Sstevel@tonic-gate *) Allow the config file extension section to be overwritten on the 58670Sstevel@tonic-gate command line. Based on an original idea from Massimiliano Pala 58680Sstevel@tonic-gate <madwolf@comune.modena.it>. The new option is called -extensions 58690Sstevel@tonic-gate and can be applied to ca, req and x509. Also -reqexts to override 58700Sstevel@tonic-gate the request extensions in req and -crlexts to override the crl extensions 58710Sstevel@tonic-gate in ca. 58720Sstevel@tonic-gate [Steve Henson] 58730Sstevel@tonic-gate 58740Sstevel@tonic-gate *) Add new feature to the SPKAC handling in ca. Now you can include 58750Sstevel@tonic-gate the same field multiple times by preceding it by "XXXX." for example: 58760Sstevel@tonic-gate 1.OU="Unit name 1" 58770Sstevel@tonic-gate 2.OU="Unit name 2" 58780Sstevel@tonic-gate this is the same syntax as used in the req config file. 58790Sstevel@tonic-gate [Steve Henson] 58800Sstevel@tonic-gate 58810Sstevel@tonic-gate *) Allow certificate extensions to be added to certificate requests. These 58820Sstevel@tonic-gate are specified in a 'req_extensions' option of the req section of the 58830Sstevel@tonic-gate config file. They can be printed out with the -text option to req but 58840Sstevel@tonic-gate are otherwise ignored at present. 58850Sstevel@tonic-gate [Steve Henson] 58860Sstevel@tonic-gate 58870Sstevel@tonic-gate *) Fix a horrible bug in enc_read() in crypto/evp/bio_enc.c: if the first 58880Sstevel@tonic-gate data read consists of only the final block it would not decrypted because 58890Sstevel@tonic-gate EVP_CipherUpdate() would correctly report zero bytes had been decrypted. 58900Sstevel@tonic-gate A misplaced 'break' also meant the decrypted final block might not be 58910Sstevel@tonic-gate copied until the next read. 58920Sstevel@tonic-gate [Steve Henson] 58930Sstevel@tonic-gate 58940Sstevel@tonic-gate *) Initial support for DH_METHOD. Again based on RSA_METHOD. Also added 58950Sstevel@tonic-gate a few extra parameters to the DH structure: these will be useful if 58960Sstevel@tonic-gate for example we want the value of 'q' or implement X9.42 DH. 58970Sstevel@tonic-gate [Steve Henson] 58980Sstevel@tonic-gate 58990Sstevel@tonic-gate *) Initial support for DSA_METHOD. This is based on the RSA_METHOD and 59000Sstevel@tonic-gate provides hooks that allow the default DSA functions or functions on a 59010Sstevel@tonic-gate "per key" basis to be replaced. This allows hardware acceleration and 59020Sstevel@tonic-gate hardware key storage to be handled without major modification to the 59030Sstevel@tonic-gate library. Also added low level modexp hooks and CRYPTO_EX structure and 59040Sstevel@tonic-gate associated functions. 59050Sstevel@tonic-gate [Steve Henson] 59060Sstevel@tonic-gate 59070Sstevel@tonic-gate *) Add a new flag to memory BIOs, BIO_FLAG_MEM_RDONLY. This marks the BIO 59080Sstevel@tonic-gate as "read only": it can't be written to and the buffer it points to will 59090Sstevel@tonic-gate not be freed. Reading from a read only BIO is much more efficient than 59100Sstevel@tonic-gate a normal memory BIO. This was added because there are several times when 59110Sstevel@tonic-gate an area of memory needs to be read from a BIO. The previous method was 59120Sstevel@tonic-gate to create a memory BIO and write the data to it, this results in two 59130Sstevel@tonic-gate copies of the data and an O(n^2) reading algorithm. There is a new 59140Sstevel@tonic-gate function BIO_new_mem_buf() which creates a read only memory BIO from 59150Sstevel@tonic-gate an area of memory. Also modified the PKCS#7 routines to use read only 59160Sstevel@tonic-gate memory BIOs. 59170Sstevel@tonic-gate [Steve Henson] 59180Sstevel@tonic-gate 59190Sstevel@tonic-gate *) Bugfix: ssl23_get_client_hello did not work properly when called in 59200Sstevel@tonic-gate state SSL23_ST_SR_CLNT_HELLO_B, i.e. when the first 7 bytes of 59210Sstevel@tonic-gate a SSLv2-compatible client hello for SSLv3 or TLSv1 could be read, 59220Sstevel@tonic-gate but a retry condition occured while trying to read the rest. 59230Sstevel@tonic-gate [Bodo Moeller] 59240Sstevel@tonic-gate 59250Sstevel@tonic-gate *) The PKCS7_ENC_CONTENT_new() function was setting the content type as 59260Sstevel@tonic-gate NID_pkcs7_encrypted by default: this was wrong since this should almost 59270Sstevel@tonic-gate always be NID_pkcs7_data. Also modified the PKCS7_set_type() to handle 59280Sstevel@tonic-gate the encrypted data type: this is a more sensible place to put it and it 59290Sstevel@tonic-gate allows the PKCS#12 code to be tidied up that duplicated this 59300Sstevel@tonic-gate functionality. 59310Sstevel@tonic-gate [Steve Henson] 59320Sstevel@tonic-gate 59330Sstevel@tonic-gate *) Changed obj_dat.pl script so it takes its input and output files on 59340Sstevel@tonic-gate the command line. This should avoid shell escape redirection problems 59350Sstevel@tonic-gate under Win32. 59360Sstevel@tonic-gate [Steve Henson] 59370Sstevel@tonic-gate 59380Sstevel@tonic-gate *) Initial support for certificate extension requests, these are included 59390Sstevel@tonic-gate in things like Xenroll certificate requests. Included functions to allow 59400Sstevel@tonic-gate extensions to be obtained and added. 59410Sstevel@tonic-gate [Steve Henson] 59420Sstevel@tonic-gate 59430Sstevel@tonic-gate *) -crlf option to s_client and s_server for sending newlines as 59440Sstevel@tonic-gate CRLF (as required by many protocols). 59450Sstevel@tonic-gate [Bodo Moeller] 59460Sstevel@tonic-gate 59470Sstevel@tonic-gate Changes between 0.9.3a and 0.9.4 [09 Aug 1999] 59480Sstevel@tonic-gate 59490Sstevel@tonic-gate *) Install libRSAglue.a when OpenSSL is built with RSAref. 59500Sstevel@tonic-gate [Ralf S. Engelschall] 59510Sstevel@tonic-gate 59520Sstevel@tonic-gate *) A few more ``#ifndef NO_FP_API / #endif'' pairs for consistency. 59530Sstevel@tonic-gate [Andrija Antonijevic <TheAntony2@bigfoot.com>] 59540Sstevel@tonic-gate 59550Sstevel@tonic-gate *) Fix -startdate and -enddate (which was missing) arguments to 'ca' 59560Sstevel@tonic-gate program. 59570Sstevel@tonic-gate [Steve Henson] 59580Sstevel@tonic-gate 59590Sstevel@tonic-gate *) New function DSA_dup_DH, which duplicates DSA parameters/keys as 59600Sstevel@tonic-gate DH parameters/keys (q is lost during that conversion, but the resulting 59610Sstevel@tonic-gate DH parameters contain its length). 59620Sstevel@tonic-gate 59630Sstevel@tonic-gate For 1024-bit p, DSA_generate_parameters followed by DSA_dup_DH is 59640Sstevel@tonic-gate much faster than DH_generate_parameters (which creates parameters 59650Sstevel@tonic-gate where p = 2*q + 1), and also the smaller q makes DH computations 59660Sstevel@tonic-gate much more efficient (160-bit exponentiation instead of 1024-bit 59670Sstevel@tonic-gate exponentiation); so this provides a convenient way to support DHE 59680Sstevel@tonic-gate ciphersuites in SSL/TLS servers (see ssl/ssltest.c). It is of 59690Sstevel@tonic-gate utter importance to use 59700Sstevel@tonic-gate SSL_CTX_set_options(s_ctx, SSL_OP_SINGLE_DH_USE); 59710Sstevel@tonic-gate or 59720Sstevel@tonic-gate SSL_set_options(s_ctx, SSL_OP_SINGLE_DH_USE); 59730Sstevel@tonic-gate when such DH parameters are used, because otherwise small subgroup 59740Sstevel@tonic-gate attacks may become possible! 59750Sstevel@tonic-gate [Bodo Moeller] 59760Sstevel@tonic-gate 59770Sstevel@tonic-gate *) Avoid memory leak in i2d_DHparams. 59780Sstevel@tonic-gate [Bodo Moeller] 59790Sstevel@tonic-gate 59800Sstevel@tonic-gate *) Allow the -k option to be used more than once in the enc program: 59810Sstevel@tonic-gate this allows the same encrypted message to be read by multiple recipients. 59820Sstevel@tonic-gate [Steve Henson] 59830Sstevel@tonic-gate 59840Sstevel@tonic-gate *) New function OBJ_obj2txt(buf, buf_len, a, no_name), this converts 59850Sstevel@tonic-gate an ASN1_OBJECT to a text string. If the "no_name" parameter is set then 59860Sstevel@tonic-gate it will always use the numerical form of the OID, even if it has a short 59870Sstevel@tonic-gate or long name. 59880Sstevel@tonic-gate [Steve Henson] 59890Sstevel@tonic-gate 59900Sstevel@tonic-gate *) Added an extra RSA flag: RSA_FLAG_EXT_PKEY. Previously the rsa_mod_exp 59910Sstevel@tonic-gate method only got called if p,q,dmp1,dmq1,iqmp components were present, 59920Sstevel@tonic-gate otherwise bn_mod_exp was called. In the case of hardware keys for example 59930Sstevel@tonic-gate no private key components need be present and it might store extra data 59940Sstevel@tonic-gate in the RSA structure, which cannot be accessed from bn_mod_exp. 59950Sstevel@tonic-gate By setting RSA_FLAG_EXT_PKEY rsa_mod_exp will always be called for 59960Sstevel@tonic-gate private key operations. 59970Sstevel@tonic-gate [Steve Henson] 59980Sstevel@tonic-gate 59990Sstevel@tonic-gate *) Added support for SPARC Linux. 60000Sstevel@tonic-gate [Andy Polyakov] 60010Sstevel@tonic-gate 60020Sstevel@tonic-gate *) pem_password_cb function type incompatibly changed from 60030Sstevel@tonic-gate typedef int pem_password_cb(char *buf, int size, int rwflag); 60040Sstevel@tonic-gate to 60050Sstevel@tonic-gate ....(char *buf, int size, int rwflag, void *userdata); 60060Sstevel@tonic-gate so that applications can pass data to their callbacks: 60070Sstevel@tonic-gate The PEM[_ASN1]_{read,write}... functions and macros now take an 60080Sstevel@tonic-gate additional void * argument, which is just handed through whenever 60090Sstevel@tonic-gate the password callback is called. 60100Sstevel@tonic-gate [Damien Miller <dmiller@ilogic.com.au>; tiny changes by Bodo Moeller] 60110Sstevel@tonic-gate 60120Sstevel@tonic-gate New function SSL_CTX_set_default_passwd_cb_userdata. 60130Sstevel@tonic-gate 60140Sstevel@tonic-gate Compatibility note: As many C implementations push function arguments 60150Sstevel@tonic-gate onto the stack in reverse order, the new library version is likely to 60160Sstevel@tonic-gate interoperate with programs that have been compiled with the old 60170Sstevel@tonic-gate pem_password_cb definition (PEM_whatever takes some data that 60180Sstevel@tonic-gate happens to be on the stack as its last argument, and the callback 60190Sstevel@tonic-gate just ignores this garbage); but there is no guarantee whatsoever that 60200Sstevel@tonic-gate this will work. 60210Sstevel@tonic-gate 60220Sstevel@tonic-gate *) The -DPLATFORM="\"$(PLATFORM)\"" definition and the similar -DCFLAGS=... 60230Sstevel@tonic-gate (both in crypto/Makefile.ssl for use by crypto/cversion.c) caused 60240Sstevel@tonic-gate problems not only on Windows, but also on some Unix platforms. 60250Sstevel@tonic-gate To avoid problematic command lines, these definitions are now in an 60260Sstevel@tonic-gate auto-generated file crypto/buildinf.h (created by crypto/Makefile.ssl 60270Sstevel@tonic-gate for standard "make" builds, by util/mk1mf.pl for "mk1mf" builds). 60280Sstevel@tonic-gate [Bodo Moeller] 60290Sstevel@tonic-gate 60300Sstevel@tonic-gate *) MIPS III/IV assembler module is reimplemented. 60310Sstevel@tonic-gate [Andy Polyakov] 60320Sstevel@tonic-gate 60330Sstevel@tonic-gate *) More DES library cleanups: remove references to srand/rand and 60340Sstevel@tonic-gate delete an unused file. 60350Sstevel@tonic-gate [Ulf M�ller] 60360Sstevel@tonic-gate 60370Sstevel@tonic-gate *) Add support for the the free Netwide assembler (NASM) under Win32, 60380Sstevel@tonic-gate since not many people have MASM (ml) and it can be hard to obtain. 60390Sstevel@tonic-gate This is currently experimental but it seems to work OK and pass all 60400Sstevel@tonic-gate the tests. Check out INSTALL.W32 for info. 60410Sstevel@tonic-gate [Steve Henson] 60420Sstevel@tonic-gate 60430Sstevel@tonic-gate *) Fix memory leaks in s3_clnt.c: All non-anonymous SSL3/TLS1 connections 60440Sstevel@tonic-gate without temporary keys kept an extra copy of the server key, 60450Sstevel@tonic-gate and connections with temporary keys did not free everything in case 60460Sstevel@tonic-gate of an error. 60470Sstevel@tonic-gate [Bodo Moeller] 60480Sstevel@tonic-gate 60490Sstevel@tonic-gate *) New function RSA_check_key and new openssl rsa option -check 60500Sstevel@tonic-gate for verifying the consistency of RSA keys. 60510Sstevel@tonic-gate [Ulf Moeller, Bodo Moeller] 60520Sstevel@tonic-gate 60530Sstevel@tonic-gate *) Various changes to make Win32 compile work: 60540Sstevel@tonic-gate 1. Casts to avoid "loss of data" warnings in p5_crpt2.c 60550Sstevel@tonic-gate 2. Change unsigned int to int in b_dump.c to avoid "signed/unsigned 60560Sstevel@tonic-gate comparison" warnings. 60570Sstevel@tonic-gate 3. Add sk_<TYPE>_sort to DEF file generator and do make update. 60580Sstevel@tonic-gate [Steve Henson] 60590Sstevel@tonic-gate 60600Sstevel@tonic-gate *) Add a debugging option to PKCS#5 v2 key generation function: when 60610Sstevel@tonic-gate you #define DEBUG_PKCS5V2 passwords, salts, iteration counts and 60620Sstevel@tonic-gate derived keys are printed to stderr. 60630Sstevel@tonic-gate [Steve Henson] 60640Sstevel@tonic-gate 60650Sstevel@tonic-gate *) Copy the flags in ASN1_STRING_dup(). 60660Sstevel@tonic-gate [Roman E. Pavlov <pre@mo.msk.ru>] 60670Sstevel@tonic-gate 60680Sstevel@tonic-gate *) The x509 application mishandled signing requests containing DSA 60690Sstevel@tonic-gate keys when the signing key was also DSA and the parameters didn't match. 60700Sstevel@tonic-gate 60710Sstevel@tonic-gate It was supposed to omit the parameters when they matched the signing key: 60720Sstevel@tonic-gate the verifying software was then supposed to automatically use the CA's 60730Sstevel@tonic-gate parameters if they were absent from the end user certificate. 60740Sstevel@tonic-gate 60750Sstevel@tonic-gate Omitting parameters is no longer recommended. The test was also 60760Sstevel@tonic-gate the wrong way round! This was probably due to unusual behaviour in 60770Sstevel@tonic-gate EVP_cmp_parameters() which returns 1 if the parameters match. 60780Sstevel@tonic-gate This meant that parameters were omitted when they *didn't* match and 60790Sstevel@tonic-gate the certificate was useless. Certificates signed with 'ca' didn't have 60800Sstevel@tonic-gate this bug. 60810Sstevel@tonic-gate [Steve Henson, reported by Doug Erickson <Doug.Erickson@Part.NET>] 60820Sstevel@tonic-gate 60830Sstevel@tonic-gate *) Memory leak checking (-DCRYPTO_MDEBUG) had some problems. 60840Sstevel@tonic-gate The interface is as follows: 60850Sstevel@tonic-gate Applications can use 60860Sstevel@tonic-gate CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON) aka MemCheck_start(), 60870Sstevel@tonic-gate CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF) aka MemCheck_stop(); 60880Sstevel@tonic-gate "off" is now the default. 60890Sstevel@tonic-gate The library internally uses 60900Sstevel@tonic-gate CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE) aka MemCheck_off(), 60910Sstevel@tonic-gate CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE) aka MemCheck_on() 60920Sstevel@tonic-gate to disable memory-checking temporarily. 60930Sstevel@tonic-gate 60940Sstevel@tonic-gate Some inconsistent states that previously were possible (and were 60950Sstevel@tonic-gate even the default) are now avoided. 60960Sstevel@tonic-gate 60970Sstevel@tonic-gate -DCRYPTO_MDEBUG_TIME is new and additionally stores the current time 60980Sstevel@tonic-gate with each memory chunk allocated; this is occasionally more helpful 60990Sstevel@tonic-gate than just having a counter. 61000Sstevel@tonic-gate 61010Sstevel@tonic-gate -DCRYPTO_MDEBUG_THREAD is also new and adds the thread ID. 61020Sstevel@tonic-gate 61030Sstevel@tonic-gate -DCRYPTO_MDEBUG_ALL enables all of the above, plus any future 61040Sstevel@tonic-gate extensions. 61050Sstevel@tonic-gate [Bodo Moeller] 61060Sstevel@tonic-gate 61070Sstevel@tonic-gate *) Introduce "mode" for SSL structures (with defaults in SSL_CTX), 61080Sstevel@tonic-gate which largely parallels "options", but is for changing API behaviour, 61090Sstevel@tonic-gate whereas "options" are about protocol behaviour. 61100Sstevel@tonic-gate Initial "mode" flags are: 61110Sstevel@tonic-gate 61120Sstevel@tonic-gate SSL_MODE_ENABLE_PARTIAL_WRITE Allow SSL_write to report success when 61130Sstevel@tonic-gate a single record has been written. 61140Sstevel@tonic-gate SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER Don't insist that SSL_write 61150Sstevel@tonic-gate retries use the same buffer location. 61160Sstevel@tonic-gate (But all of the contents must be 61170Sstevel@tonic-gate copied!) 61180Sstevel@tonic-gate [Bodo Moeller] 61190Sstevel@tonic-gate 61200Sstevel@tonic-gate *) Bugfix: SSL_set_options ignored its parameter, only SSL_CTX_set_options 61210Sstevel@tonic-gate worked. 61220Sstevel@tonic-gate 61230Sstevel@tonic-gate *) Fix problems with no-hmac etc. 61240Sstevel@tonic-gate [Ulf M�ller, pointed out by Brian Wellington <bwelling@tislabs.com>] 61250Sstevel@tonic-gate 61260Sstevel@tonic-gate *) New functions RSA_get_default_method(), RSA_set_method() and 61270Sstevel@tonic-gate RSA_get_method(). These allows replacement of RSA_METHODs without having 61280Sstevel@tonic-gate to mess around with the internals of an RSA structure. 61290Sstevel@tonic-gate [Steve Henson] 61300Sstevel@tonic-gate 61310Sstevel@tonic-gate *) Fix memory leaks in DSA_do_sign and DSA_is_prime. 61320Sstevel@tonic-gate Also really enable memory leak checks in openssl.c and in some 61330Sstevel@tonic-gate test programs. 61340Sstevel@tonic-gate [Chad C. Mulligan, Bodo Moeller] 61350Sstevel@tonic-gate 61360Sstevel@tonic-gate *) Fix a bug in d2i_ASN1_INTEGER() and i2d_ASN1_INTEGER() which can mess 61370Sstevel@tonic-gate up the length of negative integers. This has now been simplified to just 61380Sstevel@tonic-gate store the length when it is first determined and use it later, rather 61390Sstevel@tonic-gate than trying to keep track of where data is copied and updating it to 61400Sstevel@tonic-gate point to the end. 61410Sstevel@tonic-gate [Steve Henson, reported by Brien Wheeler 61420Sstevel@tonic-gate <bwheeler@authentica-security.com>] 61430Sstevel@tonic-gate 61440Sstevel@tonic-gate *) Add a new function PKCS7_signatureVerify. This allows the verification 61450Sstevel@tonic-gate of a PKCS#7 signature but with the signing certificate passed to the 61460Sstevel@tonic-gate function itself. This contrasts with PKCS7_dataVerify which assumes the 61470Sstevel@tonic-gate certificate is present in the PKCS#7 structure. This isn't always the 61480Sstevel@tonic-gate case: certificates can be omitted from a PKCS#7 structure and be 61490Sstevel@tonic-gate distributed by "out of band" means (such as a certificate database). 61500Sstevel@tonic-gate [Steve Henson] 61510Sstevel@tonic-gate 61520Sstevel@tonic-gate *) Complete the PEM_* macros with DECLARE_PEM versions to replace the 61530Sstevel@tonic-gate function prototypes in pem.h, also change util/mkdef.pl to add the 61540Sstevel@tonic-gate necessary function names. 61550Sstevel@tonic-gate [Steve Henson] 61560Sstevel@tonic-gate 61570Sstevel@tonic-gate *) mk1mf.pl (used by Windows builds) did not properly read the 61580Sstevel@tonic-gate options set by Configure in the top level Makefile, and Configure 61590Sstevel@tonic-gate was not even able to write more than one option correctly. 61600Sstevel@tonic-gate Fixed, now "no-idea no-rc5 -DCRYPTO_MDEBUG" etc. works as intended. 61610Sstevel@tonic-gate [Bodo Moeller] 61620Sstevel@tonic-gate 61630Sstevel@tonic-gate *) New functions CONF_load_bio() and CONF_load_fp() to allow a config 61640Sstevel@tonic-gate file to be loaded from a BIO or FILE pointer. The BIO version will 61650Sstevel@tonic-gate for example allow memory BIOs to contain config info. 61660Sstevel@tonic-gate [Steve Henson] 61670Sstevel@tonic-gate 61680Sstevel@tonic-gate *) New function "CRYPTO_num_locks" that returns CRYPTO_NUM_LOCKS. 61690Sstevel@tonic-gate Whoever hopes to achieve shared-library compatibility across versions 61700Sstevel@tonic-gate must use this, not the compile-time macro. 61710Sstevel@tonic-gate (Exercise 0.9.4: Which is the minimum library version required by 61720Sstevel@tonic-gate such programs?) 61730Sstevel@tonic-gate Note: All this applies only to multi-threaded programs, others don't 61740Sstevel@tonic-gate need locks. 61750Sstevel@tonic-gate [Bodo Moeller] 61760Sstevel@tonic-gate 61770Sstevel@tonic-gate *) Add missing case to s3_clnt.c state machine -- one of the new SSL tests 61780Sstevel@tonic-gate through a BIO pair triggered the default case, i.e. 61790Sstevel@tonic-gate SSLerr(...,SSL_R_UNKNOWN_STATE). 61800Sstevel@tonic-gate [Bodo Moeller] 61810Sstevel@tonic-gate 61820Sstevel@tonic-gate *) New "BIO pair" concept (crypto/bio/bss_bio.c) so that applications 61830Sstevel@tonic-gate can use the SSL library even if none of the specific BIOs is 61840Sstevel@tonic-gate appropriate. 61850Sstevel@tonic-gate [Bodo Moeller] 61860Sstevel@tonic-gate 61870Sstevel@tonic-gate *) Fix a bug in i2d_DSAPublicKey() which meant it returned the wrong value 61880Sstevel@tonic-gate for the encoded length. 61890Sstevel@tonic-gate [Jeon KyoungHo <khjeon@sds.samsung.co.kr>] 61900Sstevel@tonic-gate 61910Sstevel@tonic-gate *) Add initial documentation of the X509V3 functions. 61920Sstevel@tonic-gate [Steve Henson] 61930Sstevel@tonic-gate 61940Sstevel@tonic-gate *) Add a new pair of functions PEM_write_PKCS8PrivateKey() and 61950Sstevel@tonic-gate PEM_write_bio_PKCS8PrivateKey() that are equivalent to 61960Sstevel@tonic-gate PEM_write_PrivateKey() and PEM_write_bio_PrivateKey() but use the more 61970Sstevel@tonic-gate secure PKCS#8 private key format with a high iteration count. 61980Sstevel@tonic-gate [Steve Henson] 61990Sstevel@tonic-gate 62000Sstevel@tonic-gate *) Fix determination of Perl interpreter: A perl or perl5 62010Sstevel@tonic-gate _directory_ in $PATH was also accepted as the interpreter. 62020Sstevel@tonic-gate [Ralf S. Engelschall] 62030Sstevel@tonic-gate 62040Sstevel@tonic-gate *) Fix demos/sign/sign.c: well there wasn't anything strictly speaking 62050Sstevel@tonic-gate wrong with it but it was very old and did things like calling 62060Sstevel@tonic-gate PEM_ASN1_read() directly and used MD5 for the hash not to mention some 62070Sstevel@tonic-gate unusual formatting. 62080Sstevel@tonic-gate [Steve Henson] 62090Sstevel@tonic-gate 62100Sstevel@tonic-gate *) Fix demos/selfsign.c: it used obsolete and deleted functions, changed 62110Sstevel@tonic-gate to use the new extension code. 62120Sstevel@tonic-gate [Steve Henson] 62130Sstevel@tonic-gate 62140Sstevel@tonic-gate *) Implement the PEM_read/PEM_write functions in crypto/pem/pem_all.c 62150Sstevel@tonic-gate with macros. This should make it easier to change their form, add extra 62160Sstevel@tonic-gate arguments etc. Fix a few PEM prototypes which didn't have cipher as a 62170Sstevel@tonic-gate constant. 62180Sstevel@tonic-gate [Steve Henson] 62190Sstevel@tonic-gate 62200Sstevel@tonic-gate *) Add to configuration table a new entry that can specify an alternative 62210Sstevel@tonic-gate name for unistd.h (for pre-POSIX systems); we need this for NeXTstep, 62220Sstevel@tonic-gate according to Mark Crispin <MRC@Panda.COM>. 62230Sstevel@tonic-gate [Bodo Moeller] 62240Sstevel@tonic-gate 62250Sstevel@tonic-gate#if 0 62260Sstevel@tonic-gate *) DES CBC did not update the IV. Weird. 62270Sstevel@tonic-gate [Ben Laurie] 62280Sstevel@tonic-gate#else 62290Sstevel@tonic-gate des_cbc_encrypt does not update the IV, but des_ncbc_encrypt does. 62300Sstevel@tonic-gate Changing the behaviour of the former might break existing programs -- 62310Sstevel@tonic-gate where IV updating is needed, des_ncbc_encrypt can be used. 62320Sstevel@tonic-gate#endif 62330Sstevel@tonic-gate 62340Sstevel@tonic-gate *) When bntest is run from "make test" it drives bc to check its 62350Sstevel@tonic-gate calculations, as well as internally checking them. If an internal check 62360Sstevel@tonic-gate fails, it needs to cause bc to give a non-zero result or make test carries 62370Sstevel@tonic-gate on without noticing the failure. Fixed. 62380Sstevel@tonic-gate [Ben Laurie] 62390Sstevel@tonic-gate 62400Sstevel@tonic-gate *) DES library cleanups. 62410Sstevel@tonic-gate [Ulf M�ller] 62420Sstevel@tonic-gate 62430Sstevel@tonic-gate *) Add support for PKCS#5 v2.0 PBE algorithms. This will permit PKCS#8 to be 62440Sstevel@tonic-gate used with any cipher unlike PKCS#5 v1.5 which can at most handle 64 bit 62450Sstevel@tonic-gate ciphers. NOTE: although the key derivation function has been verified 62460Sstevel@tonic-gate against some published test vectors it has not been extensively tested 62470Sstevel@tonic-gate yet. Added a -v2 "cipher" option to pkcs8 application to allow the use 62480Sstevel@tonic-gate of v2.0. 62490Sstevel@tonic-gate [Steve Henson] 62500Sstevel@tonic-gate 62510Sstevel@tonic-gate *) Instead of "mkdir -p", which is not fully portable, use new 62520Sstevel@tonic-gate Perl script "util/mkdir-p.pl". 62530Sstevel@tonic-gate [Bodo Moeller] 62540Sstevel@tonic-gate 62550Sstevel@tonic-gate *) Rewrite the way password based encryption (PBE) is handled. It used to 62560Sstevel@tonic-gate assume that the ASN1 AlgorithmIdentifier parameter was a PBEParameter 62570Sstevel@tonic-gate structure. This was true for the PKCS#5 v1.5 and PKCS#12 PBE algorithms 62580Sstevel@tonic-gate but doesn't apply to PKCS#5 v2.0 where it can be something else. Now 62590Sstevel@tonic-gate the 'parameter' field of the AlgorithmIdentifier is passed to the 62600Sstevel@tonic-gate underlying key generation function so it must do its own ASN1 parsing. 62610Sstevel@tonic-gate This has also changed the EVP_PBE_CipherInit() function which now has a 62620Sstevel@tonic-gate 'parameter' argument instead of literal salt and iteration count values 62630Sstevel@tonic-gate and the function EVP_PBE_ALGOR_CipherInit() has been deleted. 62640Sstevel@tonic-gate [Steve Henson] 62650Sstevel@tonic-gate 62660Sstevel@tonic-gate *) Support for PKCS#5 v1.5 compatible password based encryption algorithms 62670Sstevel@tonic-gate and PKCS#8 functionality. New 'pkcs8' application linked to openssl. 62680Sstevel@tonic-gate Needed to change the PEM_STRING_EVP_PKEY value which was just "PRIVATE 62690Sstevel@tonic-gate KEY" because this clashed with PKCS#8 unencrypted string. Since this 62700Sstevel@tonic-gate value was just used as a "magic string" and not used directly its 62710Sstevel@tonic-gate value doesn't matter. 62720Sstevel@tonic-gate [Steve Henson] 62730Sstevel@tonic-gate 62740Sstevel@tonic-gate *) Introduce some semblance of const correctness to BN. Shame C doesn't 62750Sstevel@tonic-gate support mutable. 62760Sstevel@tonic-gate [Ben Laurie] 62770Sstevel@tonic-gate 62780Sstevel@tonic-gate *) "linux-sparc64" configuration (ultrapenguin). 62790Sstevel@tonic-gate [Ray Miller <ray.miller@oucs.ox.ac.uk>] 62800Sstevel@tonic-gate "linux-sparc" configuration. 62810Sstevel@tonic-gate [Christian Forster <fo@hawo.stw.uni-erlangen.de>] 62820Sstevel@tonic-gate 62830Sstevel@tonic-gate *) config now generates no-xxx options for missing ciphers. 62840Sstevel@tonic-gate [Ulf M�ller] 62850Sstevel@tonic-gate 62860Sstevel@tonic-gate *) Support the EBCDIC character set (work in progress). 62870Sstevel@tonic-gate File ebcdic.c not yet included because it has a different license. 62880Sstevel@tonic-gate [Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>] 62890Sstevel@tonic-gate 62900Sstevel@tonic-gate *) Support BS2000/OSD-POSIX. 62910Sstevel@tonic-gate [Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>] 62920Sstevel@tonic-gate 62930Sstevel@tonic-gate *) Make callbacks for key generation use void * instead of char *. 62940Sstevel@tonic-gate [Ben Laurie] 62950Sstevel@tonic-gate 62960Sstevel@tonic-gate *) Make S/MIME samples compile (not yet tested). 62970Sstevel@tonic-gate [Ben Laurie] 62980Sstevel@tonic-gate 62990Sstevel@tonic-gate *) Additional typesafe stacks. 63000Sstevel@tonic-gate [Ben Laurie] 63010Sstevel@tonic-gate 63020Sstevel@tonic-gate *) New configuration variants "bsdi-elf-gcc" (BSD/OS 4.x). 63030Sstevel@tonic-gate [Bodo Moeller] 63040Sstevel@tonic-gate 63050Sstevel@tonic-gate 63060Sstevel@tonic-gate Changes between 0.9.3 and 0.9.3a [29 May 1999] 63070Sstevel@tonic-gate 63080Sstevel@tonic-gate *) New configuration variant "sco5-gcc". 63090Sstevel@tonic-gate 63100Sstevel@tonic-gate *) Updated some demos. 63110Sstevel@tonic-gate [Sean O Riordain, Wade Scholine] 63120Sstevel@tonic-gate 63130Sstevel@tonic-gate *) Add missing BIO_free at exit of pkcs12 application. 63140Sstevel@tonic-gate [Wu Zhigang] 63150Sstevel@tonic-gate 63160Sstevel@tonic-gate *) Fix memory leak in conf.c. 63170Sstevel@tonic-gate [Steve Henson] 63180Sstevel@tonic-gate 63190Sstevel@tonic-gate *) Updates for Win32 to assembler version of MD5. 63200Sstevel@tonic-gate [Steve Henson] 63210Sstevel@tonic-gate 63220Sstevel@tonic-gate *) Set #! path to perl in apps/der_chop to where we found it 63230Sstevel@tonic-gate instead of using a fixed path. 63240Sstevel@tonic-gate [Bodo Moeller] 63250Sstevel@tonic-gate 63260Sstevel@tonic-gate *) SHA library changes for irix64-mips4-cc. 63270Sstevel@tonic-gate [Andy Polyakov] 63280Sstevel@tonic-gate 63290Sstevel@tonic-gate *) Improvements for VMS support. 63300Sstevel@tonic-gate [Richard Levitte] 63310Sstevel@tonic-gate 63320Sstevel@tonic-gate 63330Sstevel@tonic-gate Changes between 0.9.2b and 0.9.3 [24 May 1999] 63340Sstevel@tonic-gate 63350Sstevel@tonic-gate *) Bignum library bug fix. IRIX 6 passes "make test" now! 63360Sstevel@tonic-gate This also avoids the problems with SC4.2 and unpatched SC5. 63370Sstevel@tonic-gate [Andy Polyakov <appro@fy.chalmers.se>] 63380Sstevel@tonic-gate 63390Sstevel@tonic-gate *) New functions sk_num, sk_value and sk_set to replace the previous macros. 63400Sstevel@tonic-gate These are required because of the typesafe stack would otherwise break 63410Sstevel@tonic-gate existing code. If old code used a structure member which used to be STACK 63420Sstevel@tonic-gate and is now STACK_OF (for example cert in a PKCS7_SIGNED structure) with 63430Sstevel@tonic-gate sk_num or sk_value it would produce an error because the num, data members 63440Sstevel@tonic-gate are not present in STACK_OF. Now it just produces a warning. sk_set 63450Sstevel@tonic-gate replaces the old method of assigning a value to sk_value 63460Sstevel@tonic-gate (e.g. sk_value(x, i) = y) which the library used in a few cases. Any code 63470Sstevel@tonic-gate that does this will no longer work (and should use sk_set instead) but 63480Sstevel@tonic-gate this could be regarded as a "questionable" behaviour anyway. 63490Sstevel@tonic-gate [Steve Henson] 63500Sstevel@tonic-gate 63510Sstevel@tonic-gate *) Fix most of the other PKCS#7 bugs. The "experimental" code can now 63520Sstevel@tonic-gate correctly handle encrypted S/MIME data. 63530Sstevel@tonic-gate [Steve Henson] 63540Sstevel@tonic-gate 63550Sstevel@tonic-gate *) Change type of various DES function arguments from des_cblock 63560Sstevel@tonic-gate (which means, in function argument declarations, pointer to char) 63570Sstevel@tonic-gate to des_cblock * (meaning pointer to array with 8 char elements), 63580Sstevel@tonic-gate which allows the compiler to do more typechecking; it was like 63590Sstevel@tonic-gate that back in SSLeay, but with lots of ugly casts. 63600Sstevel@tonic-gate 63610Sstevel@tonic-gate Introduce new type const_des_cblock. 63620Sstevel@tonic-gate [Bodo Moeller] 63630Sstevel@tonic-gate 63640Sstevel@tonic-gate *) Reorganise the PKCS#7 library and get rid of some of the more obvious 63650Sstevel@tonic-gate problems: find RecipientInfo structure that matches recipient certificate 63660Sstevel@tonic-gate and initialise the ASN1 structures properly based on passed cipher. 63670Sstevel@tonic-gate [Steve Henson] 63680Sstevel@tonic-gate 63690Sstevel@tonic-gate *) Belatedly make the BN tests actually check the results. 63700Sstevel@tonic-gate [Ben Laurie] 63710Sstevel@tonic-gate 63720Sstevel@tonic-gate *) Fix the encoding and decoding of negative ASN1 INTEGERS and conversion 63730Sstevel@tonic-gate to and from BNs: it was completely broken. New compilation option 63740Sstevel@tonic-gate NEG_PUBKEY_BUG to allow for some broken certificates that encode public 63750Sstevel@tonic-gate key elements as negative integers. 63760Sstevel@tonic-gate [Steve Henson] 63770Sstevel@tonic-gate 63780Sstevel@tonic-gate *) Reorganize and speed up MD5. 63790Sstevel@tonic-gate [Andy Polyakov <appro@fy.chalmers.se>] 63800Sstevel@tonic-gate 63810Sstevel@tonic-gate *) VMS support. 63820Sstevel@tonic-gate [Richard Levitte <richard@levitte.org>] 63830Sstevel@tonic-gate 63840Sstevel@tonic-gate *) New option -out to asn1parse to allow the parsed structure to be 63850Sstevel@tonic-gate output to a file. This is most useful when combined with the -strparse 63860Sstevel@tonic-gate option to examine the output of things like OCTET STRINGS. 63870Sstevel@tonic-gate [Steve Henson] 63880Sstevel@tonic-gate 63890Sstevel@tonic-gate *) Make SSL library a little more fool-proof by not requiring any longer 63900Sstevel@tonic-gate that SSL_set_{accept,connect}_state be called before 63910Sstevel@tonic-gate SSL_{accept,connect} may be used (SSL_set_..._state is omitted 63920Sstevel@tonic-gate in many applications because usually everything *appeared* to work as 63930Sstevel@tonic-gate intended anyway -- now it really works as intended). 63940Sstevel@tonic-gate [Bodo Moeller] 63950Sstevel@tonic-gate 63960Sstevel@tonic-gate *) Move openssl.cnf out of lib/. 63970Sstevel@tonic-gate [Ulf M�ller] 63980Sstevel@tonic-gate 63990Sstevel@tonic-gate *) Fix various things to let OpenSSL even pass ``egcc -pipe -O2 -Wall 64000Sstevel@tonic-gate -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes 64010Sstevel@tonic-gate -Wmissing-declarations -Wnested-externs -Winline'' with EGCS 1.1.2+ 64020Sstevel@tonic-gate [Ralf S. Engelschall] 64030Sstevel@tonic-gate 64040Sstevel@tonic-gate *) Various fixes to the EVP and PKCS#7 code. It may now be able to 64050Sstevel@tonic-gate handle PKCS#7 enveloped data properly. 64060Sstevel@tonic-gate [Sebastian Akerman <sak@parallelconsulting.com>, modified by Steve] 64070Sstevel@tonic-gate 64080Sstevel@tonic-gate *) Create a duplicate of the SSL_CTX's CERT in SSL_new instead of 64090Sstevel@tonic-gate copying pointers. The cert_st handling is changed by this in 64100Sstevel@tonic-gate various ways (and thus what used to be known as ctx->default_cert 64110Sstevel@tonic-gate is now called ctx->cert, since we don't resort to s->ctx->[default_]cert 64120Sstevel@tonic-gate any longer when s->cert does not give us what we need). 64130Sstevel@tonic-gate ssl_cert_instantiate becomes obsolete by this change. 64140Sstevel@tonic-gate As soon as we've got the new code right (possibly it already is?), 64150Sstevel@tonic-gate we have solved a couple of bugs of the earlier code where s->cert 64160Sstevel@tonic-gate was used as if it could not have been shared with other SSL structures. 64170Sstevel@tonic-gate 64180Sstevel@tonic-gate Note that using the SSL API in certain dirty ways now will result 64190Sstevel@tonic-gate in different behaviour than observed with earlier library versions: 64200Sstevel@tonic-gate Changing settings for an SSL_CTX *ctx after having done s = SSL_new(ctx) 64210Sstevel@tonic-gate does not influence s as it used to. 64220Sstevel@tonic-gate 64230Sstevel@tonic-gate In order to clean up things more thoroughly, inside SSL_SESSION 64240Sstevel@tonic-gate we don't use CERT any longer, but a new structure SESS_CERT 64250Sstevel@tonic-gate that holds per-session data (if available); currently, this is 64260Sstevel@tonic-gate the peer's certificate chain and, for clients, the server's certificate 64270Sstevel@tonic-gate and temporary key. CERT holds only those values that can have 64280Sstevel@tonic-gate meaningful defaults in an SSL_CTX. 64290Sstevel@tonic-gate [Bodo Moeller] 64300Sstevel@tonic-gate 64310Sstevel@tonic-gate *) New function X509V3_EXT_i2d() to create an X509_EXTENSION structure 64320Sstevel@tonic-gate from the internal representation. Various PKCS#7 fixes: remove some 64330Sstevel@tonic-gate evil casts and set the enc_dig_alg field properly based on the signing 64340Sstevel@tonic-gate key type. 64350Sstevel@tonic-gate [Steve Henson] 64360Sstevel@tonic-gate 64370Sstevel@tonic-gate *) Allow PKCS#12 password to be set from the command line or the 64380Sstevel@tonic-gate environment. Let 'ca' get its config file name from the environment 64390Sstevel@tonic-gate variables "OPENSSL_CONF" or "SSLEAY_CONF" (for consistency with 'req' 64400Sstevel@tonic-gate and 'x509'). 64410Sstevel@tonic-gate [Steve Henson] 64420Sstevel@tonic-gate 64430Sstevel@tonic-gate *) Allow certificate policies extension to use an IA5STRING for the 64440Sstevel@tonic-gate organization field. This is contrary to the PKIX definition but 64450Sstevel@tonic-gate VeriSign uses it and IE5 only recognises this form. Document 'x509' 64460Sstevel@tonic-gate extension option. 64470Sstevel@tonic-gate [Steve Henson] 64480Sstevel@tonic-gate 64490Sstevel@tonic-gate *) Add PEDANTIC compiler flag to allow compilation with gcc -pedantic, 64500Sstevel@tonic-gate without disallowing inline assembler and the like for non-pedantic builds. 64510Sstevel@tonic-gate [Ben Laurie] 64520Sstevel@tonic-gate 64530Sstevel@tonic-gate *) Support Borland C++ builder. 64540Sstevel@tonic-gate [Janez Jere <jj@void.si>, modified by Ulf M�ller] 64550Sstevel@tonic-gate 64560Sstevel@tonic-gate *) Support Mingw32. 64570Sstevel@tonic-gate [Ulf M�ller] 64580Sstevel@tonic-gate 64590Sstevel@tonic-gate *) SHA-1 cleanups and performance enhancements. 64600Sstevel@tonic-gate [Andy Polyakov <appro@fy.chalmers.se>] 64610Sstevel@tonic-gate 64620Sstevel@tonic-gate *) Sparc v8plus assembler for the bignum library. 64630Sstevel@tonic-gate [Andy Polyakov <appro@fy.chalmers.se>] 64640Sstevel@tonic-gate 64650Sstevel@tonic-gate *) Accept any -xxx and +xxx compiler options in Configure. 64660Sstevel@tonic-gate [Ulf M�ller] 64670Sstevel@tonic-gate 64680Sstevel@tonic-gate *) Update HPUX configuration. 64690Sstevel@tonic-gate [Anonymous] 64700Sstevel@tonic-gate 64710Sstevel@tonic-gate *) Add missing sk_<type>_unshift() function to safestack.h 64720Sstevel@tonic-gate [Ralf S. Engelschall] 64730Sstevel@tonic-gate 64740Sstevel@tonic-gate *) New function SSL_CTX_use_certificate_chain_file that sets the 64750Sstevel@tonic-gate "extra_cert"s in addition to the certificate. (This makes sense 64760Sstevel@tonic-gate only for "PEM" format files, as chains as a whole are not 64770Sstevel@tonic-gate DER-encoded.) 64780Sstevel@tonic-gate [Bodo Moeller] 64790Sstevel@tonic-gate 64800Sstevel@tonic-gate *) Support verify_depth from the SSL API. 64810Sstevel@tonic-gate x509_vfy.c had what can be considered an off-by-one-error: 64820Sstevel@tonic-gate Its depth (which was not part of the external interface) 64830Sstevel@tonic-gate was actually counting the number of certificates in a chain; 64840Sstevel@tonic-gate now it really counts the depth. 64850Sstevel@tonic-gate [Bodo Moeller] 64860Sstevel@tonic-gate 64870Sstevel@tonic-gate *) Bugfix in crypto/x509/x509_cmp.c: The SSLerr macro was used 64880Sstevel@tonic-gate instead of X509err, which often resulted in confusing error 64890Sstevel@tonic-gate messages since the error codes are not globally unique 64900Sstevel@tonic-gate (e.g. an alleged error in ssl3_accept when a certificate 64910Sstevel@tonic-gate didn't match the private key). 64920Sstevel@tonic-gate 64930Sstevel@tonic-gate *) New function SSL_CTX_set_session_id_context that allows to set a default 64940Sstevel@tonic-gate value (so that you don't need SSL_set_session_id_context for each 64950Sstevel@tonic-gate connection using the SSL_CTX). 64960Sstevel@tonic-gate [Bodo Moeller] 64970Sstevel@tonic-gate 64980Sstevel@tonic-gate *) OAEP decoding bug fix. 64990Sstevel@tonic-gate [Ulf M�ller] 65000Sstevel@tonic-gate 65010Sstevel@tonic-gate *) Support INSTALL_PREFIX for package builders, as proposed by 65020Sstevel@tonic-gate David Harris. 65030Sstevel@tonic-gate [Bodo Moeller] 65040Sstevel@tonic-gate 65050Sstevel@tonic-gate *) New Configure options "threads" and "no-threads". For systems 65060Sstevel@tonic-gate where the proper compiler options are known (currently Solaris 65070Sstevel@tonic-gate and Linux), "threads" is the default. 65080Sstevel@tonic-gate [Bodo Moeller] 65090Sstevel@tonic-gate 65100Sstevel@tonic-gate *) New script util/mklink.pl as a faster substitute for util/mklink.sh. 65110Sstevel@tonic-gate [Bodo Moeller] 65120Sstevel@tonic-gate 65130Sstevel@tonic-gate *) Install various scripts to $(OPENSSLDIR)/misc, not to 65140Sstevel@tonic-gate $(INSTALLTOP)/bin -- they shouldn't clutter directories 65150Sstevel@tonic-gate such as /usr/local/bin. 65160Sstevel@tonic-gate [Bodo Moeller] 65170Sstevel@tonic-gate 65180Sstevel@tonic-gate *) "make linux-shared" to build shared libraries. 65190Sstevel@tonic-gate [Niels Poppe <niels@netbox.org>] 65200Sstevel@tonic-gate 65210Sstevel@tonic-gate *) New Configure option no-<cipher> (rsa, idea, rc5, ...). 65220Sstevel@tonic-gate [Ulf M�ller] 65230Sstevel@tonic-gate 65240Sstevel@tonic-gate *) Add the PKCS#12 API documentation to openssl.txt. Preliminary support for 65250Sstevel@tonic-gate extension adding in x509 utility. 65260Sstevel@tonic-gate [Steve Henson] 65270Sstevel@tonic-gate 65280Sstevel@tonic-gate *) Remove NOPROTO sections and error code comments. 65290Sstevel@tonic-gate [Ulf M�ller] 65300Sstevel@tonic-gate 65310Sstevel@tonic-gate *) Partial rewrite of the DEF file generator to now parse the ANSI 65320Sstevel@tonic-gate prototypes. 65330Sstevel@tonic-gate [Steve Henson] 65340Sstevel@tonic-gate 65350Sstevel@tonic-gate *) New Configure options --prefix=DIR and --openssldir=DIR. 65360Sstevel@tonic-gate [Ulf M�ller] 65370Sstevel@tonic-gate 65380Sstevel@tonic-gate *) Complete rewrite of the error code script(s). It is all now handled 65390Sstevel@tonic-gate by one script at the top level which handles error code gathering, 65400Sstevel@tonic-gate header rewriting and C source file generation. It should be much better 65410Sstevel@tonic-gate than the old method: it now uses a modified version of Ulf's parser to 65420Sstevel@tonic-gate read the ANSI prototypes in all header files (thus the old K&R definitions 65430Sstevel@tonic-gate aren't needed for error creation any more) and do a better job of 65440Sstevel@tonic-gate translating function codes into names. The old 'ASN1 error code imbedded 65450Sstevel@tonic-gate in a comment' is no longer necessary and it doesn't use .err files which 65460Sstevel@tonic-gate have now been deleted. Also the error code call doesn't have to appear all 65470Sstevel@tonic-gate on one line (which resulted in some large lines...). 65480Sstevel@tonic-gate [Steve Henson] 65490Sstevel@tonic-gate 65500Sstevel@tonic-gate *) Change #include filenames from <foo.h> to <openssl/foo.h>. 65510Sstevel@tonic-gate [Bodo Moeller] 65520Sstevel@tonic-gate 65530Sstevel@tonic-gate *) Change behaviour of ssl2_read when facing length-0 packets: Don't return 65540Sstevel@tonic-gate 0 (which usually indicates a closed connection), but continue reading. 65550Sstevel@tonic-gate [Bodo Moeller] 65560Sstevel@tonic-gate 65570Sstevel@tonic-gate *) Fix some race conditions. 65580Sstevel@tonic-gate [Bodo Moeller] 65590Sstevel@tonic-gate 65600Sstevel@tonic-gate *) Add support for CRL distribution points extension. Add Certificate 65610Sstevel@tonic-gate Policies and CRL distribution points documentation. 65620Sstevel@tonic-gate [Steve Henson] 65630Sstevel@tonic-gate 65640Sstevel@tonic-gate *) Move the autogenerated header file parts to crypto/opensslconf.h. 65650Sstevel@tonic-gate [Ulf M�ller] 65660Sstevel@tonic-gate 65670Sstevel@tonic-gate *) Fix new 56-bit DES export ciphersuites: they were using 7 bytes instead of 65680Sstevel@tonic-gate 8 of keying material. Merlin has also confirmed interop with this fix 65690Sstevel@tonic-gate between OpenSSL and Baltimore C/SSL 2.0 and J/SSL 2.0. 65700Sstevel@tonic-gate [Merlin Hughes <merlin@baltimore.ie>] 65710Sstevel@tonic-gate 65720Sstevel@tonic-gate *) Fix lots of warnings. 65730Sstevel@tonic-gate [Richard Levitte <levitte@stacken.kth.se>] 65740Sstevel@tonic-gate 65750Sstevel@tonic-gate *) In add_cert_dir() in crypto/x509/by_dir.c, break out of the loop if 65760Sstevel@tonic-gate the directory spec didn't end with a LIST_SEPARATOR_CHAR. 65770Sstevel@tonic-gate [Richard Levitte <levitte@stacken.kth.se>] 65780Sstevel@tonic-gate 65790Sstevel@tonic-gate *) Fix problems with sizeof(long) == 8. 65800Sstevel@tonic-gate [Andy Polyakov <appro@fy.chalmers.se>] 65810Sstevel@tonic-gate 65820Sstevel@tonic-gate *) Change functions to ANSI C. 65830Sstevel@tonic-gate [Ulf M�ller] 65840Sstevel@tonic-gate 65850Sstevel@tonic-gate *) Fix typos in error codes. 65860Sstevel@tonic-gate [Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>, Ulf M�ller] 65870Sstevel@tonic-gate 65880Sstevel@tonic-gate *) Remove defunct assembler files from Configure. 65890Sstevel@tonic-gate [Ulf M�ller] 65900Sstevel@tonic-gate 65910Sstevel@tonic-gate *) SPARC v8 assembler BIGNUM implementation. 65920Sstevel@tonic-gate [Andy Polyakov <appro@fy.chalmers.se>] 65930Sstevel@tonic-gate 65940Sstevel@tonic-gate *) Support for Certificate Policies extension: both print and set. 65950Sstevel@tonic-gate Various additions to support the r2i method this uses. 65960Sstevel@tonic-gate [Steve Henson] 65970Sstevel@tonic-gate 65980Sstevel@tonic-gate *) A lot of constification, and fix a bug in X509_NAME_oneline() that could 65990Sstevel@tonic-gate return a const string when you are expecting an allocated buffer. 66000Sstevel@tonic-gate [Ben Laurie] 66010Sstevel@tonic-gate 66020Sstevel@tonic-gate *) Add support for ASN1 types UTF8String and VISIBLESTRING, also the CHOICE 66030Sstevel@tonic-gate types DirectoryString and DisplayText. 66040Sstevel@tonic-gate [Steve Henson] 66050Sstevel@tonic-gate 66060Sstevel@tonic-gate *) Add code to allow r2i extensions to access the configuration database, 66070Sstevel@tonic-gate add an LHASH database driver and add several ctx helper functions. 66080Sstevel@tonic-gate [Steve Henson] 66090Sstevel@tonic-gate 66100Sstevel@tonic-gate *) Fix an evil bug in bn_expand2() which caused various BN functions to 66110Sstevel@tonic-gate fail when they extended the size of a BIGNUM. 66120Sstevel@tonic-gate [Steve Henson] 66130Sstevel@tonic-gate 66140Sstevel@tonic-gate *) Various utility functions to handle SXNet extension. Modify mkdef.pl to 66150Sstevel@tonic-gate support typesafe stack. 66160Sstevel@tonic-gate [Steve Henson] 66170Sstevel@tonic-gate 66180Sstevel@tonic-gate *) Fix typo in SSL_[gs]et_options(). 66190Sstevel@tonic-gate [Nils Frostberg <nils@medcom.se>] 66200Sstevel@tonic-gate 66210Sstevel@tonic-gate *) Delete various functions and files that belonged to the (now obsolete) 66220Sstevel@tonic-gate old X509V3 handling code. 66230Sstevel@tonic-gate [Steve Henson] 66240Sstevel@tonic-gate 66250Sstevel@tonic-gate *) New Configure option "rsaref". 66260Sstevel@tonic-gate [Ulf M�ller] 66270Sstevel@tonic-gate 66280Sstevel@tonic-gate *) Don't auto-generate pem.h. 66290Sstevel@tonic-gate [Bodo Moeller] 66300Sstevel@tonic-gate 66310Sstevel@tonic-gate *) Introduce type-safe ASN.1 SETs. 66320Sstevel@tonic-gate [Ben Laurie] 66330Sstevel@tonic-gate 66340Sstevel@tonic-gate *) Convert various additional casted stacks to type-safe STACK_OF() variants. 66350Sstevel@tonic-gate [Ben Laurie, Ralf S. Engelschall, Steve Henson] 66360Sstevel@tonic-gate 66370Sstevel@tonic-gate *) Introduce type-safe STACKs. This will almost certainly break lots of code 66380Sstevel@tonic-gate that links with OpenSSL (well at least cause lots of warnings), but fear 66390Sstevel@tonic-gate not: the conversion is trivial, and it eliminates loads of evil casts. A 66400Sstevel@tonic-gate few STACKed things have been converted already. Feel free to convert more. 66410Sstevel@tonic-gate In the fullness of time, I'll do away with the STACK type altogether. 66420Sstevel@tonic-gate [Ben Laurie] 66430Sstevel@tonic-gate 66440Sstevel@tonic-gate *) Add `openssl ca -revoke <certfile>' facility which revokes a certificate 66450Sstevel@tonic-gate specified in <certfile> by updating the entry in the index.txt file. 66460Sstevel@tonic-gate This way one no longer has to edit the index.txt file manually for 66470Sstevel@tonic-gate revoking a certificate. The -revoke option does the gory details now. 66480Sstevel@tonic-gate [Massimiliano Pala <madwolf@openca.org>, Ralf S. Engelschall] 66490Sstevel@tonic-gate 66500Sstevel@tonic-gate *) Fix `openssl crl -noout -text' combination where `-noout' killed the 66510Sstevel@tonic-gate `-text' option at all and this way the `-noout -text' combination was 66520Sstevel@tonic-gate inconsistent in `openssl crl' with the friends in `openssl x509|rsa|dsa'. 66530Sstevel@tonic-gate [Ralf S. Engelschall] 66540Sstevel@tonic-gate 66550Sstevel@tonic-gate *) Make sure a corresponding plain text error message exists for the 66560Sstevel@tonic-gate X509_V_ERR_CERT_REVOKED/23 error number which can occur when a 66570Sstevel@tonic-gate verify callback function determined that a certificate was revoked. 66580Sstevel@tonic-gate [Ralf S. Engelschall] 66590Sstevel@tonic-gate 66600Sstevel@tonic-gate *) Bugfix: In test/testenc, don't test "openssl <cipher>" for 66610Sstevel@tonic-gate ciphers that were excluded, e.g. by -DNO_IDEA. Also, test 66620Sstevel@tonic-gate all available cipers including rc5, which was forgotten until now. 66630Sstevel@tonic-gate In order to let the testing shell script know which algorithms 66640Sstevel@tonic-gate are available, a new (up to now undocumented) command 66650Sstevel@tonic-gate "openssl list-cipher-commands" is used. 66660Sstevel@tonic-gate [Bodo Moeller] 66670Sstevel@tonic-gate 66680Sstevel@tonic-gate *) Bugfix: s_client occasionally would sleep in select() when 66690Sstevel@tonic-gate it should have checked SSL_pending() first. 66700Sstevel@tonic-gate [Bodo Moeller] 66710Sstevel@tonic-gate 66720Sstevel@tonic-gate *) New functions DSA_do_sign and DSA_do_verify to provide access to 66730Sstevel@tonic-gate the raw DSA values prior to ASN.1 encoding. 66740Sstevel@tonic-gate [Ulf M�ller] 66750Sstevel@tonic-gate 66760Sstevel@tonic-gate *) Tweaks to Configure 66770Sstevel@tonic-gate [Niels Poppe <niels@netbox.org>] 66780Sstevel@tonic-gate 66790Sstevel@tonic-gate *) Add support for PKCS#5 v2.0 ASN1 PBES2 structures. No other support, 66800Sstevel@tonic-gate yet... 66810Sstevel@tonic-gate [Steve Henson] 66820Sstevel@tonic-gate 66830Sstevel@tonic-gate *) New variables $(RANLIB) and $(PERL) in the Makefiles. 66840Sstevel@tonic-gate [Ulf M�ller] 66850Sstevel@tonic-gate 66860Sstevel@tonic-gate *) New config option to avoid instructions that are illegal on the 80386. 66870Sstevel@tonic-gate The default code is faster, but requires at least a 486. 66880Sstevel@tonic-gate [Ulf M�ller] 66890Sstevel@tonic-gate 66900Sstevel@tonic-gate *) Got rid of old SSL2_CLIENT_VERSION (inconsistently used) and 66910Sstevel@tonic-gate SSL2_SERVER_VERSION (not used at all) macros, which are now the 66920Sstevel@tonic-gate same as SSL2_VERSION anyway. 66930Sstevel@tonic-gate [Bodo Moeller] 66940Sstevel@tonic-gate 66950Sstevel@tonic-gate *) New "-showcerts" option for s_client. 66960Sstevel@tonic-gate [Bodo Moeller] 66970Sstevel@tonic-gate 66980Sstevel@tonic-gate *) Still more PKCS#12 integration. Add pkcs12 application to openssl 66990Sstevel@tonic-gate application. Various cleanups and fixes. 67000Sstevel@tonic-gate [Steve Henson] 67010Sstevel@tonic-gate 67020Sstevel@tonic-gate *) More PKCS#12 integration. Add new pkcs12 directory with Makefile.ssl and 67030Sstevel@tonic-gate modify error routines to work internally. Add error codes and PBE init 67040Sstevel@tonic-gate to library startup routines. 67050Sstevel@tonic-gate [Steve Henson] 67060Sstevel@tonic-gate 67070Sstevel@tonic-gate *) Further PKCS#12 integration. Added password based encryption, PKCS#8 and 67080Sstevel@tonic-gate packing functions to asn1 and evp. Changed function names and error 67090Sstevel@tonic-gate codes along the way. 67100Sstevel@tonic-gate [Steve Henson] 67110Sstevel@tonic-gate 67120Sstevel@tonic-gate *) PKCS12 integration: and so it begins... First of several patches to 67130Sstevel@tonic-gate slowly integrate PKCS#12 functionality into OpenSSL. Add PKCS#12 67140Sstevel@tonic-gate objects to objects.h 67150Sstevel@tonic-gate [Steve Henson] 67160Sstevel@tonic-gate 67170Sstevel@tonic-gate *) Add a new 'indent' option to some X509V3 extension code. Initial ASN1 67180Sstevel@tonic-gate and display support for Thawte strong extranet extension. 67190Sstevel@tonic-gate [Steve Henson] 67200Sstevel@tonic-gate 67210Sstevel@tonic-gate *) Add LinuxPPC support. 67220Sstevel@tonic-gate [Jeff Dubrule <igor@pobox.org>] 67230Sstevel@tonic-gate 67240Sstevel@tonic-gate *) Get rid of redundant BN file bn_mulw.c, and rename bn_div64 to 67250Sstevel@tonic-gate bn_div_words in alpha.s. 67260Sstevel@tonic-gate [Hannes Reinecke <H.Reinecke@hw.ac.uk> and Ben Laurie] 67270Sstevel@tonic-gate 67280Sstevel@tonic-gate *) Make sure the RSA OAEP test is skipped under -DRSAref because 67290Sstevel@tonic-gate OAEP isn't supported when OpenSSL is built with RSAref. 67300Sstevel@tonic-gate [Ulf Moeller <ulf@fitug.de>] 67310Sstevel@tonic-gate 67320Sstevel@tonic-gate *) Move definitions of IS_SET/IS_SEQUENCE inside crypto/asn1/asn1.h 67330Sstevel@tonic-gate so they no longer are missing under -DNOPROTO. 67340Sstevel@tonic-gate [Soren S. Jorvang <soren@t.dk>] 67350Sstevel@tonic-gate 67360Sstevel@tonic-gate 67370Sstevel@tonic-gate Changes between 0.9.1c and 0.9.2b [22 Mar 1999] 67380Sstevel@tonic-gate 67390Sstevel@tonic-gate *) Make SSL_get_peer_cert_chain() work in servers. Unfortunately, it still 67400Sstevel@tonic-gate doesn't work when the session is reused. Coming soon! 67410Sstevel@tonic-gate [Ben Laurie] 67420Sstevel@tonic-gate 67430Sstevel@tonic-gate *) Fix a security hole, that allows sessions to be reused in the wrong 67440Sstevel@tonic-gate context thus bypassing client cert protection! All software that uses 67450Sstevel@tonic-gate client certs and session caches in multiple contexts NEEDS PATCHING to 67460Sstevel@tonic-gate allow session reuse! A fuller solution is in the works. 67470Sstevel@tonic-gate [Ben Laurie, problem pointed out by Holger Reif, Bodo Moeller (and ???)] 67480Sstevel@tonic-gate 67490Sstevel@tonic-gate *) Some more source tree cleanups (removed obsolete files 67500Sstevel@tonic-gate crypto/bf/asm/bf586.pl, test/test.txt and crypto/sha/asm/f.s; changed 67510Sstevel@tonic-gate permission on "config" script to be executable) and a fix for the INSTALL 67520Sstevel@tonic-gate document. 67530Sstevel@tonic-gate [Ulf Moeller <ulf@fitug.de>] 67540Sstevel@tonic-gate 67550Sstevel@tonic-gate *) Remove some legacy and erroneous uses of malloc, free instead of 67560Sstevel@tonic-gate Malloc, Free. 67570Sstevel@tonic-gate [Lennart Bang <lob@netstream.se>, with minor changes by Steve] 67580Sstevel@tonic-gate 67590Sstevel@tonic-gate *) Make rsa_oaep_test return non-zero on error. 67600Sstevel@tonic-gate [Ulf Moeller <ulf@fitug.de>] 67610Sstevel@tonic-gate 67620Sstevel@tonic-gate *) Add support for native Solaris shared libraries. Configure 67630Sstevel@tonic-gate solaris-sparc-sc4-pic, make, then run shlib/solaris-sc4.sh. It'd be nice 67640Sstevel@tonic-gate if someone would make that last step automatic. 67650Sstevel@tonic-gate [Matthias Loepfe <Matthias.Loepfe@AdNovum.CH>] 67660Sstevel@tonic-gate 67670Sstevel@tonic-gate *) ctx_size was not built with the right compiler during "make links". Fixed. 67680Sstevel@tonic-gate [Ben Laurie] 67690Sstevel@tonic-gate 67700Sstevel@tonic-gate *) Change the meaning of 'ALL' in the cipher list. It now means "everything 67710Sstevel@tonic-gate except NULL ciphers". This means the default cipher list will no longer 67720Sstevel@tonic-gate enable NULL ciphers. They need to be specifically enabled e.g. with 67730Sstevel@tonic-gate the string "DEFAULT:eNULL". 67740Sstevel@tonic-gate [Steve Henson] 67750Sstevel@tonic-gate 67760Sstevel@tonic-gate *) Fix to RSA private encryption routines: if p < q then it would 67770Sstevel@tonic-gate occasionally produce an invalid result. This will only happen with 67780Sstevel@tonic-gate externally generated keys because OpenSSL (and SSLeay) ensure p > q. 67790Sstevel@tonic-gate [Steve Henson] 67800Sstevel@tonic-gate 67810Sstevel@tonic-gate *) Be less restrictive and allow also `perl util/perlpath.pl 67820Sstevel@tonic-gate /path/to/bin/perl' in addition to `perl util/perlpath.pl /path/to/bin', 67830Sstevel@tonic-gate because this way one can also use an interpreter named `perl5' (which is 67840Sstevel@tonic-gate usually the name of Perl 5.xxx on platforms where an Perl 4.x is still 67850Sstevel@tonic-gate installed as `perl'). 67860Sstevel@tonic-gate [Matthias Loepfe <Matthias.Loepfe@adnovum.ch>] 67870Sstevel@tonic-gate 67880Sstevel@tonic-gate *) Let util/clean-depend.pl work also with older Perl 5.00x versions. 67890Sstevel@tonic-gate [Matthias Loepfe <Matthias.Loepfe@adnovum.ch>] 67900Sstevel@tonic-gate 67910Sstevel@tonic-gate *) Fix Makefile.org so CC,CFLAG etc are passed to 'make links' add 67920Sstevel@tonic-gate advapi32.lib to Win32 build and change the pem test comparision 67930Sstevel@tonic-gate to fc.exe (thanks to Ulrich Kroener <kroneru@yahoo.com> for the 67940Sstevel@tonic-gate suggestion). Fix misplaced ASNI prototypes and declarations in evp.h 67950Sstevel@tonic-gate and crypto/des/ede_cbcm_enc.c. 67960Sstevel@tonic-gate [Steve Henson] 67970Sstevel@tonic-gate 67980Sstevel@tonic-gate *) DES quad checksum was broken on big-endian architectures. Fixed. 67990Sstevel@tonic-gate [Ben Laurie] 68000Sstevel@tonic-gate 68010Sstevel@tonic-gate *) Comment out two functions in bio.h that aren't implemented. Fix up the 68020Sstevel@tonic-gate Win32 test batch file so it (might) work again. The Win32 test batch file 68030Sstevel@tonic-gate is horrible: I feel ill.... 68040Sstevel@tonic-gate [Steve Henson] 68050Sstevel@tonic-gate 68060Sstevel@tonic-gate *) Move various #ifdefs around so NO_SYSLOG, NO_DIRENT etc are now selected 68070Sstevel@tonic-gate in e_os.h. Audit of header files to check ANSI and non ANSI 68080Sstevel@tonic-gate sections: 10 functions were absent from non ANSI section and not exported 68090Sstevel@tonic-gate from Windows DLLs. Fixed up libeay.num for new functions. 68100Sstevel@tonic-gate [Steve Henson] 68110Sstevel@tonic-gate 68120Sstevel@tonic-gate *) Make `openssl version' output lines consistent. 68130Sstevel@tonic-gate [Ralf S. Engelschall] 68140Sstevel@tonic-gate 68150Sstevel@tonic-gate *) Fix Win32 symbol export lists for BIO functions: Added 68160Sstevel@tonic-gate BIO_get_ex_new_index, BIO_get_ex_num, BIO_get_ex_data and BIO_set_ex_data 68170Sstevel@tonic-gate to ms/libeay{16,32}.def. 68180Sstevel@tonic-gate [Ralf S. Engelschall] 68190Sstevel@tonic-gate 68200Sstevel@tonic-gate *) Second round of fixing the OpenSSL perl/ stuff. It now at least compiled 68210Sstevel@tonic-gate fine under Unix and passes some trivial tests I've now added. But the 68220Sstevel@tonic-gate whole stuff is horribly incomplete, so a README.1ST with a disclaimer was 68230Sstevel@tonic-gate added to make sure no one expects that this stuff really works in the 68240Sstevel@tonic-gate OpenSSL 0.9.2 release. Additionally I've started to clean the XS sources 68250Sstevel@tonic-gate up and fixed a few little bugs and inconsistencies in OpenSSL.{pm,xs} and 68260Sstevel@tonic-gate openssl_bio.xs. 68270Sstevel@tonic-gate [Ralf S. Engelschall] 68280Sstevel@tonic-gate 68290Sstevel@tonic-gate *) Fix the generation of two part addresses in perl. 68300Sstevel@tonic-gate [Kenji Miyake <kenji@miyake.org>, integrated by Ben Laurie] 68310Sstevel@tonic-gate 68320Sstevel@tonic-gate *) Add config entry for Linux on MIPS. 68330Sstevel@tonic-gate [John Tobey <jtobey@channel1.com>] 68340Sstevel@tonic-gate 68350Sstevel@tonic-gate *) Make links whenever Configure is run, unless we are on Windoze. 68360Sstevel@tonic-gate [Ben Laurie] 68370Sstevel@tonic-gate 68380Sstevel@tonic-gate *) Permit extensions to be added to CRLs using crl_section in openssl.cnf. 68390Sstevel@tonic-gate Currently only issuerAltName and AuthorityKeyIdentifier make any sense 68400Sstevel@tonic-gate in CRLs. 68410Sstevel@tonic-gate [Steve Henson] 68420Sstevel@tonic-gate 68430Sstevel@tonic-gate *) Add a useful kludge to allow package maintainers to specify compiler and 68440Sstevel@tonic-gate other platforms details on the command line without having to patch the 68450Sstevel@tonic-gate Configure script everytime: One now can use ``perl Configure 68460Sstevel@tonic-gate <id>:<details>'', i.e. platform ids are allowed to have details appended 68470Sstevel@tonic-gate to them (seperated by colons). This is treated as there would be a static 68480Sstevel@tonic-gate pre-configured entry in Configure's %table under key <id> with value 68490Sstevel@tonic-gate <details> and ``perl Configure <id>'' is called. So, when you want to 68500Sstevel@tonic-gate perform a quick test-compile under FreeBSD 3.1 with pgcc and without 68510Sstevel@tonic-gate assembler stuff you can use ``perl Configure "FreeBSD-elf:pgcc:-O6:::"'' 68520Sstevel@tonic-gate now, which overrides the FreeBSD-elf entry on-the-fly. 68530Sstevel@tonic-gate [Ralf S. Engelschall] 68540Sstevel@tonic-gate 68550Sstevel@tonic-gate *) Disable new TLS1 ciphersuites by default: they aren't official yet. 68560Sstevel@tonic-gate [Ben Laurie] 68570Sstevel@tonic-gate 68580Sstevel@tonic-gate *) Allow DSO flags like -fpic, -fPIC, -KPIC etc. to be specified 68590Sstevel@tonic-gate on the `perl Configure ...' command line. This way one can compile 68600Sstevel@tonic-gate OpenSSL libraries with Position Independent Code (PIC) which is needed 68610Sstevel@tonic-gate for linking it into DSOs. 68620Sstevel@tonic-gate [Ralf S. Engelschall] 68630Sstevel@tonic-gate 68640Sstevel@tonic-gate *) Remarkably, export ciphers were totally broken and no-one had noticed! 68650Sstevel@tonic-gate Fixed. 68660Sstevel@tonic-gate [Ben Laurie] 68670Sstevel@tonic-gate 68680Sstevel@tonic-gate *) Cleaned up the LICENSE document: The official contact for any license 68690Sstevel@tonic-gate questions now is the OpenSSL core team under openssl-core@openssl.org. 68700Sstevel@tonic-gate And add a paragraph about the dual-license situation to make sure people 68710Sstevel@tonic-gate recognize that _BOTH_ the OpenSSL license _AND_ the SSLeay license apply 68720Sstevel@tonic-gate to the OpenSSL toolkit. 68730Sstevel@tonic-gate [Ralf S. Engelschall] 68740Sstevel@tonic-gate 68750Sstevel@tonic-gate *) General source tree makefile cleanups: Made `making xxx in yyy...' 68760Sstevel@tonic-gate display consistent in the source tree and replaced `/bin/rm' by `rm'. 68770Sstevel@tonic-gate Additonally cleaned up the `make links' target: Remove unnecessary 68780Sstevel@tonic-gate semicolons, subsequent redundant removes, inline point.sh into mklink.sh 68790Sstevel@tonic-gate to speed processing and no longer clutter the display with confusing 68800Sstevel@tonic-gate stuff. Instead only the actually done links are displayed. 68810Sstevel@tonic-gate [Ralf S. Engelschall] 68820Sstevel@tonic-gate 68830Sstevel@tonic-gate *) Permit null encryption ciphersuites, used for authentication only. It used 68840Sstevel@tonic-gate to be necessary to set the preprocessor define SSL_ALLOW_ENULL to do this. 68850Sstevel@tonic-gate It is now necessary to set SSL_FORBID_ENULL to prevent the use of null 68860Sstevel@tonic-gate encryption. 68870Sstevel@tonic-gate [Ben Laurie] 68880Sstevel@tonic-gate 68890Sstevel@tonic-gate *) Add a bunch of fixes to the PKCS#7 stuff. It used to sometimes reorder 68900Sstevel@tonic-gate signed attributes when verifying signatures (this would break them), 68910Sstevel@tonic-gate the detached data encoding was wrong and public keys obtained using 68920Sstevel@tonic-gate X509_get_pubkey() weren't freed. 68930Sstevel@tonic-gate [Steve Henson] 68940Sstevel@tonic-gate 68950Sstevel@tonic-gate *) Add text documentation for the BUFFER functions. Also added a work around 68960Sstevel@tonic-gate to a Win95 console bug. This was triggered by the password read stuff: the 68970Sstevel@tonic-gate last character typed gets carried over to the next fread(). If you were 68980Sstevel@tonic-gate generating a new cert request using 'req' for example then the last 68990Sstevel@tonic-gate character of the passphrase would be CR which would then enter the first 69000Sstevel@tonic-gate field as blank. 69010Sstevel@tonic-gate [Steve Henson] 69020Sstevel@tonic-gate 69030Sstevel@tonic-gate *) Added the new `Includes OpenSSL Cryptography Software' button as 69040Sstevel@tonic-gate doc/openssl_button.{gif,html} which is similar in style to the old SSLeay 69050Sstevel@tonic-gate button and can be used by applications based on OpenSSL to show the 69060Sstevel@tonic-gate relationship to the OpenSSL project. 69070Sstevel@tonic-gate [Ralf S. Engelschall] 69080Sstevel@tonic-gate 69090Sstevel@tonic-gate *) Remove confusing variables in function signatures in files 69100Sstevel@tonic-gate ssl/ssl_lib.c and ssl/ssl.h. 69110Sstevel@tonic-gate [Lennart Bong <lob@kulthea.stacken.kth.se>] 69120Sstevel@tonic-gate 69130Sstevel@tonic-gate *) Don't install bss_file.c under PREFIX/include/ 69140Sstevel@tonic-gate [Lennart Bong <lob@kulthea.stacken.kth.se>] 69150Sstevel@tonic-gate 69160Sstevel@tonic-gate *) Get the Win32 compile working again. Modify mkdef.pl so it can handle 69170Sstevel@tonic-gate functions that return function pointers and has support for NT specific 69180Sstevel@tonic-gate stuff. Fix mk1mf.pl and VC-32.pl to support NT differences also. Various 69190Sstevel@tonic-gate #ifdef WIN32 and WINNTs sprinkled about the place and some changes from 69200Sstevel@tonic-gate unsigned to signed types: this was killing the Win32 compile. 69210Sstevel@tonic-gate [Steve Henson] 69220Sstevel@tonic-gate 69230Sstevel@tonic-gate *) Add new certificate file to stack functions, 69240Sstevel@tonic-gate SSL_add_dir_cert_subjects_to_stack() and 69250Sstevel@tonic-gate SSL_add_file_cert_subjects_to_stack(). These largely supplant 69260Sstevel@tonic-gate SSL_load_client_CA_file(), and can be used to add multiple certs easily 69270Sstevel@tonic-gate to a stack (usually this is then handed to SSL_CTX_set_client_CA_list()). 69280Sstevel@tonic-gate This means that Apache-SSL and similar packages don't have to mess around 69290Sstevel@tonic-gate to add as many CAs as they want to the preferred list. 69300Sstevel@tonic-gate [Ben Laurie] 69310Sstevel@tonic-gate 69320Sstevel@tonic-gate *) Experiment with doxygen documentation. Currently only partially applied to 69330Sstevel@tonic-gate ssl/ssl_lib.c. 69340Sstevel@tonic-gate See http://www.stack.nl/~dimitri/doxygen/index.html, and run doxygen with 69350Sstevel@tonic-gate openssl.doxy as the configuration file. 69360Sstevel@tonic-gate [Ben Laurie] 69370Sstevel@tonic-gate 69380Sstevel@tonic-gate *) Get rid of remaining C++-style comments which strict C compilers hate. 69390Sstevel@tonic-gate [Ralf S. Engelschall, pointed out by Carlos Amengual] 69400Sstevel@tonic-gate 69410Sstevel@tonic-gate *) Changed BN_RECURSION in bn_mont.c to BN_RECURSION_MONT so it is not 69420Sstevel@tonic-gate compiled in by default: it has problems with large keys. 69430Sstevel@tonic-gate [Steve Henson] 69440Sstevel@tonic-gate 69450Sstevel@tonic-gate *) Add a bunch of SSL_xxx() functions for configuring the temporary RSA and 69460Sstevel@tonic-gate DH private keys and/or callback functions which directly correspond to 69470Sstevel@tonic-gate their SSL_CTX_xxx() counterparts but work on a per-connection basis. This 69480Sstevel@tonic-gate is needed for applications which have to configure certificates on a 69490Sstevel@tonic-gate per-connection basis (e.g. Apache+mod_ssl) instead of a per-context basis 69500Sstevel@tonic-gate (e.g. s_server). 69510Sstevel@tonic-gate For the RSA certificate situation is makes no difference, but 69520Sstevel@tonic-gate for the DSA certificate situation this fixes the "no shared cipher" 69530Sstevel@tonic-gate problem where the OpenSSL cipher selection procedure failed because the 69540Sstevel@tonic-gate temporary keys were not overtaken from the context and the API provided 69550Sstevel@tonic-gate no way to reconfigure them. 69560Sstevel@tonic-gate The new functions now let applications reconfigure the stuff and they 69570Sstevel@tonic-gate are in detail: SSL_need_tmp_RSA, SSL_set_tmp_rsa, SSL_set_tmp_dh, 69580Sstevel@tonic-gate SSL_set_tmp_rsa_callback and SSL_set_tmp_dh_callback. Additionally a new 69590Sstevel@tonic-gate non-public-API function ssl_cert_instantiate() is used as a helper 69600Sstevel@tonic-gate function and also to reduce code redundancy inside ssl_rsa.c. 69610Sstevel@tonic-gate [Ralf S. Engelschall] 69620Sstevel@tonic-gate 69630Sstevel@tonic-gate *) Move s_server -dcert and -dkey options out of the undocumented feature 69640Sstevel@tonic-gate area because they are useful for the DSA situation and should be 69650Sstevel@tonic-gate recognized by the users. 69660Sstevel@tonic-gate [Ralf S. Engelschall] 69670Sstevel@tonic-gate 69680Sstevel@tonic-gate *) Fix the cipher decision scheme for export ciphers: the export bits are 69690Sstevel@tonic-gate *not* within SSL_MKEY_MASK or SSL_AUTH_MASK, they are within 69700Sstevel@tonic-gate SSL_EXP_MASK. So, the original variable has to be used instead of the 69710Sstevel@tonic-gate already masked variable. 69720Sstevel@tonic-gate [Richard Levitte <levitte@stacken.kth.se>] 69730Sstevel@tonic-gate 69740Sstevel@tonic-gate *) Fix 'port' variable from `int' to `unsigned int' in crypto/bio/b_sock.c 69750Sstevel@tonic-gate [Richard Levitte <levitte@stacken.kth.se>] 69760Sstevel@tonic-gate 69770Sstevel@tonic-gate *) Change type of another md_len variable in pk7_doit.c:PKCS7_dataFinal() 69780Sstevel@tonic-gate from `int' to `unsigned int' because it's a length and initialized by 69790Sstevel@tonic-gate EVP_DigestFinal() which expects an `unsigned int *'. 69800Sstevel@tonic-gate [Richard Levitte <levitte@stacken.kth.se>] 69810Sstevel@tonic-gate 69820Sstevel@tonic-gate *) Don't hard-code path to Perl interpreter on shebang line of Configure 69830Sstevel@tonic-gate script. Instead use the usual Shell->Perl transition trick. 69840Sstevel@tonic-gate [Ralf S. Engelschall] 69850Sstevel@tonic-gate 69860Sstevel@tonic-gate *) Make `openssl x509 -noout -modulus' functional also for DSA certificates 69870Sstevel@tonic-gate (in addition to RSA certificates) to match the behaviour of `openssl dsa 69880Sstevel@tonic-gate -noout -modulus' as it's already the case for `openssl rsa -noout 69890Sstevel@tonic-gate -modulus'. For RSA the -modulus is the real "modulus" while for DSA 69900Sstevel@tonic-gate currently the public key is printed (a decision which was already done by 69910Sstevel@tonic-gate `openssl dsa -modulus' in the past) which serves a similar purpose. 69920Sstevel@tonic-gate Additionally the NO_RSA no longer completely removes the whole -modulus 69930Sstevel@tonic-gate option; it now only avoids using the RSA stuff. Same applies to NO_DSA 69940Sstevel@tonic-gate now, too. 69950Sstevel@tonic-gate [Ralf S. Engelschall] 69960Sstevel@tonic-gate 69970Sstevel@tonic-gate *) Add Arne Ansper's reliable BIO - this is an encrypted, block-digested 69980Sstevel@tonic-gate BIO. See the source (crypto/evp/bio_ok.c) for more info. 69990Sstevel@tonic-gate [Arne Ansper <arne@ats.cyber.ee>] 70000Sstevel@tonic-gate 70010Sstevel@tonic-gate *) Dump the old yucky req code that tried (and failed) to allow raw OIDs 70020Sstevel@tonic-gate to be added. Now both 'req' and 'ca' can use new objects defined in the 70030Sstevel@tonic-gate config file. 70040Sstevel@tonic-gate [Steve Henson] 70050Sstevel@tonic-gate 70060Sstevel@tonic-gate *) Add cool BIO that does syslog (or event log on NT). 70070Sstevel@tonic-gate [Arne Ansper <arne@ats.cyber.ee>, integrated by Ben Laurie] 70080Sstevel@tonic-gate 70090Sstevel@tonic-gate *) Add support for new TLS ciphersuites, TLS_RSA_EXPORT56_WITH_RC4_56_MD5, 70100Sstevel@tonic-gate TLS_RSA_EXPORT56_WITH_RC2_CBC_56_MD5 and 70110Sstevel@tonic-gate TLS_RSA_EXPORT56_WITH_DES_CBC_SHA, as specified in "56-bit Export Cipher 70120Sstevel@tonic-gate Suites For TLS", draft-ietf-tls-56-bit-ciphersuites-00.txt. 70130Sstevel@tonic-gate [Ben Laurie] 70140Sstevel@tonic-gate 70150Sstevel@tonic-gate *) Add preliminary config info for new extension code. 70160Sstevel@tonic-gate [Steve Henson] 70170Sstevel@tonic-gate 70180Sstevel@tonic-gate *) Make RSA_NO_PADDING really use no padding. 70190Sstevel@tonic-gate [Ulf Moeller <ulf@fitug.de>] 70200Sstevel@tonic-gate 70210Sstevel@tonic-gate *) Generate errors when private/public key check is done. 70220Sstevel@tonic-gate [Ben Laurie] 70230Sstevel@tonic-gate 70240Sstevel@tonic-gate *) Overhaul for 'crl' utility. New function X509_CRL_print. Partial support 70250Sstevel@tonic-gate for some CRL extensions and new objects added. 70260Sstevel@tonic-gate [Steve Henson] 70270Sstevel@tonic-gate 70280Sstevel@tonic-gate *) Really fix the ASN1 IMPLICIT bug this time... Partial support for private 70290Sstevel@tonic-gate key usage extension and fuller support for authority key id. 70300Sstevel@tonic-gate [Steve Henson] 70310Sstevel@tonic-gate 70320Sstevel@tonic-gate *) Add OAEP encryption for the OpenSSL crypto library. OAEP is the improved 70330Sstevel@tonic-gate padding method for RSA, which is recommended for new applications in PKCS 70340Sstevel@tonic-gate #1 v2.0 (RFC 2437, October 1998). 70350Sstevel@tonic-gate OAEP (Optimal Asymmetric Encryption Padding) has better theoretical 70360Sstevel@tonic-gate foundations than the ad-hoc padding used in PKCS #1 v1.5. It is secure 70370Sstevel@tonic-gate against Bleichbacher's attack on RSA. 70380Sstevel@tonic-gate [Ulf Moeller <ulf@fitug.de>, reformatted, corrected and integrated by 70390Sstevel@tonic-gate Ben Laurie] 70400Sstevel@tonic-gate 70410Sstevel@tonic-gate *) Updates to the new SSL compression code 70420Sstevel@tonic-gate [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] 70430Sstevel@tonic-gate 70440Sstevel@tonic-gate *) Fix so that the version number in the master secret, when passed 70450Sstevel@tonic-gate via RSA, checks that if TLS was proposed, but we roll back to SSLv3 70460Sstevel@tonic-gate (because the server will not accept higher), that the version number 70470Sstevel@tonic-gate is 0x03,0x01, not 0x03,0x00 70480Sstevel@tonic-gate [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] 70490Sstevel@tonic-gate 70500Sstevel@tonic-gate *) Run extensive memory leak checks on SSL apps. Fixed *lots* of memory 70510Sstevel@tonic-gate leaks in ssl/ relating to new X509_get_pubkey() behaviour. Also fixes 70520Sstevel@tonic-gate in apps/ and an unrelated leak in crypto/dsa/dsa_vrf.c 70530Sstevel@tonic-gate [Steve Henson] 70540Sstevel@tonic-gate 70550Sstevel@tonic-gate *) Support for RAW extensions where an arbitrary extension can be 70560Sstevel@tonic-gate created by including its DER encoding. See apps/openssl.cnf for 70570Sstevel@tonic-gate an example. 70580Sstevel@tonic-gate [Steve Henson] 70590Sstevel@tonic-gate 70600Sstevel@tonic-gate *) Make sure latest Perl versions don't interpret some generated C array 70610Sstevel@tonic-gate code as Perl array code in the crypto/err/err_genc.pl script. 70620Sstevel@tonic-gate [Lars Weber <3weber@informatik.uni-hamburg.de>] 70630Sstevel@tonic-gate 70640Sstevel@tonic-gate *) Modify ms/do_ms.bat to not generate assembly language makefiles since 70650Sstevel@tonic-gate not many people have the assembler. Various Win32 compilation fixes and 70660Sstevel@tonic-gate update to the INSTALL.W32 file with (hopefully) more accurate Win32 70670Sstevel@tonic-gate build instructions. 70680Sstevel@tonic-gate [Steve Henson] 70690Sstevel@tonic-gate 70700Sstevel@tonic-gate *) Modify configure script 'Configure' to automatically create crypto/date.h 70710Sstevel@tonic-gate file under Win32 and also build pem.h from pem.org. New script 70720Sstevel@tonic-gate util/mkfiles.pl to create the MINFO file on environments that can't do a 70730Sstevel@tonic-gate 'make files': perl util/mkfiles.pl >MINFO should work. 70740Sstevel@tonic-gate [Steve Henson] 70750Sstevel@tonic-gate 70760Sstevel@tonic-gate *) Major rework of DES function declarations, in the pursuit of correctness 70770Sstevel@tonic-gate and purity. As a result, many evil casts evaporated, and some weirdness, 70780Sstevel@tonic-gate too. You may find this causes warnings in your code. Zapping your evil 70790Sstevel@tonic-gate casts will probably fix them. Mostly. 70800Sstevel@tonic-gate [Ben Laurie] 70810Sstevel@tonic-gate 70820Sstevel@tonic-gate *) Fix for a typo in asn1.h. Bug fix to object creation script 70830Sstevel@tonic-gate obj_dat.pl. It considered a zero in an object definition to mean 70840Sstevel@tonic-gate "end of object": none of the objects in objects.h have any zeros 70850Sstevel@tonic-gate so it wasn't spotted. 70860Sstevel@tonic-gate [Steve Henson, reported by Erwann ABALEA <eabalea@certplus.com>] 70870Sstevel@tonic-gate 70880Sstevel@tonic-gate *) Add support for Triple DES Cipher Block Chaining with Output Feedback 70890Sstevel@tonic-gate Masking (CBCM). In the absence of test vectors, the best I have been able 70900Sstevel@tonic-gate to do is check that the decrypt undoes the encrypt, so far. Send me test 70910Sstevel@tonic-gate vectors if you have them. 70920Sstevel@tonic-gate [Ben Laurie] 70930Sstevel@tonic-gate 70940Sstevel@tonic-gate *) Correct calculation of key length for export ciphers (too much space was 70950Sstevel@tonic-gate allocated for null ciphers). This has not been tested! 70960Sstevel@tonic-gate [Ben Laurie] 70970Sstevel@tonic-gate 70980Sstevel@tonic-gate *) Modifications to the mkdef.pl for Win32 DEF file creation. The usage 70990Sstevel@tonic-gate message is now correct (it understands "crypto" and "ssl" on its 71000Sstevel@tonic-gate command line). There is also now an "update" option. This will update 71010Sstevel@tonic-gate the util/ssleay.num and util/libeay.num files with any new functions. 71020Sstevel@tonic-gate If you do a: 71030Sstevel@tonic-gate perl util/mkdef.pl crypto ssl update 71040Sstevel@tonic-gate it will update them. 71050Sstevel@tonic-gate [Steve Henson] 71060Sstevel@tonic-gate 71070Sstevel@tonic-gate *) Overhauled the Perl interface (perl/*): 71080Sstevel@tonic-gate - ported BN stuff to OpenSSL's different BN library 71090Sstevel@tonic-gate - made the perl/ source tree CVS-aware 71100Sstevel@tonic-gate - renamed the package from SSLeay to OpenSSL (the files still contain 71110Sstevel@tonic-gate their history because I've copied them in the repository) 71120Sstevel@tonic-gate - removed obsolete files (the test scripts will be replaced 71130Sstevel@tonic-gate by better Test::Harness variants in the future) 71140Sstevel@tonic-gate [Ralf S. Engelschall] 71150Sstevel@tonic-gate 71160Sstevel@tonic-gate *) First cut for a very conservative source tree cleanup: 71170Sstevel@tonic-gate 1. merge various obsolete readme texts into doc/ssleay.txt 71180Sstevel@tonic-gate where we collect the old documents and readme texts. 71190Sstevel@tonic-gate 2. remove the first part of files where I'm already sure that we no 71200Sstevel@tonic-gate longer need them because of three reasons: either they are just temporary 71210Sstevel@tonic-gate files which were left by Eric or they are preserved original files where 71220Sstevel@tonic-gate I've verified that the diff is also available in the CVS via "cvs diff 71230Sstevel@tonic-gate -rSSLeay_0_8_1b" or they were renamed (as it was definitely the case for 71240Sstevel@tonic-gate the crypto/md/ stuff). 71250Sstevel@tonic-gate [Ralf S. Engelschall] 71260Sstevel@tonic-gate 71270Sstevel@tonic-gate *) More extension code. Incomplete support for subject and issuer alt 71280Sstevel@tonic-gate name, issuer and authority key id. Change the i2v function parameters 71290Sstevel@tonic-gate and add an extra 'crl' parameter in the X509V3_CTX structure: guess 71300Sstevel@tonic-gate what that's for :-) Fix to ASN1 macro which messed up 71310Sstevel@tonic-gate IMPLICIT tag and add f_enum.c which adds a2i, i2a for ENUMERATED. 71320Sstevel@tonic-gate [Steve Henson] 71330Sstevel@tonic-gate 71340Sstevel@tonic-gate *) Preliminary support for ENUMERATED type. This is largely copied from the 71350Sstevel@tonic-gate INTEGER code. 71360Sstevel@tonic-gate [Steve Henson] 71370Sstevel@tonic-gate 71380Sstevel@tonic-gate *) Add new function, EVP_MD_CTX_copy() to replace frequent use of memcpy. 71390Sstevel@tonic-gate [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] 71400Sstevel@tonic-gate 71410Sstevel@tonic-gate *) Make sure `make rehash' target really finds the `openssl' program. 71420Sstevel@tonic-gate [Ralf S. Engelschall, Matthias Loepfe <Matthias.Loepfe@adnovum.ch>] 71430Sstevel@tonic-gate 71440Sstevel@tonic-gate *) Squeeze another 7% of speed out of MD5 assembler, at least on a P2. I'd 71450Sstevel@tonic-gate like to hear about it if this slows down other processors. 71460Sstevel@tonic-gate [Ben Laurie] 71470Sstevel@tonic-gate 71480Sstevel@tonic-gate *) Add CygWin32 platform information to Configure script. 71490Sstevel@tonic-gate [Alan Batie <batie@aahz.jf.intel.com>] 71500Sstevel@tonic-gate 71510Sstevel@tonic-gate *) Fixed ms/32all.bat script: `no_asm' -> `no-asm' 71520Sstevel@tonic-gate [Rainer W. Gerling <gerling@mpg-gv.mpg.de>] 71530Sstevel@tonic-gate 71540Sstevel@tonic-gate *) New program nseq to manipulate netscape certificate sequences 71550Sstevel@tonic-gate [Steve Henson] 71560Sstevel@tonic-gate 71570Sstevel@tonic-gate *) Modify crl2pkcs7 so it supports multiple -certfile arguments. Fix a 71580Sstevel@tonic-gate few typos. 71590Sstevel@tonic-gate [Steve Henson] 71600Sstevel@tonic-gate 71610Sstevel@tonic-gate *) Fixes to BN code. Previously the default was to define BN_RECURSION 71620Sstevel@tonic-gate but the BN code had some problems that would cause failures when 71630Sstevel@tonic-gate doing certificate verification and some other functions. 71640Sstevel@tonic-gate [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] 71650Sstevel@tonic-gate 71660Sstevel@tonic-gate *) Add ASN1 and PEM code to support netscape certificate sequences. 71670Sstevel@tonic-gate [Steve Henson] 71680Sstevel@tonic-gate 71690Sstevel@tonic-gate *) Add ASN1 and PEM code to support netscape certificate sequences. 71700Sstevel@tonic-gate [Steve Henson] 71710Sstevel@tonic-gate 71720Sstevel@tonic-gate *) Add several PKIX and private extended key usage OIDs. 71730Sstevel@tonic-gate [Steve Henson] 71740Sstevel@tonic-gate 71750Sstevel@tonic-gate *) Modify the 'ca' program to handle the new extension code. Modify 71760Sstevel@tonic-gate openssl.cnf for new extension format, add comments. 71770Sstevel@tonic-gate [Steve Henson] 71780Sstevel@tonic-gate 71790Sstevel@tonic-gate *) More X509 V3 changes. Fix typo in v3_bitstr.c. Add support to 'req' 71800Sstevel@tonic-gate and add a sample to openssl.cnf so req -x509 now adds appropriate 71810Sstevel@tonic-gate CA extensions. 71820Sstevel@tonic-gate [Steve Henson] 71830Sstevel@tonic-gate 71840Sstevel@tonic-gate *) Continued X509 V3 changes. Add to other makefiles, integrate with the 71850Sstevel@tonic-gate error code, add initial support to X509_print() and x509 application. 71860Sstevel@tonic-gate [Steve Henson] 71870Sstevel@tonic-gate 71880Sstevel@tonic-gate *) Takes a deep breath and start addding X509 V3 extension support code. Add 71890Sstevel@tonic-gate files in crypto/x509v3. Move original stuff to crypto/x509v3/old. All this 71900Sstevel@tonic-gate stuff is currently isolated and isn't even compiled yet. 71910Sstevel@tonic-gate [Steve Henson] 71920Sstevel@tonic-gate 71930Sstevel@tonic-gate *) Continuing patches for GeneralizedTime. Fix up certificate and CRL 71940Sstevel@tonic-gate ASN1 to use ASN1_TIME and modify print routines to use ASN1_TIME_print. 71950Sstevel@tonic-gate Removed the versions check from X509 routines when loading extensions: 71960Sstevel@tonic-gate this allows certain broken certificates that don't set the version 71970Sstevel@tonic-gate properly to be processed. 71980Sstevel@tonic-gate [Steve Henson] 71990Sstevel@tonic-gate 72000Sstevel@tonic-gate *) Deal with irritating shit to do with dependencies, in YAAHW (Yet Another 72010Sstevel@tonic-gate Ad Hoc Way) - Makefile.ssls now all contain local dependencies, which 72020Sstevel@tonic-gate can still be regenerated with "make depend". 72030Sstevel@tonic-gate [Ben Laurie] 72040Sstevel@tonic-gate 72050Sstevel@tonic-gate *) Spelling mistake in C version of CAST-128. 72060Sstevel@tonic-gate [Ben Laurie, reported by Jeremy Hylton <jeremy@cnri.reston.va.us>] 72070Sstevel@tonic-gate 72080Sstevel@tonic-gate *) Changes to the error generation code. The perl script err-code.pl 72090Sstevel@tonic-gate now reads in the old error codes and retains the old numbers, only 72100Sstevel@tonic-gate adding new ones if necessary. It also only changes the .err files if new 72110Sstevel@tonic-gate codes are added. The makefiles have been modified to only insert errors 72120Sstevel@tonic-gate when needed (to avoid needlessly modifying header files). This is done 72130Sstevel@tonic-gate by only inserting errors if the .err file is newer than the auto generated 72140Sstevel@tonic-gate C file. To rebuild all the error codes from scratch (the old behaviour) 72150Sstevel@tonic-gate either modify crypto/Makefile.ssl to pass the -regen flag to err_code.pl 72160Sstevel@tonic-gate or delete all the .err files. 72170Sstevel@tonic-gate [Steve Henson] 72180Sstevel@tonic-gate 72190Sstevel@tonic-gate *) CAST-128 was incorrectly implemented for short keys. The C version has 72200Sstevel@tonic-gate been fixed, but is untested. The assembler versions are also fixed, but 72210Sstevel@tonic-gate new assembler HAS NOT BEEN GENERATED FOR WIN32 - the Makefile needs fixing 72220Sstevel@tonic-gate to regenerate it if needed. 72230Sstevel@tonic-gate [Ben Laurie, reported (with fix for C version) by Jun-ichiro itojun 72240Sstevel@tonic-gate Hagino <itojun@kame.net>] 72250Sstevel@tonic-gate 72260Sstevel@tonic-gate *) File was opened incorrectly in randfile.c. 72270Sstevel@tonic-gate [Ulf M�ller <ulf@fitug.de>] 72280Sstevel@tonic-gate 72290Sstevel@tonic-gate *) Beginning of support for GeneralizedTime. d2i, i2d, check and print 72300Sstevel@tonic-gate functions. Also ASN1_TIME suite which is a CHOICE of UTCTime or 72310Sstevel@tonic-gate GeneralizedTime. ASN1_TIME is the proper type used in certificates et 72320Sstevel@tonic-gate al: it's just almost always a UTCTime. Note this patch adds new error 72330Sstevel@tonic-gate codes so do a "make errors" if there are problems. 72340Sstevel@tonic-gate [Steve Henson] 72350Sstevel@tonic-gate 72360Sstevel@tonic-gate *) Correct Linux 1 recognition in config. 72370Sstevel@tonic-gate [Ulf M�ller <ulf@fitug.de>] 72380Sstevel@tonic-gate 72390Sstevel@tonic-gate *) Remove pointless MD5 hash when using DSA keys in ca. 72400Sstevel@tonic-gate [Anonymous <nobody@replay.com>] 72410Sstevel@tonic-gate 72420Sstevel@tonic-gate *) Generate an error if given an empty string as a cert directory. Also 72430Sstevel@tonic-gate generate an error if handed NULL (previously returned 0 to indicate an 72440Sstevel@tonic-gate error, but didn't set one). 72450Sstevel@tonic-gate [Ben Laurie, reported by Anonymous <nobody@replay.com>] 72460Sstevel@tonic-gate 72470Sstevel@tonic-gate *) Add prototypes to SSL methods. Make SSL_write's buffer const, at last. 72480Sstevel@tonic-gate [Ben Laurie] 72490Sstevel@tonic-gate 72500Sstevel@tonic-gate *) Fix the dummy function BN_ref_mod_exp() in rsaref.c to have the correct 72510Sstevel@tonic-gate parameters. This was causing a warning which killed off the Win32 compile. 72520Sstevel@tonic-gate [Steve Henson] 72530Sstevel@tonic-gate 72540Sstevel@tonic-gate *) Remove C++ style comments from crypto/bn/bn_local.h. 72550Sstevel@tonic-gate [Neil Costigan <neil.costigan@celocom.com>] 72560Sstevel@tonic-gate 72570Sstevel@tonic-gate *) The function OBJ_txt2nid was broken. It was supposed to return a nid 72580Sstevel@tonic-gate based on a text string, looking up short and long names and finally 72590Sstevel@tonic-gate "dot" format. The "dot" format stuff didn't work. Added new function 72600Sstevel@tonic-gate OBJ_txt2obj to do the same but return an ASN1_OBJECT and rewrote 72610Sstevel@tonic-gate OBJ_txt2nid to use it. OBJ_txt2obj can also return objects even if the 72620Sstevel@tonic-gate OID is not part of the table. 72630Sstevel@tonic-gate [Steve Henson] 72640Sstevel@tonic-gate 72650Sstevel@tonic-gate *) Add prototypes to X509 lookup/verify methods, fixing a bug in 72660Sstevel@tonic-gate X509_LOOKUP_by_alias(). 72670Sstevel@tonic-gate [Ben Laurie] 72680Sstevel@tonic-gate 72690Sstevel@tonic-gate *) Sort openssl functions by name. 72700Sstevel@tonic-gate [Ben Laurie] 72710Sstevel@tonic-gate 72720Sstevel@tonic-gate *) Get the gendsa program working (hopefully) and add it to app list. Remove 72730Sstevel@tonic-gate encryption from sample DSA keys (in case anyone is interested the password 72740Sstevel@tonic-gate was "1234"). 72750Sstevel@tonic-gate [Steve Henson] 72760Sstevel@tonic-gate 72770Sstevel@tonic-gate *) Make _all_ *_free functions accept a NULL pointer. 72780Sstevel@tonic-gate [Frans Heymans <fheymans@isaserver.be>] 72790Sstevel@tonic-gate 72800Sstevel@tonic-gate *) If a DH key is generated in s3_srvr.c, don't blow it by trying to use 72810Sstevel@tonic-gate NULL pointers. 72820Sstevel@tonic-gate [Anonymous <nobody@replay.com>] 72830Sstevel@tonic-gate 72840Sstevel@tonic-gate *) s_server should send the CAfile as acceptable CAs, not its own cert. 72850Sstevel@tonic-gate [Bodo Moeller <3moeller@informatik.uni-hamburg.de>] 72860Sstevel@tonic-gate 72870Sstevel@tonic-gate *) Don't blow it for numeric -newkey arguments to apps/req. 72880Sstevel@tonic-gate [Bodo Moeller <3moeller@informatik.uni-hamburg.de>] 72890Sstevel@tonic-gate 72900Sstevel@tonic-gate *) Temp key "for export" tests were wrong in s3_srvr.c. 72910Sstevel@tonic-gate [Anonymous <nobody@replay.com>] 72920Sstevel@tonic-gate 72930Sstevel@tonic-gate *) Add prototype for temp key callback functions 72940Sstevel@tonic-gate SSL_CTX_set_tmp_{rsa,dh}_callback(). 72950Sstevel@tonic-gate [Ben Laurie] 72960Sstevel@tonic-gate 72970Sstevel@tonic-gate *) Make DH_free() tolerate being passed a NULL pointer (like RSA_free() and 72980Sstevel@tonic-gate DSA_free()). Make X509_PUBKEY_set() check for errors in d2i_PublicKey(). 72990Sstevel@tonic-gate [Steve Henson] 73000Sstevel@tonic-gate 73010Sstevel@tonic-gate *) X509_name_add_entry() freed the wrong thing after an error. 73020Sstevel@tonic-gate [Arne Ansper <arne@ats.cyber.ee>] 73030Sstevel@tonic-gate 73040Sstevel@tonic-gate *) rsa_eay.c would attempt to free a NULL context. 73050Sstevel@tonic-gate [Arne Ansper <arne@ats.cyber.ee>] 73060Sstevel@tonic-gate 73070Sstevel@tonic-gate *) BIO_s_socket() had a broken should_retry() on Windoze. 73080Sstevel@tonic-gate [Arne Ansper <arne@ats.cyber.ee>] 73090Sstevel@tonic-gate 73100Sstevel@tonic-gate *) BIO_f_buffer() didn't pass on BIO_CTRL_FLUSH. 73110Sstevel@tonic-gate [Arne Ansper <arne@ats.cyber.ee>] 73120Sstevel@tonic-gate 73130Sstevel@tonic-gate *) Make sure the already existing X509_STORE->depth variable is initialized 73140Sstevel@tonic-gate in X509_STORE_new(), but document the fact that this variable is still 73150Sstevel@tonic-gate unused in the certificate verification process. 73160Sstevel@tonic-gate [Ralf S. Engelschall] 73170Sstevel@tonic-gate 73180Sstevel@tonic-gate *) Fix the various library and apps files to free up pkeys obtained from 73190Sstevel@tonic-gate X509_PUBKEY_get() et al. Also allow x509.c to handle netscape extensions. 73200Sstevel@tonic-gate [Steve Henson] 73210Sstevel@tonic-gate 73220Sstevel@tonic-gate *) Fix reference counting in X509_PUBKEY_get(). This makes 73230Sstevel@tonic-gate demos/maurice/example2.c work, amongst others, probably. 73240Sstevel@tonic-gate [Steve Henson and Ben Laurie] 73250Sstevel@tonic-gate 73260Sstevel@tonic-gate *) First cut of a cleanup for apps/. First the `ssleay' program is now named 73270Sstevel@tonic-gate `openssl' and second, the shortcut symlinks for the `openssl <command>' 73280Sstevel@tonic-gate are no longer created. This way we have a single and consistent command 73290Sstevel@tonic-gate line interface `openssl <command>', similar to `cvs <command>'. 73300Sstevel@tonic-gate [Ralf S. Engelschall, Paul Sutton and Ben Laurie] 73310Sstevel@tonic-gate 73320Sstevel@tonic-gate *) ca.c: move test for DSA keys inside #ifndef NO_DSA. Make pubkey 73330Sstevel@tonic-gate BIT STRING wrapper always have zero unused bits. 73340Sstevel@tonic-gate [Steve Henson] 73350Sstevel@tonic-gate 73360Sstevel@tonic-gate *) Add CA.pl, perl version of CA.sh, add extended key usage OID. 73370Sstevel@tonic-gate [Steve Henson] 73380Sstevel@tonic-gate 73390Sstevel@tonic-gate *) Make the top-level INSTALL documentation easier to understand. 73400Sstevel@tonic-gate [Paul Sutton] 73410Sstevel@tonic-gate 73420Sstevel@tonic-gate *) Makefiles updated to exit if an error occurs in a sub-directory 73430Sstevel@tonic-gate make (including if user presses ^C) [Paul Sutton] 73440Sstevel@tonic-gate 73450Sstevel@tonic-gate *) Make Montgomery context stuff explicit in RSA data structure. 73460Sstevel@tonic-gate [Ben Laurie] 73470Sstevel@tonic-gate 73480Sstevel@tonic-gate *) Fix build order of pem and err to allow for generated pem.h. 73490Sstevel@tonic-gate [Ben Laurie] 73500Sstevel@tonic-gate 73510Sstevel@tonic-gate *) Fix renumbering bug in X509_NAME_delete_entry(). 73520Sstevel@tonic-gate [Ben Laurie] 73530Sstevel@tonic-gate 73540Sstevel@tonic-gate *) Enhanced the err-ins.pl script so it makes the error library number 73550Sstevel@tonic-gate global and can add a library name. This is needed for external ASN1 and 73560Sstevel@tonic-gate other error libraries. 73570Sstevel@tonic-gate [Steve Henson] 73580Sstevel@tonic-gate 73590Sstevel@tonic-gate *) Fixed sk_insert which never worked properly. 73600Sstevel@tonic-gate [Steve Henson] 73610Sstevel@tonic-gate 73620Sstevel@tonic-gate *) Fix ASN1 macros so they can handle indefinite length construted 73630Sstevel@tonic-gate EXPLICIT tags. Some non standard certificates use these: they can now 73640Sstevel@tonic-gate be read in. 73650Sstevel@tonic-gate [Steve Henson] 73660Sstevel@tonic-gate 73670Sstevel@tonic-gate *) Merged the various old/obsolete SSLeay documentation files (doc/xxx.doc) 73680Sstevel@tonic-gate into a single doc/ssleay.txt bundle. This way the information is still 73690Sstevel@tonic-gate preserved but no longer messes up this directory. Now it's new room for 73700Sstevel@tonic-gate the new set of documenation files. 73710Sstevel@tonic-gate [Ralf S. Engelschall] 73720Sstevel@tonic-gate 73730Sstevel@tonic-gate *) SETs were incorrectly DER encoded. This was a major pain, because they 73740Sstevel@tonic-gate shared code with SEQUENCEs, which aren't coded the same. This means that 73750Sstevel@tonic-gate almost everything to do with SETs or SEQUENCEs has either changed name or 73760Sstevel@tonic-gate number of arguments. 73770Sstevel@tonic-gate [Ben Laurie, based on a partial fix by GP Jayan <gp@nsj.co.jp>] 73780Sstevel@tonic-gate 73790Sstevel@tonic-gate *) Fix test data to work with the above. 73800Sstevel@tonic-gate [Ben Laurie] 73810Sstevel@tonic-gate 73820Sstevel@tonic-gate *) Fix the RSA header declarations that hid a bug I fixed in 0.9.0b but 73830Sstevel@tonic-gate was already fixed by Eric for 0.9.1 it seems. 73840Sstevel@tonic-gate [Ben Laurie - pointed out by Ulf M�ller <ulf@fitug.de>] 73850Sstevel@tonic-gate 73860Sstevel@tonic-gate *) Autodetect FreeBSD3. 73870Sstevel@tonic-gate [Ben Laurie] 73880Sstevel@tonic-gate 73890Sstevel@tonic-gate *) Fix various bugs in Configure. This affects the following platforms: 73900Sstevel@tonic-gate nextstep 73910Sstevel@tonic-gate ncr-scde 73920Sstevel@tonic-gate unixware-2.0 73930Sstevel@tonic-gate unixware-2.0-pentium 73940Sstevel@tonic-gate sco5-cc. 73950Sstevel@tonic-gate [Ben Laurie] 73960Sstevel@tonic-gate 73970Sstevel@tonic-gate *) Eliminate generated files from CVS. Reorder tests to regenerate files 73980Sstevel@tonic-gate before they are needed. 73990Sstevel@tonic-gate [Ben Laurie] 74000Sstevel@tonic-gate 74010Sstevel@tonic-gate *) Generate Makefile.ssl from Makefile.org (to keep CVS happy). 74020Sstevel@tonic-gate [Ben Laurie] 74030Sstevel@tonic-gate 74040Sstevel@tonic-gate 74050Sstevel@tonic-gate Changes between 0.9.1b and 0.9.1c [23-Dec-1998] 74060Sstevel@tonic-gate 74070Sstevel@tonic-gate *) Added OPENSSL_VERSION_NUMBER to crypto/crypto.h and 74080Sstevel@tonic-gate changed SSLeay to OpenSSL in version strings. 74090Sstevel@tonic-gate [Ralf S. Engelschall] 74100Sstevel@tonic-gate 74110Sstevel@tonic-gate *) Some fixups to the top-level documents. 74120Sstevel@tonic-gate [Paul Sutton] 74130Sstevel@tonic-gate 74140Sstevel@tonic-gate *) Fixed the nasty bug where rsaref.h was not found under compile-time 74150Sstevel@tonic-gate because the symlink to include/ was missing. 74160Sstevel@tonic-gate [Ralf S. Engelschall] 74170Sstevel@tonic-gate 74180Sstevel@tonic-gate *) Incorporated the popular no-RSA/DSA-only patches 74190Sstevel@tonic-gate which allow to compile a RSA-free SSLeay. 74200Sstevel@tonic-gate [Andrew Cooke / Interrader Ldt., Ralf S. Engelschall] 74210Sstevel@tonic-gate 74220Sstevel@tonic-gate *) Fixed nasty rehash problem under `make -f Makefile.ssl links' 74230Sstevel@tonic-gate when "ssleay" is still not found. 74240Sstevel@tonic-gate [Ralf S. Engelschall] 74250Sstevel@tonic-gate 74260Sstevel@tonic-gate *) Added more platforms to Configure: Cray T3E, HPUX 11, 74270Sstevel@tonic-gate [Ralf S. Engelschall, Beckmann <beckman@acl.lanl.gov>] 74280Sstevel@tonic-gate 74290Sstevel@tonic-gate *) Updated the README file. 74300Sstevel@tonic-gate [Ralf S. Engelschall] 74310Sstevel@tonic-gate 74320Sstevel@tonic-gate *) Added various .cvsignore files in the CVS repository subdirs 74330Sstevel@tonic-gate to make a "cvs update" really silent. 74340Sstevel@tonic-gate [Ralf S. Engelschall] 74350Sstevel@tonic-gate 74360Sstevel@tonic-gate *) Recompiled the error-definition header files and added 74370Sstevel@tonic-gate missing symbols to the Win32 linker tables. 74380Sstevel@tonic-gate [Ralf S. Engelschall] 74390Sstevel@tonic-gate 74400Sstevel@tonic-gate *) Cleaned up the top-level documents; 74410Sstevel@tonic-gate o new files: CHANGES and LICENSE 74420Sstevel@tonic-gate o merged VERSION, HISTORY* and README* files a CHANGES.SSLeay 74430Sstevel@tonic-gate o merged COPYRIGHT into LICENSE 74440Sstevel@tonic-gate o removed obsolete TODO file 74450Sstevel@tonic-gate o renamed MICROSOFT to INSTALL.W32 74460Sstevel@tonic-gate [Ralf S. Engelschall] 74470Sstevel@tonic-gate 74480Sstevel@tonic-gate *) Removed dummy files from the 0.9.1b source tree: 74490Sstevel@tonic-gate crypto/asn1/x crypto/bio/cd crypto/bio/fg crypto/bio/grep crypto/bio/vi 74500Sstevel@tonic-gate crypto/bn/asm/......add.c crypto/bn/asm/a.out crypto/dsa/f crypto/md5/f 74510Sstevel@tonic-gate crypto/pem/gmon.out crypto/perlasm/f crypto/pkcs7/build crypto/rsa/f 74520Sstevel@tonic-gate crypto/sha/asm/f crypto/threads/f ms/zzz ssl/f ssl/f.mak test/f 74530Sstevel@tonic-gate util/f.mak util/pl/f util/pl/f.mak crypto/bf/bf_locl.old apps/f 74540Sstevel@tonic-gate [Ralf S. Engelschall] 74550Sstevel@tonic-gate 74560Sstevel@tonic-gate *) Added various platform portability fixes. 74570Sstevel@tonic-gate [Mark J. Cox] 74580Sstevel@tonic-gate 74590Sstevel@tonic-gate *) The Genesis of the OpenSSL rpject: 74600Sstevel@tonic-gate We start with the latest (unreleased) SSLeay version 0.9.1b which Eric A. 74610Sstevel@tonic-gate Young and Tim J. Hudson created while they were working for C2Net until 74620Sstevel@tonic-gate summer 1998. 74630Sstevel@tonic-gate [The OpenSSL Project] 74640Sstevel@tonic-gate 74650Sstevel@tonic-gate 74660Sstevel@tonic-gate Changes between 0.9.0b and 0.9.1b [not released] 74670Sstevel@tonic-gate 74680Sstevel@tonic-gate *) Updated a few CA certificates under certs/ 74690Sstevel@tonic-gate [Eric A. Young] 74700Sstevel@tonic-gate 74710Sstevel@tonic-gate *) Changed some BIGNUM api stuff. 74720Sstevel@tonic-gate [Eric A. Young] 74730Sstevel@tonic-gate 74740Sstevel@tonic-gate *) Various platform ports: OpenBSD, Ultrix, IRIX 64bit, NetBSD, 74750Sstevel@tonic-gate DGUX x86, Linux Alpha, etc. 74760Sstevel@tonic-gate [Eric A. Young] 74770Sstevel@tonic-gate 74780Sstevel@tonic-gate *) New COMP library [crypto/comp/] for SSL Record Layer Compression: 74790Sstevel@tonic-gate RLE (dummy implemented) and ZLIB (really implemented when ZLIB is 74800Sstevel@tonic-gate available). 74810Sstevel@tonic-gate [Eric A. Young] 74820Sstevel@tonic-gate 74830Sstevel@tonic-gate *) Add -strparse option to asn1pars program which parses nested 74840Sstevel@tonic-gate binary structures 74850Sstevel@tonic-gate [Dr Stephen Henson <shenson@bigfoot.com>] 74860Sstevel@tonic-gate 74870Sstevel@tonic-gate *) Added "oid_file" to ssleay.cnf for "ca" and "req" programs. 74880Sstevel@tonic-gate [Eric A. Young] 74890Sstevel@tonic-gate 74900Sstevel@tonic-gate *) DSA fix for "ca" program. 74910Sstevel@tonic-gate [Eric A. Young] 74920Sstevel@tonic-gate 74930Sstevel@tonic-gate *) Added "-genkey" option to "dsaparam" program. 74940Sstevel@tonic-gate [Eric A. Young] 74950Sstevel@tonic-gate 74960Sstevel@tonic-gate *) Added RIPE MD160 (rmd160) message digest. 74970Sstevel@tonic-gate [Eric A. Young] 74980Sstevel@tonic-gate 74990Sstevel@tonic-gate *) Added -a (all) option to "ssleay version" command. 75000Sstevel@tonic-gate [Eric A. Young] 75010Sstevel@tonic-gate 75020Sstevel@tonic-gate *) Added PLATFORM define which is the id given to Configure. 75030Sstevel@tonic-gate [Eric A. Young] 75040Sstevel@tonic-gate 75050Sstevel@tonic-gate *) Added MemCheck_XXXX functions to crypto/mem.c for memory checking. 75060Sstevel@tonic-gate [Eric A. Young] 75070Sstevel@tonic-gate 75080Sstevel@tonic-gate *) Extended the ASN.1 parser routines. 75090Sstevel@tonic-gate [Eric A. Young] 75100Sstevel@tonic-gate 75110Sstevel@tonic-gate *) Extended BIO routines to support REUSEADDR, seek, tell, etc. 75120Sstevel@tonic-gate [Eric A. Young] 75130Sstevel@tonic-gate 75140Sstevel@tonic-gate *) Added a BN_CTX to the BN library. 75150Sstevel@tonic-gate [Eric A. Young] 75160Sstevel@tonic-gate 75170Sstevel@tonic-gate *) Fixed the weak key values in DES library 75180Sstevel@tonic-gate [Eric A. Young] 75190Sstevel@tonic-gate 75200Sstevel@tonic-gate *) Changed API in EVP library for cipher aliases. 75210Sstevel@tonic-gate [Eric A. Young] 75220Sstevel@tonic-gate 75230Sstevel@tonic-gate *) Added support for RC2/64bit cipher. 75240Sstevel@tonic-gate [Eric A. Young] 75250Sstevel@tonic-gate 75260Sstevel@tonic-gate *) Converted the lhash library to the crypto/mem.c functions. 75270Sstevel@tonic-gate [Eric A. Young] 75280Sstevel@tonic-gate 75290Sstevel@tonic-gate *) Added more recognized ASN.1 object ids. 75300Sstevel@tonic-gate [Eric A. Young] 75310Sstevel@tonic-gate 75320Sstevel@tonic-gate *) Added more RSA padding checks for SSL/TLS. 75330Sstevel@tonic-gate [Eric A. Young] 75340Sstevel@tonic-gate 75350Sstevel@tonic-gate *) Added BIO proxy/filter functionality. 75360Sstevel@tonic-gate [Eric A. Young] 75370Sstevel@tonic-gate 75380Sstevel@tonic-gate *) Added extra_certs to SSL_CTX which can be used 75390Sstevel@tonic-gate send extra CA certificates to the client in the CA cert chain sending 75400Sstevel@tonic-gate process. It can be configured with SSL_CTX_add_extra_chain_cert(). 75410Sstevel@tonic-gate [Eric A. Young] 75420Sstevel@tonic-gate 75430Sstevel@tonic-gate *) Now Fortezza is denied in the authentication phase because 75440Sstevel@tonic-gate this is key exchange mechanism is not supported by SSLeay at all. 75450Sstevel@tonic-gate [Eric A. Young] 75460Sstevel@tonic-gate 75470Sstevel@tonic-gate *) Additional PKCS1 checks. 75480Sstevel@tonic-gate [Eric A. Young] 75490Sstevel@tonic-gate 75500Sstevel@tonic-gate *) Support the string "TLSv1" for all TLS v1 ciphers. 75510Sstevel@tonic-gate [Eric A. Young] 75520Sstevel@tonic-gate 75530Sstevel@tonic-gate *) Added function SSL_get_ex_data_X509_STORE_CTX_idx() which gives the 75540Sstevel@tonic-gate ex_data index of the SSL context in the X509_STORE_CTX ex_data. 75550Sstevel@tonic-gate [Eric A. Young] 75560Sstevel@tonic-gate 75570Sstevel@tonic-gate *) Fixed a few memory leaks. 75580Sstevel@tonic-gate [Eric A. Young] 75590Sstevel@tonic-gate 75600Sstevel@tonic-gate *) Fixed various code and comment typos. 75610Sstevel@tonic-gate [Eric A. Young] 75620Sstevel@tonic-gate 75630Sstevel@tonic-gate *) A minor bug in ssl/s3_clnt.c where there would always be 4 0 75640Sstevel@tonic-gate bytes sent in the client random. 75650Sstevel@tonic-gate [Edward Bishop <ebishop@spyglass.com>] 75660Sstevel@tonic-gate 7567