1. 20 4月, 2015 1 次提交
  2. 04 4月, 2015 1 次提交
    • R
      Appease clang -Wshadow · 2da2a434
      Richard Levitte 提交于
      The macros BSWAP4 and BSWAP8 have statetemnt expressions
      implementations that use local variable names that shadow variables
      outside the macro call, generating warnings like this
      
      e_aes_cbc_hmac_sha1.c:263:14: warning: declaration shadows a local variable
            [-Wshadow]
          seqnum = BSWAP8(blocks[0].q[0]);
                   ^
      ../modes/modes_lcl.h:41:29: note: expanded from macro 'BSWAP8'
                                  ^
      e_aes_cbc_hmac_sha1.c:223:12: note: previous declaration is here
          size_t ret = 0;
                 ^
      
      Have clang be quiet by modifying the macro variable names slightly
      (suffixing them with an underscore).
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      2da2a434
  3. 02 4月, 2015 1 次提交
  4. 01 4月, 2015 2 次提交
  5. 21 3月, 2015 2 次提交
    • R
      CRYPTO_128_unwrap(): Fix refactoring damage · e6abba3a
      Richard Godbee 提交于
      crypto/modes/wrap128.c was heavily refactored to support AES Key Wrap
      with Padding, and four bugs were introduced into CRYPTO_128_unwrap() at
      that time:
      
      - crypto_128_unwrap_raw()'s return value ('ret') is checked incorrectly,
        and the function immediately returns 'ret' in (almost) all cases.
        This makes the IV checking code later in the function unreachable, but
        callers think the IV check succeeded since CRYPTO_128_unwrap()'s
        return value is non-zero.
      
        FIX: Return 0 (error) if crypto_128_unwrap_raw() returned 0 (error).
      
      - crypto_128_unwrap_raw() writes the IV to the 'got_iv' buffer, not to
        the first 8 bytes of the output buffer ('out') as the IV checking code
        expects.  This makes the IV check fail.
      
        FIX: Compare 'iv' to 'got_iv', not 'out'.
      
      - The data written to the output buffer ('out') is "cleansed" if the IV
        check fails, but the code passes OPENSSL_cleanse() the input buffer
        length ('inlen') instead of the number of bytes that
        crypto_128_unwrap_raw() wrote to the output buffer ('ret').  This
        means that OPENSSL_cleanse() could potentially write past the end of
        'out'.
      
        FIX: Change 'inlen' to 'ret' in the OPENSSL_cleanse() call.
      
      - CRYPTO_128_unwrap() is returning the length of the input buffer
        ('inlen') instead of the number of bytes written to the output buffer
        ('ret').  This could cause the caller to read past the end of 'out'.
      
        FIX: Return 'ret' instead of 'inlen' at the end of the function.
      
      PR#3749
      Reviewed-by: NStephen Henson <steve@openssl.org>
      Reviewed-by: NEmilia Käsper <emilia@openssl.org>
      e6abba3a
    • R
      wrap128.c: Fix Doxygen comments · 1062ecfc
      Richard Godbee 提交于
      Reviewed-by: NStephen Henson <steve@openssl.org>
      Reviewed-by: NEmilia Käsper <emilia@openssl.org>
      1062ecfc
  6. 17 3月, 2015 1 次提交
    • M
      Fix unintended sign extension · 3475c7a1
      Matt Caswell 提交于
      The function CRYPTO_128_unwrap_pad uses an 8 byte AIV (Alternative Initial
      Value). The least significant 4 bytes of this is placed into the local
      variable |ptext_len|. This is done as follows:
      
          ptext_len = (aiv[4] << 24) | (aiv[5] << 16) | (aiv[6] << 8) | aiv[7];
      
      aiv[4] is an unsigned char, but (aiv[4] << 24) is promoted to a *signed*
      int - therefore we could end up shifting into the sign bit and end up with
      a negative value. |ptext_len| is a size_t (typically 64-bits). If the
      result of the shifts is negative then the upper bits of |ptext_len| will
      all be 1.
      
      This commit fixes the issue by explicitly casting to an unsigned int.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      3475c7a1
  7. 13 3月, 2015 1 次提交
  8. 08 3月, 2015 1 次提交
  9. 04 2月, 2015 1 次提交
  10. 30 1月, 2015 2 次提交
  11. 28 1月, 2015 1 次提交
  12. 23 1月, 2015 1 次提交
  13. 22 1月, 2015 8 次提交
  14. 15 1月, 2015 1 次提交
    • R
      Cleanup OPENSSL_NO_xxx, part 1 · 4b618848
      Rich Salz 提交于
      OPENSSL_NO_RIPEMD160, OPENSSL_NO_RIPEMD merged into OPENSSL_NO_RMD160
      OPENSSL_NO_FP_API merged into OPENSSL_NO_STDIO
      Two typo's on #endif comments fixed:
      	OPENSSL_NO_ECB fixed to OPENSSL_NO_OCB
      	OPENSSL_NO_HW_SureWare fixed to OPENSSL_NO_HW_SUREWARE
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      4b618848
  15. 14 1月, 2015 1 次提交
  16. 05 1月, 2015 1 次提交
  17. 31 12月, 2014 1 次提交
  18. 08 12月, 2014 5 次提交
  19. 29 11月, 2014 1 次提交
  20. 20 9月, 2014 1 次提交
  21. 31 8月, 2014 1 次提交
  22. 28 8月, 2014 1 次提交
  23. 20 7月, 2014 2 次提交
  24. 19 7月, 2014 1 次提交
    • D
      RFC 5649 support. · d31fed73
      Dr. Stephen Henson 提交于
      Add support for RFC5649 key wrapping with padding.
      
      Add RFC5649 tests to evptests.txt
      
      Based on PR#3434 contribution by Petr Spacek <pspacek@redhat.com>.
      
      EVP support and minor changes added by Stephen Henson.
      
      Doxygen comment block updates by Tim Hudson.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      d31fed73
  25. 17 7月, 2014 1 次提交