Changeset a8a0b4c for lib


Ignore:
Timestamp:
2007-07-14T23:54:18Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
2abfbc5
Parents:
1da00b1 (diff), b9e4ab5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from Jelmer (making GCC4 happy by sanitizing some typecasting mess
around the RC4/B64 code).

Location:
lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lib/base64.c

    r1da00b1 ra8a0b4c  
    3131char *tobase64(const char *text)
    3232{
    33         return base64_encode(text, strlen(text));
     33        return base64_encode((const unsigned char *)text, strlen(text));
    3434}
    3535
    36 char *base64_encode(const char *in, int len)
     36char *base64_encode(const unsigned char *in, int len)
    3737{
    3838        char *out;
  • lib/base64.h

    r1da00b1 ra8a0b4c  
    2727
    2828G_MODULE_EXPORT char *tobase64( const char *text );
    29 G_MODULE_EXPORT char *base64_encode( const char *in, int len );
     29G_MODULE_EXPORT char *base64_encode( const unsigned char *in, int len );
    3030G_MODULE_EXPORT int base64_encode_real( const unsigned char *in, int inlen, unsigned char *out, const char *b64digits );
    3131G_MODULE_EXPORT char *frombase64( const char *in );
  • lib/rc4.c

    r1da00b1 ra8a0b4c  
    122122*/
    123123
    124 int rc4_encode( unsigned char *clear, int clear_len, unsigned char **crypt, char *password )
     124int rc4_encode( char *clear, int clear_len, unsigned char **crypt, char *password )
    125125{
    126126        struct rc4_state *st;
     
    130130        key_len = strlen( password ) + RC4_IV_LEN;
    131131        if( clear_len <= 0 )
    132                 clear_len = strlen( (char*) clear );
     132                clear_len = strlen( clear );
    133133       
    134134        /* Prepare buffers and the key + IV */
     
    154154}
    155155
    156 int rc4_decode( unsigned char *crypt, int crypt_len, unsigned char **clear, char *password )
     156int rc4_decode( unsigned char *crypt, int crypt_len, char **clear, char *password )
    157157{
    158158        struct rc4_state *st;
     
    165165        if( clear_len < 0 )
    166166        {
    167                 *clear = (unsigned char*) g_strdup( "" );
     167                *clear = g_strdup( "" );
    168168                return 0;
    169169        }
  • lib/rc4.h

    r1da00b1 ra8a0b4c  
    3333struct rc4_state *rc4_keymaker( unsigned char *key, int kl, int cycles );
    3434unsigned char rc4_getbyte( struct rc4_state *st );
    35 int rc4_encode( unsigned char *clear, int clear_len, unsigned char **crypt, char *password );
    36 int rc4_decode( unsigned char *crypt, int crypt_len, unsigned char **clear, char *password );
     35int rc4_encode( char *clear, int clear_len, unsigned char **crypt, char *password );
     36int rc4_decode( unsigned char *crypt, int crypt_len, char **clear, char *password );
  • lib/ssl_bogus.c

    r1da00b1 ra8a0b4c  
    5252}
    5353
     54void *ssl_starttls( int fd, ssl_input_function func, gpointer data )
     55{
     56        return NULL;
     57}
     58
    5459b_input_condition ssl_getdirection( void *conn )
    5560{
Note: See TracChangeset for help on using the changeset viewer.