Skip to content
  1. Apr 03, 2016
  2. Apr 02, 2016
  3. Apr 01, 2016
  4. Mar 31, 2016
  5. Mar 30, 2016
    • Matt Caswell's avatar
      Remove the CRYPTO_mem_leaks adjustment for the BIO · b3895f42
      Matt Caswell authored
      
      
      CRYPTO_mem_leaks attempts to adjust the count of bytes leaks to not
      include the BIO that is being used to print the results out. However this
      does not work properly. In all internal cases we switch off recording
      the memory allocation during creation of the BIO so it makes no difference.
      In other cases if the BIO allocates any additional memory during
      construction then the adjustment will be wrong anyway. It also skips over
      the BIO memory during print_leak anyway, so the BIO memory is never
      added into the total. In other words this was broken in lots of ways and
      has been since it was first added.
      
      The simplest solution is just to make it the documented behaviour that
      you must turn off memory logging when creating the BIO, and remove all
      the adjustment stuff completely. The adjustment code was only ever in
      master and never made it to a release branch so there is no loss of
      functionality.
      
      This commit also fixes a compilation failure when using
      enable-crypto-mdebug.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      b3895f42
    • Ben Laurie's avatar
      Fix buffer overrun in ASN1_parse(). · 79c7f74d
      Ben Laurie authored
      
      
      Fix buffer overrun in asn1_get_length().
      
      Reproducer: asn1parse-reproduce crash-6bfd417f47bc940f6984f5e639b637fd4e6074bc
      
      Fix length calculations.
      
      Reproducer: asn1parse-reproduce crash-1819d0e54cd2b0430626c59053e6077ef04c2ffb
      Reproducer: asn1parse-reproduce crash-9969db8603e644ddc0ba3459b51eac7a2c4b729b
      
      Make i long.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      79c7f74d
    • Richard Levitte's avatar
      Fix pointer size issues with argv on VMS · 087ca80a
      Richard Levitte authored
      
      
      The argument 'argv' in 'main' is a short pointer to a short pointer on
      VMS, regardless of initial pointer size.  We must therefore make sure
      that 'copy_argv' gets a 32-bit pointer for argv, and that the copied
      argv is used for the rest of main().
      
      This introduces the local type argv_t, which will have correct pointer
      size in all cases (and be harmless on all other platforms) as well as
      the macro Argv, which is defined as 'copied_argv' or 'argv', as the
      case may be.
      
      Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
      087ca80a
    • Richard Levitte's avatar
      Fix pointer size issue with setbuf() on VMS · 90dbd250
      Richard Levitte authored
      
      
      setbuf() is only for 32-bit pointers.  If compiled with /POINTER_SIZE=64,
      we get a nasty warning about possible loss of data.  However, since
      the only pointer used in the call is a FILE *, and the C RTL shouldn't
      give us a pointer above the first 4GB, it's safe to turn off the
      warning for this call.
      
      Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
      90dbd250
    • Richard Levitte's avatar
      Fix pointer size issues on VMS · fcd9c8c0
      Richard Levitte authored
      
      
      On VMS, the C compiler can work with 32-bit and 64-bit pointers, and
      the command line determines what the initial pointer size shall be.
      
      However, there is some functionality that only works with 32-bit
      pointers.  In this case, it's gethostbyname(), getservbyname() and
      accompanying structures, so we need to make sure that we define our
      own pointers as 32-bit ones.
      
      Furthermore, there seems to be a bug in VMS C netdb.h, where struct
      addrinfo is always defined with 32-bit pointers no matter what, but
      the functions handling it are adapted to the initial pointer size.
      This leads to pointer size warnings when compiling with
      /POINTER_SIZE=64.  The workaround is to force struct addrinfo to be
      the 64-bit variant if the initial pointer size is 64.
      
      Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
      fcd9c8c0
    • Richard Levitte's avatar
      Rearrange the use of 'proto' in BIO_lookup · 622c7e99
      Richard Levitte authored
      
      
      'proto' wasn't properly used as a fallback in all appropriate cases.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      622c7e99
    • Richard Levitte's avatar
      When verbosity is requested, OpenSSL::Test::run() displays the command · 3eefcea1
      Richard Levitte authored
      
      
      It displays the command's exit code as well.
      
      Reviewed-by: default avatarEmilia Käsper <emilia@openssl.org>
      3eefcea1
    • Richard Levitte's avatar
      Have OpenSsl..Test::app() and friends look for file in source as well · fbd361ea
      Richard Levitte authored
      
      
      If the command file that app(), test(), perlapp(9 and perltest() are
      looking for doesn't exist in the build tree, look for it in the source
      tree as well.
      
      Reviewed-by: default avatarEmilia Käsper <emilia@openssl.org>
      fbd361ea
    • Richard Levitte's avatar
      Since OpenSSL::Test redirects stderr to /dev/null, don't do so in 80-test_ca.t · 7d9b2d53
      Richard Levitte authored
      
      
      Since OpenSSL::Test only redirects stderr to /dev/null when being run
      through non-verbose test harness, this change allows the stderr output
      to be displayed when verbosity is requested.
      
      Reviewed-by: default avatarEmilia Käsper <emilia@openssl.org>
      7d9b2d53
    • Richard Levitte's avatar
      Add the option 'interpreter_args' to perlapps() and perltest() · b8fcd4f0
      Richard Levitte authored
      
      
      The intention with that option is to allow extra flags to the perl
      interpreter itself.
      
      Reviewed-by: default avatarEmilia Käsper <emilia@openssl.org>
      b8fcd4f0
    • Dr. Stephen Henson's avatar
      Remove X509_PUBKEY lock. · d2ec189f
      Dr. Stephen Henson authored
      
      
      Cache the decoded public key when an X509_PUBKEY structure is initially
      parsed so no locking is required. Ignore any decode errors.
      
      When an application calls X509_PUBKEY_get0() subsequently it will either
      get the cached key or the decode operation will be repeated which will
      return an appropriate error.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      d2ec189f
    • Ben Laurie's avatar
      Make it legal C. · 703f44e7
      Ben Laurie authored
      
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      703f44e7