1. 01 6月, 2000 14 次提交
    • G
      The previous commit to crypto/stack/*.[ch] pulled the type-safety strings · ccd86b68
      Geoff Thorpe 提交于
      yet tighter, and also put some heat on the rest of the library by
      insisting (correctly) that compare callbacks used in stacks are prototyped
      with "const" parameters. This has led to a depth-first explosion of
      compiler warnings in the code where 1 constification has led to 3 or 4
      more. Fortunately these have all been resolved to completion and the code
      seems cleaner as a result - in particular many of the _cmp() functions
      should have been prototyped with "const"s, and now are. There was one
      little problem however;
      
      X509_cmp() should by rights compare "const X509 *" pointers, and it is now
      declared as such. However, it's internal workings can involve
      recalculating hash values and extensions if they have not already been
      setup. Someone with a more intricate understanding of the flow control of
      X509 might be able to tighten this up, but for now - this seemed the
      obvious place to stop the "depth-first" constification of the code by
      using an evil cast (they have migrated all the way here from safestack.h).
      
      Fortunately, this is the only place in the code where this was required
      to complete these type-safety changes, and it's reasonably clear and
      commented, and seemed the least unacceptable of the options. Trying to
      take the constification further ends up exploding out considerably, and
      indeed leads directly into generalised ASN functions which are not likely
      to cooperate well with this.
      ccd86b68
    • G
      This is the first of two commits (didn't want to dump them all into the · 7bb70435
      Geoff Thorpe 提交于
      same one). However, the first will temporarily break things until the
      second comes through. :-)
      
      The safestack.h handling was mapping compare callbacks that externally
      are of the type (int (*)(type **,type **)) into the underlying callback
      type used by stack.[ch], which is (int (*)(void *,void *)). After some
      degree of digging, it appears that the callback type in the underlying
      stack code should use double pointers too - when the compare operations
      are invoked (from sk_find and sk_sort), they are being used by bsearch
      and qsort to compare two pointers to pointers. This change corrects the
      prototyping (by only casting to the (void*,void*) form at the moment
      it is needed by bsearch and qsort) and makes the mapping in safestack.h
      more transparent. It also changes from "void*" to "char*" to stay in
      keeping with stack.[ch]'s assumed base type of "char".
      
      Also - the "const" situation was that safestack.h was throwing away
      "const"s, and to compound the problem - a close examination of stack.c
      showed that (const char **) is not really achieving what it is supposed
      to when the callback is being invoked, what is needed is
      (const char * const *). So the underlying stack.[ch] and the mapping
      macros in safestack.h have all been altered to correct this.
      
      What will follow are the vast quantities of "const" corrections required
      in stack-dependant code that was being let "slip" through when
      safestack.h was discarding "const"s. These now all come up as compiler
      warnings.
      7bb70435
    • U
      is needed. · f3e9b338
      Ulf Möller 提交于
      f3e9b338
    • B
      typo · cbb6ad9d
      Bodo Möller 提交于
      cbb6ad9d
    • B
      dh and gendh have been obsoleted by dhparam. · 727daea7
      Bodo Möller 提交于
      727daea7
    • U
      #include <stdio.h> not needed. · 24538904
      Ulf Möller 提交于
      24538904
    • U
      #include <stdlib.h> is not needed. · 78e24268
      Ulf Möller 提交于
      78e24268
    • R
      Result of "make update" · 602ef2ae
      Richard Levitte 提交于
      602ef2ae
    • R
      This seems to become a FAQ... · 31efc3a7
      Richard Levitte 提交于
      31efc3a7
    • G
      sk_***_new_null() seems to be there to avoid exactly this sort of thing · a4e31088
      Geoff Thorpe 提交于
      which is a cast between NULL and a function pointer.
      a4e31088
    • G
      sk_value was also suffering from de-const-ification. · e20d7d71
      Geoff Thorpe 提交于
      Also, add in a couple of missing declarations in pkcs7 code.
      e20d7d71
    • R
      config can now detect ARM Linux automagically. · b1086116
      Richard Levitte 提交于
      Contributed by Jeremy Norris <jeremy.norris@rebel.com>
      b1086116
    • B
      strtoul is not used anywhere. · 15e98129
      Bodo Möller 提交于
      15e98129
    • B
      When compiling with /opt/SUNWspro/SC4.2/bin/cc on Solaris, __svr4__ is · af463e7e
      Bodo Möller 提交于
      not defined, but __SVR4 is.
      af463e7e
  2. 31 5月, 2000 5 次提交
    • G
      All the little functions created by the IMPLEMENT_STACK_OF() macro will · 01296a6d
      Geoff Thorpe 提交于
      cast their type-specific STACK into a real STACK and call the underlying
      sk_*** function. The problem is that if the STACK_OF(..) parameter being
      passed in has a "const *" qualifier, it is discarded by the cast.
      
      I'm currently implementing a fix for this but in the mean-time, this is
      one case I noticed (a few type-specific sk_**_num() functions pass in
      const type-specific stacks). If there are other errors in the code where
      consts are being discarded, we will similarly not notice them. yuck.
      01296a6d
    • B
      Move Windows seeding functions into a separate file. · 2ace287d
      Bodo Möller 提交于
      They have nothing to do with the particular PRNG (md_rand.c).
      2ace287d
    • B
      Add "FIXME" comment. · 939fff67
      Bodo Möller 提交于
      939fff67
    • B
      Improve PRNG robustness. · 361ee973
      Bodo Möller 提交于
      361ee973
    • D
      · 49528751
      Dr. Stephen Henson 提交于
      More EVP cipher revision.
      
      Change EVP_SealInit() and EVP_OpenInit() to
      handle cipher parameters.
      
      Make it possible to set RC2 and RC5 params.
      
      Make RC2 ASN1 code use the effective key bits
      and not the key length.
      
      TODO: document how new API works.
      49528751
  3. 30 5月, 2000 5 次提交
  4. 29 5月, 2000 5 次提交
  5. 28 5月, 2000 2 次提交
  6. 27 5月, 2000 2 次提交
    • D
      · be06a934
      Dr. Stephen Henson 提交于
      Second phase of EVP cipher overhaul.
      
      Change functions like EVP_EncryptUpdate() so they now return a
      value. These normally have software only implementations
      which cannot fail so this was acceptable. However ciphers
      can be implemented in hardware and these could return errors.
      be06a934
    • D
      · 7f060601
      Dr. Stephen Henson 提交于
      Beginnings of EVP cipher overhaul. This should eventually
      enhance and tidy up the EVP interface.
      
      This patch adds initial support for variable length ciphers
      and changes S/MIME code to use this.
      
      Some other library functions need modifying to support use
      of modified cipher parameters.
      
      Also need to change all the cipher functions that should
      return error codes, but currenly don't.
      
      And of course it needs extensive testing...
      7f060601
  7. 25 5月, 2000 4 次提交
  8. 24 5月, 2000 2 次提交
  9. 21 5月, 2000 1 次提交