Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/crypto/md5.h

    r746 r988  
    11#ifndef MD5_H
    22#define MD5_H
     3
    34#ifndef HEADER_MD5_H
    45/* Try to avoid clashes with OpenSSL */
     
    67#endif
    78
    8 #ifdef HAVE_MD5_H
    9 /*
    10  * Try to avoid clashes with Solaris MD5 implementation.
    11  * ...where almost all implementations follows:
    12  * "Schneier's Cryptography Classics Library"
    13  */
    14 #include <md5.h>
     9#if defined(HAVE_BSD_MD5_H)
     10/* Try to avoid clashes with BSD MD5 implementation (on linux) */
     11#include <bsd/md5.h>
     12
     13#elif defined(HAVE_SYS_MD5_H)
     14/* Try to avoid clashes with BSD MD5 implementation (on BSD) */
     15#include <sys/md5.h>
     16
     17/* Try to use CommonCrypto on Mac as otherwise we can get MD5Final twice */
     18#elif defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
     19#include <CommonCrypto/CommonDigest.h>
     20
     21#define MD5_CTX                                 CC_MD5_CTX
     22#define MD5Init(c)                                      CC_MD5_Init(c)
     23#define MD5Update(c,d,l)                        CC_MD5_Update(c,d,l)
     24#define MD5Final(m, c)                          CC_MD5_Final((unsigned char *)m,c)
     25#define MD5Context CC_MD5state_st
     26
    1527#else
    16 
    17 struct MD5Context {
     28typedef struct MD5Context {
    1829        uint32_t buf[4];
    1930        uint32_t bits[2];
    2031        uint8_t in[64];
    21 };
    22 typedef struct MD5Context MD5_CTX;
     32} MD5_CTX;
    2333
    24 void MD5Init(struct MD5Context *context);
    25 void MD5Update(struct MD5Context *context, const uint8_t *buf,
     34#define MD5_DIGEST_LENGTH 16
     35
     36void MD5Init(MD5_CTX *context);
     37void MD5Update(MD5_CTX *context, const uint8_t *buf,
    2638               size_t len);
    27 void MD5Final(uint8_t digest[16], struct MD5Context *context);
    28 
    29 #endif /* !HAVE_MD5_H */
     39void MD5Final(uint8_t digest[MD5_DIGEST_LENGTH], MD5_CTX *context);
     40#endif /* HAVE_*MD5_H */
    3041
    3142#endif /* !MD5_H */
Note: See TracChangeset for help on using the changeset viewer.