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

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified vendor/current/source4/heimdal/lib/hcrypto/des.c

    r414 r740  
    9292#include <krb5-types.h>
    9393#include <assert.h>
     94
     95#include <roken.h>
    9496
    9597#include "des.h"
     
    181183DES_is_weak_key(DES_cblock *key)
    182184{
     185    int weak = 0;
    183186    int i;
    184187
    185     for (i = 0; i < sizeof(weak_keys)/sizeof(weak_keys[0]); i++) {
    186         if (memcmp(weak_keys[i], key, DES_CBLOCK_LEN) == 0)
    187             return 1;
    188     }
    189     return 0;
     188    for (i = 0; i < sizeof(weak_keys)/sizeof(weak_keys[0]); i++)
     189        weak ^= (ct_memcmp(weak_keys[i], key, DES_CBLOCK_LEN) == 0);
     190
     191    return !!weak;
    190192}
    191193
Note: See TracChangeset for help on using the changeset viewer.