Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

Location:
vendor/current/lib/crypto
Files:
1 added
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/crypto/aes.c

    r414 r740  
    113113    }
    114114}
     115
     116void aes_cfb8_encrypt(const uint8_t *in, uint8_t *out,
     117                      size_t length, const AES_KEY *key,
     118                      uint8_t *iv, int forward)
     119{
     120        size_t i;
     121
     122        for (i=0; i < length; i++) {
     123                uint8_t tiv[AES_BLOCK_SIZE*2];
     124
     125                memcpy(tiv, iv, AES_BLOCK_SIZE);
     126                AES_encrypt(iv, iv, key);
     127                if (!forward) {
     128                        tiv[AES_BLOCK_SIZE] = in[i];
     129                }
     130                out[i] = in[i] ^ iv[0];
     131                if (forward) {
     132                        tiv[AES_BLOCK_SIZE] = out[i];
     133                }
     134                memcpy(iv, tiv+1, AES_BLOCK_SIZE);
     135        }
     136}
  • vendor/current/lib/crypto/aes.h

    r414 r740  
    7373                     unsigned char *, int);
    7474
     75void aes_cfb8_encrypt(const uint8_t *in, uint8_t *out,
     76                      size_t length, const AES_KEY *key,
     77                      uint8_t *iv, int forward);
     78
    7579#ifdef  __cplusplus
    7680}
  • vendor/current/lib/crypto/arcfour.c

    r414 r740  
    2020*/
    2121
    22 #include "includes.h"
     22#include "replace.h"
    2323#include "../lib/crypto/arcfour.h"
    2424
  • vendor/current/lib/crypto/arcfour.h

    r414 r740  
    11#ifndef ARCFOUR_HEADER_H
    22#define ARCFOUR_HEADER_H
     3
     4#include "../lib/util/data_blob.h"
    35
    46struct arcfour_state {
  • vendor/current/lib/crypto/crc32.c

    r414 r740  
    4141 */
    4242
    43 #include "includes.h"
     43#include "replace.h"
    4444#include "../lib/crypto/crc32.h"
    4545
  • vendor/current/lib/crypto/hmacmd5.c

    r414 r740  
    2323 */
    2424
    25 #include "includes.h"
     25#include "replace.h"
    2626#include "../lib/crypto/hmacmd5.h"
    2727
  • vendor/current/lib/crypto/hmacmd5test.c

    r414 r740  
    1717   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1818*/
    19 #include "includes.h"
     19#include "replace.h"
     20#include "../lib/util/util.h"
    2021#include "../lib/crypto/crypto.h"
    2122
  • vendor/current/lib/crypto/hmacsha256.c

    r414 r740  
    2727 */
    2828
    29 #include "includes.h"
     29#include "replace.h"
    3030#include "../lib/crypto/crypto.h"
    3131
  • vendor/current/lib/crypto/md4.c

    r414 r740  
    1818*/
    1919
    20 #include "includes.h"
     20#include "replace.h"
    2121#include "../lib/crypto/md4.h"
    2222
  • vendor/current/lib/crypto/md4test.c

    r414 r740  
    1818*/
    1919
    20 #include "includes.h"
     20#include "replace.h"
     21#include "../lib/util/util.h"
    2122#include "../lib/crypto/crypto.h"
    2223
     
    2627 This uses the test values from rfc1320
    2728*/
    28 bool torture_local_crypto_md4(struct torture_context *torture) 
     29bool torture_local_crypto_md4(struct torture_context *torture)
    2930{
    3031        bool ret = true;
  • vendor/current/lib/crypto/md5.c

    r414 r740  
    1919   abartlet@samba.org Jun 2001 */
    2020
    21 #include "includes.h"
     21#include "replace.h"
    2222
    2323#include "md5.h"
     
    2929 * Note: this code is harmless on little-endian machines.
    3030 */
    31 static void byteReverse(uint8_t *buf, uint_t longs)
     31static void byteReverse(uint8_t *buf, unsigned int longs)
    3232{
    3333    uint32_t t;
    3434    do {
    35         t = (uint32_t) ((uint_t) buf[3] << 8 | buf[2]) << 16 |
    36             ((uint_t) buf[1] << 8 | buf[0]);
     35        t = (uint32_t) ((unsigned int) buf[3] << 8 | buf[2]) << 16 |
     36            ((unsigned int) buf[1] << 8 | buf[0]);
    3737        *(uint32_t *) buf = t;
    3838        buf += 4;
     
    109109_PUBLIC_ void MD5Final(uint8_t digest[16], struct MD5Context *ctx)
    110110{
    111     uint_t count;
     111    unsigned int count;
    112112    uint8_t *p;
    113113
     
    145145    byteReverse((uint8_t *) ctx->buf, 4);
    146146    memmove(digest, ctx->buf, 16);
    147     memset(ctx, 0, sizeof(ctx));        /* In case it's sensitive */
     147    memset(ctx, 0, sizeof(*ctx));       /* In case it's sensitive */
    148148}
    149149
  • vendor/current/lib/crypto/md5test.c

    r414 r740  
    1818*/
    1919
    20 #include "includes.h"
     20#include "replace.h"
     21#include "../lib/util/util.h"
    2122#include "../lib/crypto/crypto.h"
    2223
  • vendor/current/lib/crypto/sha256.c

    r414 r740  
    3939 */
    4040
    41 #include "includes.h"
     41#include "replace.h"
    4242#include "sha256.h"
    4343
Note: See TracChangeset for help on using the changeset viewer.