Thu, 09 May 2013 02:56:05 -0400
Merge heads.
--- a/Makefile.mingw Wed May 08 21:03:34 2013 -0400 +++ b/Makefile.mingw Thu May 09 02:56:05 2013 -0400 @@ -57,9 +57,7 @@ saslDIGESTMD5.dll \ saslGSSAPI.dll \ saslLOGIN.dll \ - saslPLAIN.dll \ - libsilc-1-1-2.dll \ - libsilcclient-1-1-3.dll + saslPLAIN.dll #build an expression for `find` to use to ignore the above files EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(EXTERNAL_DLLS))
--- a/libpurple/cipher.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/cipher.c Thu May 09 02:56:05 2013 -0400 @@ -88,6 +88,8 @@ caps |= PURPLE_CIPHER_CAPS_INIT; if(ops->reset) caps |= PURPLE_CIPHER_CAPS_RESET; + if(ops->reset_state) + caps |= PURPLE_CIPHER_CAPS_RESET_STATE; if(ops->uninit) caps |= PURPLE_CIPHER_CAPS_UNINIT; if(ops->set_iv) @@ -96,6 +98,8 @@ caps |= PURPLE_CIPHER_CAPS_APPEND; if(ops->digest) caps |= PURPLE_CIPHER_CAPS_DIGEST; + if(ops->get_digest_size) + caps |= PURPLE_CIPHER_CAPS_GET_DIGEST_SIZE; if(ops->encrypt) caps |= PURPLE_CIPHER_CAPS_ENCRYPT; if(ops->decrypt) @@ -106,7 +110,7 @@ caps |= PURPLE_CIPHER_CAPS_GET_SALT_SIZE; if(ops->set_key) caps |= PURPLE_CIPHER_CAPS_SET_KEY; - if(ops->get_key_size) + if (ops->get_key_size) caps |= PURPLE_CIPHER_CAPS_GET_KEY_SIZE; if(ops->set_batch_mode) caps |= PURPLE_CIPHER_CAPS_SET_BATCH_MODE; @@ -114,41 +118,46 @@ caps |= PURPLE_CIPHER_CAPS_GET_BATCH_MODE; if(ops->get_block_size) caps |= PURPLE_CIPHER_CAPS_GET_BLOCK_SIZE; - if(ops->set_key_with_len) - caps |= PURPLE_CIPHER_CAPS_SET_KEY_WITH_LEN; return caps; } -gboolean +ssize_t purple_cipher_digest_region(const gchar *name, const guchar *data, - size_t data_len, size_t in_len, - guchar digest[], size_t *out_len) + size_t data_len, guchar digest[], size_t out_size) { PurpleCipher *cipher; PurpleCipherContext *context; - gboolean ret = FALSE; + ssize_t digest_size; + gboolean succ; - g_return_val_if_fail(name, FALSE); - g_return_val_if_fail(data, FALSE); + g_return_val_if_fail(name, -1); + g_return_val_if_fail(data, -1); cipher = purple_ciphers_find_cipher(name); - g_return_val_if_fail(cipher, FALSE); + g_return_val_if_fail(cipher, -1); - if(!cipher->ops->append || !cipher->ops->digest) { + if(!cipher->ops->append || !cipher->ops->digest || !cipher->ops->get_digest_size) { purple_debug_warning("cipher", "purple_cipher_region failed: " "the %s cipher does not support appending and or " "digesting.", cipher->name); - return FALSE; + return -1; } context = purple_cipher_context_new(cipher, NULL); + digest_size = purple_cipher_context_get_digest_size(context); + if (out_size < digest_size) { + purple_debug_error("cipher", "purple_cipher_region failed: " + "provided output buffer too small\n"); + purple_cipher_context_destroy(context); + return -1; + } purple_cipher_context_append(context, data, data_len); - ret = purple_cipher_context_digest(context, in_len, digest, out_len); + succ = purple_cipher_context_digest(context, digest, out_size); purple_cipher_context_destroy(context); - return ret; + return succ ? digest_size : -1; } /****************************************************************************** @@ -352,6 +361,26 @@ } void +purple_cipher_context_reset_state(PurpleCipherContext *context, void *extra) { + PurpleCipher *cipher = NULL; + + g_return_if_fail(context); + + cipher = context->cipher; + g_return_if_fail(cipher); + g_return_if_fail(cipher->ops); + + if (cipher->ops->reset_state) { + context->cipher->ops->reset_state(context, extra); + return; + } + + purple_debug_warning("cipher", "the %s cipher does not support the " + "reset_state operation\n", cipher->name); + purple_cipher_context_reset(context, extra); +} + +void purple_cipher_context_destroy(PurpleCipherContext *context) { PurpleCipher *cipher = NULL; @@ -407,8 +436,8 @@ } gboolean -purple_cipher_context_digest(PurpleCipherContext *context, size_t in_len, - guchar digest[], size_t *out_len) +purple_cipher_context_digest(PurpleCipherContext *context, guchar digest[], + size_t len) { PurpleCipher *cipher = NULL; @@ -417,7 +446,7 @@ cipher = context->cipher; if(cipher->ops && cipher->ops->digest) - return cipher->ops->digest(context, in_len, digest, out_len); + return cipher->ops->digest(context, digest, len); else { purple_debug_warning("cipher", "the %s cipher does not support the digest " "operation\n", cipher->name); @@ -426,85 +455,103 @@ } gboolean -purple_cipher_context_digest_to_str(PurpleCipherContext *context, size_t in_len, - gchar digest_s[], size_t *out_len) +purple_cipher_context_digest_to_str(PurpleCipherContext *context, + gchar digest_s[], size_t len) { /* 8k is a bit excessive, will tweak later. */ guchar digest[BUF_LEN * 4]; gint n = 0; - size_t dlen = 0; + size_t digest_size; g_return_val_if_fail(context, FALSE); g_return_val_if_fail(digest_s, FALSE); - if(!purple_cipher_context_digest(context, sizeof(digest), digest, &dlen)) + digest_size = purple_cipher_context_get_digest_size(context); + + g_return_val_if_fail(digest_size <= BUF_LEN * 4, FALSE); + + if(!purple_cipher_context_digest(context, digest, sizeof(digest))) return FALSE; - /* in_len must be greater than dlen * 2 so we have room for the NUL. */ - if(in_len <= dlen * 2) - return FALSE; + /* Every digest byte occupies 2 chars + the NUL at the end. */ + g_return_val_if_fail(digest_size * 2 + 1 <= len, FALSE); - for(n = 0; n < dlen; n++) + for(n = 0; n < digest_size; n++) sprintf(digest_s + (n * 2), "%02x", digest[n]); digest_s[n * 2] = '\0'; - if(out_len) - *out_len = dlen * 2; - return TRUE; } -gint -purple_cipher_context_encrypt(PurpleCipherContext *context, const guchar data[], - size_t len, guchar output[], size_t *outlen) +size_t +purple_cipher_context_get_digest_size(PurpleCipherContext *context) { PurpleCipher *cipher = NULL; - g_return_val_if_fail(context, -1); + g_return_val_if_fail(context, 0); + + cipher = context->cipher; + g_return_val_if_fail(cipher, 0); + + if(cipher->ops && cipher->ops->get_digest_size) + return cipher->ops->get_digest_size(context); + else { + purple_debug_warning("cipher", "The %s cipher does not support " + "the get_digest_size operation\n", cipher->name); + return 0; + } +} + +ssize_t +purple_cipher_context_encrypt(PurpleCipherContext *context, + const guchar input[], size_t in_len, guchar output[], size_t out_size) +{ + PurpleCipher *cipher = NULL; + + g_return_val_if_fail(context != NULL, -1); + g_return_val_if_fail(input != NULL, -1); + g_return_val_if_fail(output != NULL, -1); + g_return_val_if_fail(out_size < in_len, -1); cipher = context->cipher; g_return_val_if_fail(cipher, -1); if(cipher->ops && cipher->ops->encrypt) - return cipher->ops->encrypt(context, data, len, output, outlen); + return cipher->ops->encrypt(context, input, in_len, output, out_size); else { purple_debug_warning("cipher", "the %s cipher does not support the encrypt" "operation\n", cipher->name); - if(outlen) - *outlen = -1; - return -1; } } -gint -purple_cipher_context_decrypt(PurpleCipherContext *context, const guchar data[], - size_t len, guchar output[], size_t *outlen) +ssize_t +purple_cipher_context_decrypt(PurpleCipherContext *context, + const guchar input[], size_t in_len, guchar output[], size_t out_size) { PurpleCipher *cipher = NULL; - g_return_val_if_fail(context, -1); + g_return_val_if_fail(context != NULL, -1); + g_return_val_if_fail(input != NULL, -1); + g_return_val_if_fail(output != NULL, -1); cipher = context->cipher; g_return_val_if_fail(cipher, -1); if(cipher->ops && cipher->ops->decrypt) - return cipher->ops->decrypt(context, data, len, output, outlen); + return cipher->ops->decrypt(context, input, in_len, output, out_size); else { purple_debug_warning("cipher", "the %s cipher does not support the decrypt" "operation\n", cipher->name); - if(outlen) - *outlen = -1; - return -1; } } void -purple_cipher_context_set_salt(PurpleCipherContext *context, guchar *salt) { +purple_cipher_context_set_salt(PurpleCipherContext *context, const guchar *salt, size_t len) { PurpleCipher *cipher = NULL; g_return_if_fail(context); @@ -513,7 +560,7 @@ g_return_if_fail(cipher); if(cipher->ops && cipher->ops->set_salt) - cipher->ops->set_salt(context, salt); + cipher->ops->set_salt(context, salt, len); else purple_debug_warning("cipher", "the %s cipher does not support the " "set_salt operation\n", cipher->name); @@ -539,7 +586,7 @@ } void -purple_cipher_context_set_key(PurpleCipherContext *context, const guchar *key) { +purple_cipher_context_set_key(PurpleCipherContext *context, const guchar *key, size_t len) { PurpleCipher *cipher = NULL; g_return_if_fail(context); @@ -548,7 +595,7 @@ g_return_if_fail(cipher); if(cipher->ops && cipher->ops->set_key) - cipher->ops->set_key(context, key); + cipher->ops->set_key(context, key, len); else purple_debug_warning("cipher", "the %s cipher does not support the " "set_key operation\n", cipher->name); @@ -558,18 +605,18 @@ purple_cipher_context_get_key_size(PurpleCipherContext *context) { PurpleCipher *cipher = NULL; - g_return_val_if_fail(context, -1); + g_return_val_if_fail(context, 0); cipher = context->cipher; - g_return_val_if_fail(cipher, -1); + g_return_val_if_fail(cipher, 0); - if(cipher->ops && cipher->ops->get_key_size) + if (cipher->ops && cipher->ops->get_key_size) return cipher->ops->get_key_size(context); else { - purple_debug_warning("cipher", "the %s cipher does not support the " - "get_key_size operation\n", cipher->name); + purple_debug_warning("cipher", "the %s cipher does not support " + "the get_key_size operation\n", cipher->name); - return -1; + return 0; } } @@ -630,24 +677,6 @@ } void -purple_cipher_context_set_key_with_len(PurpleCipherContext *context, - const guchar *key, size_t len) -{ - PurpleCipher *cipher = NULL; - - g_return_if_fail(context); - - cipher = context->cipher; - g_return_if_fail(cipher); - - if(cipher->ops && cipher->ops->set_key_with_len) - cipher->ops->set_key_with_len(context, key, len); - else - purple_debug_warning("cipher", "The %s cipher does not support the " - "set_key_with_len operation\n", cipher->name); -} - -void purple_cipher_context_set_data(PurpleCipherContext *context, gpointer data) { g_return_if_fail(context); @@ -706,7 +735,7 @@ return NULL; } - purple_cipher_context_digest(context, sizeof(digest), digest, NULL); + purple_cipher_context_digest(context, digest, sizeof(digest)); purple_cipher_context_destroy(context); context = purple_cipher_context_new(cipher, NULL); @@ -717,7 +746,7 @@ purple_cipher_context_append(context, (guchar *)client_nonce, strlen(client_nonce)); } - purple_cipher_context_digest_to_str(context, sizeof(hash), hash, NULL); + purple_cipher_context_digest_to_str(context, hash, sizeof(hash)); purple_cipher_context_destroy(context); return g_strdup(hash); @@ -778,14 +807,14 @@ context2 = purple_cipher_context_new(cipher, NULL); purple_cipher_context_append(context2, (guchar *)entity, strlen(entity)); - purple_cipher_context_digest_to_str(context2, sizeof(entity_hash), entity_hash, NULL); + purple_cipher_context_digest_to_str(context2, entity_hash, sizeof(entity_hash)); purple_cipher_context_destroy(context2); purple_cipher_context_append(context, (guchar *)":", 1); purple_cipher_context_append(context, (guchar *)entity_hash, strlen(entity_hash)); } - purple_cipher_context_digest_to_str(context, sizeof(hash2), hash2, NULL); + purple_cipher_context_digest_to_str(context, hash2, sizeof(hash2)); purple_cipher_context_destroy(context); context = purple_cipher_context_new(cipher, NULL); @@ -821,7 +850,7 @@ } purple_cipher_context_append(context, (guchar *)hash2, strlen(hash2)); - purple_cipher_context_digest_to_str(context, sizeof(hash2), hash2, NULL); + purple_cipher_context_digest_to_str(context, hash2, sizeof(hash2)); purple_cipher_context_destroy(context); return g_strdup(hash2);
--- a/libpurple/cipher.h Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/cipher.h Thu May 09 02:56:05 2013 -0400 @@ -50,25 +50,26 @@ * The operation flags for a cipher */ typedef enum { - PURPLE_CIPHER_CAPS_SET_OPT = 1 << 1, /**< Set option flag */ - PURPLE_CIPHER_CAPS_GET_OPT = 1 << 2, /**< Get option flag */ - PURPLE_CIPHER_CAPS_INIT = 1 << 3, /**< Init flag */ - PURPLE_CIPHER_CAPS_RESET = 1 << 4, /**< Reset flag */ - PURPLE_CIPHER_CAPS_UNINIT = 1 << 5, /**< Uninit flag */ - PURPLE_CIPHER_CAPS_SET_IV = 1 << 6, /**< Set IV flag */ - PURPLE_CIPHER_CAPS_APPEND = 1 << 7, /**< Append flag */ - PURPLE_CIPHER_CAPS_DIGEST = 1 << 8, /**< Digest flag */ - PURPLE_CIPHER_CAPS_ENCRYPT = 1 << 9, /**< Encrypt flag */ - PURPLE_CIPHER_CAPS_DECRYPT = 1 << 10, /**< Decrypt flag */ - PURPLE_CIPHER_CAPS_SET_SALT = 1 << 11, /**< Set salt flag */ - PURPLE_CIPHER_CAPS_GET_SALT_SIZE = 1 << 12, /**< Get salt size flag */ - PURPLE_CIPHER_CAPS_SET_KEY = 1 << 13, /**< Set key flag */ - PURPLE_CIPHER_CAPS_GET_KEY_SIZE = 1 << 14, /**< Get key size flag */ - PURPLE_CIPHER_CAPS_SET_BATCH_MODE = 1 << 15, /**< Set batch mode flag */ - PURPLE_CIPHER_CAPS_GET_BATCH_MODE = 1 << 16, /**< Get batch mode flag */ - PURPLE_CIPHER_CAPS_GET_BLOCK_SIZE = 1 << 17, /**< The get block size flag */ - PURPLE_CIPHER_CAPS_SET_KEY_WITH_LEN = 1 << 18, /**< The set key with length flag */ - PURPLE_CIPHER_CAPS_UNKNOWN = 1 << 19 /**< Unknown */ + PURPLE_CIPHER_CAPS_SET_OPT = 1 << 1, /**< Set option flag */ + PURPLE_CIPHER_CAPS_GET_OPT = 1 << 2, /**< Get option flag */ + PURPLE_CIPHER_CAPS_INIT = 1 << 3, /**< Init flag */ + PURPLE_CIPHER_CAPS_RESET = 1 << 4, /**< Reset flag */ + PURPLE_CIPHER_CAPS_RESET_STATE = 1 << 5, /**< Reset state flag */ + PURPLE_CIPHER_CAPS_UNINIT = 1 << 6, /**< Uninit flag */ + PURPLE_CIPHER_CAPS_SET_IV = 1 << 7, /**< Set IV flag */ + PURPLE_CIPHER_CAPS_APPEND = 1 << 8, /**< Append flag */ + PURPLE_CIPHER_CAPS_DIGEST = 1 << 9, /**< Digest flag */ + PURPLE_CIPHER_CAPS_GET_DIGEST_SIZE = 1 << 10, /**< The get digest size flag */ + PURPLE_CIPHER_CAPS_ENCRYPT = 1 << 11, /**< Encrypt flag */ + PURPLE_CIPHER_CAPS_DECRYPT = 1 << 12, /**< Decrypt flag */ + PURPLE_CIPHER_CAPS_SET_SALT = 1 << 13, /**< Set salt flag */ + PURPLE_CIPHER_CAPS_GET_SALT_SIZE = 1 << 14, /**< Get salt size flag */ + PURPLE_CIPHER_CAPS_SET_KEY = 1 << 15, /**< Set key flag */ + PURPLE_CIPHER_CAPS_GET_KEY_SIZE = 1 << 16, /**< Get key size flag */ + PURPLE_CIPHER_CAPS_SET_BATCH_MODE = 1 << 17, /**< Set batch mode flag */ + PURPLE_CIPHER_CAPS_GET_BATCH_MODE = 1 << 18, /**< Get batch mode flag */ + PURPLE_CIPHER_CAPS_GET_BLOCK_SIZE = 1 << 19, /**< The get block size flag */ + PURPLE_CIPHER_CAPS_UNKNOWN = 1 << 20 /**< Unknown */ } PurpleCipherCaps; /** @@ -87,6 +88,9 @@ /** The reset function */ void (*reset)(PurpleCipherContext *context, void *extra); + /** The reset state function */ + void (*reset_state)(PurpleCipherContext *context, void *extra); + /** The uninit function */ void (*uninit)(PurpleCipherContext *context); @@ -97,22 +101,25 @@ void (*append)(PurpleCipherContext *context, const guchar *data, size_t len); /** The digest function */ - gboolean (*digest)(PurpleCipherContext *context, size_t in_len, guchar digest[], size_t *out_len); + gboolean (*digest)(PurpleCipherContext *context, guchar digest[], size_t len); + + /** The get digest size function */ + size_t (*get_digest_size)(PurpleCipherContext *context); /** The encrypt function */ - int (*encrypt)(PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen); + ssize_t (*encrypt)(PurpleCipherContext *context, const guchar input[], size_t in_len, guchar output[], size_t out_size); /** The decrypt function */ - int (*decrypt)(PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen); + ssize_t (*decrypt)(PurpleCipherContext *context, const guchar input[], size_t in_len, guchar output[], size_t out_size); /** The set salt function */ - void (*set_salt)(PurpleCipherContext *context, guchar *salt); + void (*set_salt)(PurpleCipherContext *context, const guchar *salt, size_t len); /** The get salt size function */ size_t (*get_salt_size)(PurpleCipherContext *context); /** The set key function */ - void (*set_key)(PurpleCipherContext *context, const guchar *key); + void (*set_key)(PurpleCipherContext *context, const guchar *key, size_t len); /** The get key size function */ size_t (*get_key_size)(PurpleCipherContext *context); @@ -126,8 +133,10 @@ /** The get block size function */ size_t (*get_block_size)(PurpleCipherContext *context); - /** The set key with length function */ - void (*set_key_with_len)(PurpleCipherContext *context, const guchar *key, size_t len); + void (*_purple_reserved1)(void); + void (*_purple_reserved2)(void); + void (*_purple_reserved3)(void); + void (*_purple_reserved4)(void); }; G_BEGIN_DECLS @@ -161,13 +170,12 @@ * @param name The cipher's name * @param data The data to hash * @param data_len The length of the data - * @param in_len The length of the buffer * @param digest The returned digest - * @param out_len The length written + * @param out_size The size of digest buffer * - * @return @c TRUE if successful, @c FALSE otherwise + * @return The count of bytes written, or -1 if failed */ -gboolean purple_cipher_digest_region(const gchar *name, const guchar *data, size_t data_len, size_t in_len, guchar digest[], size_t *out_len); +ssize_t purple_cipher_digest_region(const gchar *name, const guchar *data, size_t data_len, guchar digest[], size_t out_size); /*@}*/ /******************************************************************************/ @@ -288,6 +296,18 @@ void purple_cipher_context_reset(PurpleCipherContext *context, gpointer extra); /** + * Resets a cipher state to it's default value, but doesn't touch stateless + * configuration. + * + * That means, IV and digest context will be wiped out, but keys, ops or salt + * will remain untouched. + * + * @param context The context to reset + * @param extra Extra data for the specific cipher + */ +void purple_cipher_context_reset_state(PurpleCipherContext *context, gpointer extra); + +/** * Destorys a cipher context and deinitializes it * * @param context The cipher context to destory @@ -317,55 +337,63 @@ * Digests a context * * @param context The context to digest - * @param in_len The length of the buffer * @param digest The return buffer for the digest - * @param out_len The length of the returned value + * @param len The length of the buffer */ -gboolean purple_cipher_context_digest(PurpleCipherContext *context, size_t in_len, guchar digest[], size_t *out_len); +gboolean purple_cipher_context_digest(PurpleCipherContext *context, guchar digest[], size_t len); /** * Converts a guchar digest into a hex string * * @param context The context to get a digest from - * @param in_len The length of the buffer * @param digest_s The return buffer for the string digest - * @param out_len The length of the returned value + * @param len The length of the buffer */ -gboolean purple_cipher_context_digest_to_str(PurpleCipherContext *context, size_t in_len, gchar digest_s[], size_t *out_len); +gboolean purple_cipher_context_digest_to_str(PurpleCipherContext *context, gchar digest_s[], size_t len); + +/** + * Gets the digest size of a context + * + * @param context The context whose digest size to get + * + * @return The digest size of the context + */ +size_t purple_cipher_context_get_digest_size(PurpleCipherContext *context); /** * Encrypts data using the context * - * @param context The context - * @param data The data to encrypt - * @param len The length of the data - * @param output The output buffer - * @param outlen The len of data that was outputed + * @param context The context + * @param input The data to encrypt + * @param in_len The length of the data + * @param output The output buffer + * @param out_size The size of the output buffer * - * @return A cipher specific status code + * @return A length of data that was outputed or -1, if failed */ -gint purple_cipher_context_encrypt(PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen); +ssize_t purple_cipher_context_encrypt(PurpleCipherContext *context, const guchar input[], size_t in_len, guchar output[], size_t out_size); /** * Decrypts data using the context * - * @param context The context - * @param data The data to encrypt - * @param len The length of the returned value - * @param output The output buffer - * @param outlen The len of data that was outputed + * @param context The context + * @param input The data to encrypt + * @param in_len The length of the returned value + * @param output The output buffer + * @param out_size The size of the output buffer * - * @return A cipher specific status code + * @return A length of data that was outputed or -1, if failed */ -gint purple_cipher_context_decrypt(PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen); +ssize_t purple_cipher_context_decrypt(PurpleCipherContext *context, const guchar input[], size_t in_len, guchar output[], size_t out_size); /** * Sets the salt on a context * * @param context The context whose salt to set * @param salt The salt + * @param len The length of the salt */ -void purple_cipher_context_set_salt(PurpleCipherContext *context, guchar *salt); +void purple_cipher_context_set_salt(PurpleCipherContext *context, const guchar *salt, size_t len); /** * Gets the size of the salt if the cipher supports it @@ -381,11 +409,12 @@ * * @param context The context whose key to set * @param key The key + * @param len The size of the key */ -void purple_cipher_context_set_key(PurpleCipherContext *context, const guchar *key); +void purple_cipher_context_set_key(PurpleCipherContext *context, const guchar *key, size_t len); /** - * Gets the key size for a context + * Gets the size of the key if the cipher supports it * * @param context The context whose key size to get * @@ -421,16 +450,6 @@ size_t purple_cipher_context_get_block_size(PurpleCipherContext *context); /** - * Sets the key with a given length on a context - * - * @param context The context whose key to set - * @param key The key - * @param len The length of the key - * - */ -void purple_cipher_context_set_key_with_len(PurpleCipherContext *context, const guchar *key, size_t len); - -/** * Sets the cipher data for a context * * @param context The context whose cipher data to set
--- a/libpurple/ciphers/Makefile.am Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/ciphers/Makefile.am Thu May 09 02:56:05 2013 -0400 @@ -13,5 +13,7 @@ INCLUDES = -I$(top_srcdir)/libpurple AM_CPPFLAGS = \ - $(GLIB_CFLAGS) - + $(INTGG_CFLAGS) \ + $(AM_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(DEBUG_CFLAGS)
--- a/libpurple/ciphers/des.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/ciphers/des.c Thu May 09 02:56:05 2013 -0400 @@ -33,6 +33,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ + +#include "internal.h" #include <cipher.h> #include "ciphers.h" @@ -335,11 +337,13 @@ * Does not check for weak keys. **/ static void -des_set_key (PurpleCipherContext *context, const guchar * key) +des_set_key (PurpleCipherContext *context, const guchar * key, size_t len) { struct _des_ctx *ctx = purple_cipher_context_get_data(context); int i; + g_return_if_fail(len != 8); + des_key_schedule (key, ctx->encrypt_subkeys); for(i=0; i<32; i+=2) @@ -349,6 +353,11 @@ } } +static size_t +des_get_key_size(PurpleCipherContext *context) +{ + return 8; +} /* * Electronic Codebook Mode DES encryption/decryption of data according @@ -380,27 +389,32 @@ return 0; } -static gint -des_encrypt(PurpleCipherContext *context, const guchar data[], - size_t len, guchar output[], size_t *outlen) +static ssize_t +des_encrypt(PurpleCipherContext *context, const guchar input[], size_t in_len, + guchar output[], size_t out_size) { int offset = 0; int i = 0; int tmp; guint8 buf[8] = {0,0,0,0,0,0,0,0}; - while(offset+8<=len) { + ssize_t out_len; + + g_return_val_if_fail(out_size < in_len, -1); + + while(offset+8<=in_len) { des_ecb_crypt(purple_cipher_context_get_data(context), - data+offset, + input+offset, output+offset, 0); offset+=8; } - *outlen = len; - if(offset<len) { - *outlen += len - offset; + out_len = in_len; + if(offset<in_len) { + out_len += in_len - offset; + g_return_val_if_fail(out_size < out_len, -1); tmp = offset; - while(tmp<len) { - buf[i++] = data[tmp]; + while(tmp<in_len) { + buf[i++] = input[tmp]; tmp++; } des_ecb_crypt(purple_cipher_context_get_data(context), @@ -408,30 +422,35 @@ output+offset, 0); } - return 0; + return out_len; } static gint -des_decrypt(PurpleCipherContext *context, const guchar data[], - size_t len, guchar output[], size_t *outlen) +des_decrypt(PurpleCipherContext *context, const guchar input[], size_t in_len, + guchar output[], size_t out_size) { int offset = 0; int i = 0; int tmp; guint8 buf[8] = {0,0,0,0,0,0,0,0}; - while(offset+8<=len) { + ssize_t out_len; + + g_return_val_if_fail(out_size < in_len, -1); + + while(offset+8<=in_len) { des_ecb_crypt(purple_cipher_context_get_data(context), - data+offset, + input+offset, output+offset, 1); offset+=8; } - *outlen = len; - if(offset<len) { - *outlen += len - offset; + out_len = in_len; + if(offset<in_len) { + out_len += in_len - offset; + g_return_val_if_fail(out_size < out_len, -1); tmp = offset; - while(tmp<len) { - buf[i++] = data[tmp]; + while(tmp<in_len) { + buf[i++] = input[tmp]; tmp++; } des_ecb_crypt(purple_cipher_context_get_data(context), @@ -439,7 +458,7 @@ output+offset, 1); } - return 0; + return out_len; } static void @@ -465,20 +484,22 @@ NULL, /* Get option */ des_init, /* init */ NULL, /* reset */ + NULL, /* reset state */ des_uninit, /* uninit */ NULL, /* set iv */ NULL, /* append */ NULL, /* digest */ + NULL, /* get_digest_size */ des_encrypt, /* encrypt */ des_decrypt, /* decrypt */ NULL, /* set salt */ NULL, /* get salt size */ des_set_key, /* set key */ - NULL, /* get key size */ + des_get_key_size, /* get key size */ NULL, /* set batch mode */ NULL, /* get batch mode */ NULL, /* get block size */ - NULL /* set key with len */ + NULL, NULL, NULL, NULL /* reserved */ }; /****************************************************************************** @@ -503,11 +524,13 @@ * Does not check for weak keys. **/ static void -des3_set_key(PurpleCipherContext *context, const guchar * key) +des3_set_key(PurpleCipherContext *context, const guchar * key, size_t len) { struct _des3_ctx *ctx = purple_cipher_context_get_data(context); int i; + g_return_if_fail(len != 24); + des_key_schedule (key + 0, ctx->key1.encrypt_subkeys); des_key_schedule (key + 8, ctx->key2.encrypt_subkeys); des_key_schedule (key + 16, ctx->key3.encrypt_subkeys); @@ -523,17 +546,27 @@ } } -static gint -des3_ecb_encrypt(struct _des3_ctx *ctx, const guchar data[], - size_t len, guchar output[], size_t *outlen) +static size_t +des3_get_key_size(PurpleCipherContext *context) +{ + return 24; +} + +static ssize_t +des3_ecb_encrypt(struct _des3_ctx *ctx, const guchar input[], size_t in_len, + guchar output[], size_t out_size) { int offset = 0; int i = 0; int tmp; guint8 buf[8] = {0,0,0,0,0,0,0,0}; - while (offset + 8 <= len) { + ssize_t out_len; + + g_return_val_if_fail(out_size < in_len, -1); + + while (offset + 8 <= in_len) { des_ecb_crypt(&ctx->key1, - data+offset, + input+offset, output+offset, 0); des_ecb_crypt(&ctx->key2, @@ -546,13 +579,14 @@ 0); offset += 8; } - *outlen = len; - if (offset < len) { - *outlen += len - offset; + out_len = in_len; + if (offset < in_len) { + out_len += in_len - offset; + g_return_val_if_fail(out_size < out_len, -1); tmp = offset; memset(buf, 0, 8); - while (tmp < len) { - buf[i++] = data[tmp]; + while (tmp < in_len) { + buf[i++] = input[tmp]; tmp++; } des_ecb_crypt(&ctx->key1, @@ -568,21 +602,25 @@ output+offset, 0); } - return 0; + return out_len; } -static gint -des3_cbc_encrypt(struct _des3_ctx *ctx, const guchar data[], - size_t len, guchar output[], size_t *outlen) +static ssize_t +des3_cbc_encrypt(struct _des3_ctx *ctx, const guchar input[], size_t in_len, + guchar output[], size_t out_size) { int offset = 0; int i = 0; int tmp; guint8 buf[8]; + ssize_t out_len; memcpy(buf, ctx->iv, 8); - while (offset + 8 <= len) { + + g_return_val_if_fail(out_size < in_len, -1); + + while (offset + 8 <= in_len) { for (i = 0; i < 8; i++) - buf[i] ^= data[offset + i]; + buf[i] ^= input[offset + i]; des_ecb_crypt(&ctx->key1, buf, @@ -599,13 +637,14 @@ memcpy(buf, output+offset, 8); offset += 8; } - *outlen = len; - if (offset < len) { - *outlen += len - offset; + out_len = in_len; + if (offset < in_len) { + out_len += in_len - offset; + g_return_val_if_fail(out_size < out_len, -1); tmp = offset; i = 0; - while (tmp < len) { - buf[i++] ^= data[tmp]; + while (tmp < in_len) { + buf[i++] ^= input[tmp]; tmp++; } des_ecb_crypt(&ctx->key1, @@ -621,19 +660,19 @@ output+offset, 0); } - return 0; + return out_len; } -static gint -des3_encrypt(PurpleCipherContext *context, const guchar data[], - size_t len, guchar output[], size_t *outlen) +static ssize_t +des3_encrypt(PurpleCipherContext *context, const guchar input[], size_t in_len, + guchar output[], size_t out_size) { struct _des3_ctx *ctx = purple_cipher_context_get_data(context); if (ctx->mode == PURPLE_CIPHER_BATCH_MODE_ECB) { - return des3_ecb_encrypt(ctx, data, len, output, outlen); + return des3_ecb_encrypt(ctx, input, in_len, output, out_size); } else if (ctx->mode == PURPLE_CIPHER_BATCH_MODE_CBC) { - return des3_cbc_encrypt(ctx, data, len, output, outlen); + return des3_cbc_encrypt(ctx, input, in_len, output, out_size); } else { g_return_val_if_reached(0); } @@ -642,17 +681,21 @@ } static gint -des3_ecb_decrypt(struct _des3_ctx *ctx, const guchar data[], - size_t len, guchar output[], size_t *outlen) +des3_ecb_decrypt(struct _des3_ctx *ctx, const guchar input[], size_t in_len, + guchar output[], size_t out_size) { int offset = 0; int i = 0; int tmp; guint8 buf[8] = {0,0,0,0,0,0,0,0}; - while (offset + 8 <= len) { + ssize_t out_len; + + g_return_val_if_fail(out_size < in_len, -1); + + while (offset + 8 <= in_len) { /* NOTE: Apply key in reverse */ des_ecb_crypt(&ctx->key3, - data+offset, + input+offset, output+offset, 1); des_ecb_crypt(&ctx->key2, @@ -665,13 +708,14 @@ 1); offset+=8; } - *outlen = len; - if (offset < len) { - *outlen += len - offset; + out_len = in_len; + if (offset < in_len) { + out_len += in_len - offset; + g_return_val_if_fail(out_size < out_len, -1); tmp = offset; memset(buf, 0, 8); - while (tmp < len) { - buf[i++] = data[tmp]; + while (tmp < in_len) { + buf[i++] = input[tmp]; tmp++; } des_ecb_crypt(&ctx->key3, @@ -687,22 +731,26 @@ output+offset, 1); } - return 0; + return out_len; } static gint -des3_cbc_decrypt(struct _des3_ctx *ctx, const guchar data[], - size_t len, guchar output[], size_t *outlen) +des3_cbc_decrypt(struct _des3_ctx *ctx, const guchar input[], size_t in_len, + guchar output[], size_t out_size) { int offset = 0; int i = 0; int tmp; guint8 buf[8] = {0,0,0,0,0,0,0,0}; guint8 link[8]; + ssize_t out_len; + + g_return_val_if_fail(out_size < in_len, -1); + memcpy(link, ctx->iv, 8); - while (offset + 8 <= len) { + while (offset + 8 <= in_len) { des_ecb_crypt(&ctx->key3, - data+offset, + input+offset, output+offset, 1); des_ecb_crypt(&ctx->key2, @@ -715,17 +763,18 @@ 1); for (i = 0; i < 8; i++) output[offset + i] ^= link[i]; - memcpy(link, data + offset, 8); + memcpy(link, input + offset, 8); offset+=8; } - *outlen = len; - if(offset<len) { - *outlen += len - offset; + out_len = in_len; + if(offset<in_len) { + out_len += in_len - offset; + g_return_val_if_fail(out_size < out_len, -1); tmp = offset; memset(buf, 0, 8); i = 0; - while(tmp<len) { - buf[i++] = data[tmp]; + while(tmp<in_len) { + buf[i++] = input[tmp]; tmp++; } des_ecb_crypt(&ctx->key3, @@ -743,19 +792,19 @@ for (i = 0; i < 8; i++) output[offset + i] ^= link[i]; } - return 0; + return out_len; } static gint -des3_decrypt(PurpleCipherContext *context, const guchar data[], - size_t len, guchar output[], size_t *outlen) +des3_decrypt(PurpleCipherContext *context, const guchar input[], size_t in_len, + guchar output[], size_t out_size) { struct _des3_ctx *ctx = purple_cipher_context_get_data(context); if (ctx->mode == PURPLE_CIPHER_BATCH_MODE_ECB) { - return des3_ecb_decrypt(ctx, data, len, output, outlen); + return des3_ecb_decrypt(ctx, input, in_len, output, out_size); } else if (ctx->mode == PURPLE_CIPHER_BATCH_MODE_CBC) { - return des3_cbc_decrypt(ctx, data, len, output, outlen); + return des3_cbc_decrypt(ctx, input, in_len, output, out_size); } else { g_return_val_if_reached(0); } @@ -816,20 +865,22 @@ NULL, /* Get option */ des3_init, /* init */ NULL, /* reset */ + NULL, /* reset state */ des3_uninit, /* uninit */ des3_set_iv, /* set iv */ NULL, /* append */ NULL, /* digest */ + NULL, /* get_digest_size */ des3_encrypt, /* encrypt */ des3_decrypt, /* decrypt */ NULL, /* set salt */ NULL, /* get salt size */ des3_set_key, /* set key */ - NULL, /* get key size */ + des3_get_key_size, /* get_key_size */ des3_set_batch, /* set batch mode */ des3_get_batch, /* get batch mode */ NULL, /* get block size */ - NULL /* set key with len */ + NULL, NULL, NULL, NULL /* reserved */ }; /****************************************************************************** @@ -844,4 +895,3 @@ purple_des3_cipher_get_ops(void) { return &DES3Ops; } -
--- a/libpurple/ciphers/gchecksum.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/ciphers/gchecksum.c Thu May 09 02:56:05 2013 -0400 @@ -1,3 +1,4 @@ +#include "internal.h" #include <cipher.h> #include "ciphers.h" @@ -53,23 +54,24 @@ static gboolean purple_g_checksum_digest(PurpleCipherContext *context, GChecksumType type, - gsize len, guchar *digest, gsize *out_len) + guchar *digest, size_t buff_len) { GChecksum *checksum; - const gssize required_length = g_checksum_type_get_length(type); + const gssize required_len = g_checksum_type_get_length(type); + gsize digest_len = buff_len; checksum = purple_cipher_context_get_data(context); - g_return_val_if_fail(len >= required_length, FALSE); + g_return_val_if_fail(buff_len >= required_len, FALSE); g_return_val_if_fail(checksum != NULL, FALSE); - g_checksum_get_digest(checksum, digest, &len); + g_checksum_get_digest(checksum, digest, &digest_len); + + if (digest_len != required_len) + return FALSE; purple_cipher_context_reset(context, NULL); - if (out_len) - *out_len = len; - return TRUE; } @@ -93,11 +95,16 @@ } \ \ static gboolean \ - lower##_digest(PurpleCipherContext *context, gsize in_len, \ - guchar digest[], size_t *out_len) \ + lower##_digest(PurpleCipherContext *context, guchar digest[], \ + size_t len) \ { \ - return purple_g_checksum_digest(context, (type), in_len, digest, \ - out_len); \ + return purple_g_checksum_digest(context, (type), digest, len); \ + } \ + \ + static size_t \ + lower##_get_digest_size(PurpleCipherContext *context) \ + { \ + return g_checksum_type_get_length((type)); \ } \ \ static PurpleCipherOps camel##Ops = { \ @@ -105,10 +112,12 @@ NULL, /* Get option */ \ lower##_init, /* init */ \ lower##_reset, /* reset */ \ + lower##_reset, /* reset state */ \ purple_g_checksum_uninit, /* uninit */ \ NULL, /* set iv */ \ purple_g_checksum_append, /* append */ \ lower##_digest, /* digest */ \ + lower##_get_digest_size, /* get digest size */ \ NULL, /* encrypt */ \ NULL, /* decrypt */ \ NULL, /* set salt */ \ @@ -118,7 +127,7 @@ NULL, /* set batch mode */ \ NULL, /* get batch mode */ \ lower##_get_block_size, /* get block size */ \ - NULL /* set key with len */ \ + NULL, NULL, NULL, NULL /* reserved */ \ }; \ \ PurpleCipherOps * \
--- a/libpurple/ciphers/hmac.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/ciphers/hmac.c Thu May 09 02:56:05 2013 -0400 @@ -19,6 +19,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ + +#include "internal.h" #include <cipher.h> #include "ciphers.h" @@ -28,7 +30,7 @@ PurpleCipherContext *hash; char *name; int blocksize; - guchar *opad; + guchar *opad, *ipad; }; static void @@ -55,6 +57,21 @@ hctx->blocksize = 0; g_free(hctx->opad); hctx->opad = NULL; + g_free(hctx->ipad); + hctx->ipad = NULL; +} + + static void +hmac_reset_state(PurpleCipherContext *context, gpointer extra) +{ + struct HMAC_Context *hctx; + + hctx = purple_cipher_context_get_data(context); + + if (hctx->hash) { + purple_cipher_context_reset_state(hctx->hash, NULL); + purple_cipher_context_append(hctx->hash, hctx->ipad, hctx->blocksize); + } } static void @@ -99,7 +116,7 @@ } static gboolean -hmac_digest(PurpleCipherContext *context, size_t in_len, guchar *out, size_t *out_len) +hmac_digest(PurpleCipherContext *context, guchar *out, size_t len) { struct HMAC_Context *hctx = purple_cipher_context_get_data(context); PurpleCipherContext *hash = hctx->hash; @@ -109,8 +126,11 @@ g_return_val_if_fail(hash != NULL, FALSE); - inner_hash = g_malloc(100); /* TODO: Should be enough for now... */ - result = purple_cipher_context_digest(hash, 100, inner_hash, &hash_len); + hash_len = purple_cipher_context_get_digest_size(hash); + g_return_val_if_fail(hash_len > 0, FALSE); + + inner_hash = g_malloc(hash_len); + result = purple_cipher_context_digest(hash, inner_hash, hash_len); purple_cipher_context_reset(hash, NULL); @@ -119,11 +139,22 @@ g_free(inner_hash); - result = result && purple_cipher_context_digest(hash, in_len, out, out_len); + result = result && purple_cipher_context_digest(hash, out, len); return result; } + static size_t +hmac_get_digest_size(PurpleCipherContext *context) +{ + struct HMAC_Context *hctx = purple_cipher_context_get_data(context); + PurpleCipherContext *hash = hctx->hash; + + g_return_val_if_fail(hash != NULL, 0); + + return purple_cipher_context_get_digest_size(hash); +} + static void hmac_uninit(PurpleCipherContext *context) { @@ -137,26 +168,28 @@ } static void -hmac_set_key_with_len(PurpleCipherContext *context, const guchar * key, size_t key_len) +hmac_set_key(PurpleCipherContext *context, const guchar * key, size_t key_len) { struct HMAC_Context *hctx = purple_cipher_context_get_data(context); int blocksize, i; - guchar *ipad; guchar *full_key; g_return_if_fail(hctx->hash != NULL); g_free(hctx->opad); + g_free(hctx->ipad); blocksize = hctx->blocksize; - ipad = g_malloc(blocksize); + hctx->ipad = g_malloc(blocksize); hctx->opad = g_malloc(blocksize); if (key_len > blocksize) { purple_cipher_context_reset(hctx->hash, NULL); purple_cipher_context_append(hctx->hash, key, key_len); - full_key = g_malloc(100); /* TODO: Should be enough for now... */ - purple_cipher_context_digest(hctx->hash, 100, full_key, &key_len); + + key_len = purple_cipher_context_get_digest_size(hctx->hash); + full_key = g_malloc(key_len); + purple_cipher_context_digest(hctx->hash, full_key, key_len); } else full_key = g_memdup(key, key_len); @@ -166,21 +199,14 @@ } for(i = 0; i < blocksize; i++) { - ipad[i] = 0x36 ^ full_key[i]; + hctx->ipad[i] = 0x36 ^ full_key[i]; hctx->opad[i] = 0x5c ^ full_key[i]; } g_free(full_key); purple_cipher_context_reset(hctx->hash, NULL); - purple_cipher_context_append(hctx->hash, ipad, blocksize); - g_free(ipad); -} - - static void -hmac_set_key(PurpleCipherContext *context, const guchar * key) -{ - hmac_set_key_with_len(context, key, strlen((char *)key)); + purple_cipher_context_append(hctx->hash, hctx->ipad, blocksize); } static size_t @@ -194,12 +220,14 @@ static PurpleCipherOps HMACOps = { hmac_set_opt, /* Set option */ hmac_get_opt, /* Get option */ - hmac_init, /* init */ - hmac_reset, /* reset */ - hmac_uninit, /* uninit */ + hmac_init, /* init */ + hmac_reset, /* reset */ + hmac_reset_state, /* reset state */ + hmac_uninit, /* uninit */ NULL, /* set iv */ - hmac_append, /* append */ - hmac_digest, /* digest */ + hmac_append, /* append */ + hmac_digest, /* digest */ + hmac_get_digest_size, /* get digest size */ NULL, /* encrypt */ NULL, /* decrypt */ NULL, /* set salt */ @@ -209,7 +237,7 @@ NULL, /* set batch mode */ NULL, /* get batch mode */ hmac_get_block_size, /* get block size */ - hmac_set_key_with_len /* set key with len */ + NULL, NULL, NULL, NULL /* reserved */ }; PurpleCipherOps *
--- a/libpurple/ciphers/md4.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/ciphers/md4.c Thu May 09 02:56:05 2013 -0400 @@ -33,6 +33,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ + +#include "internal.h" #include <cipher.h> #include "ciphers.h" @@ -219,8 +221,7 @@ } static gboolean -md4_digest(PurpleCipherContext *context, size_t in_len, guchar *out, - size_t *out_len) +md4_digest(PurpleCipherContext *context, guchar *out, size_t len) { struct MD4_Context *mctx = purple_cipher_context_get_data(context); const unsigned int offset = mctx->byte_count & 0x3f; @@ -228,8 +229,7 @@ int padding = 56 - (offset + 1); - if(in_len<16) return FALSE; - if(out_len) *out_len = 16; + if(len<16) return FALSE; *p++ = 0x80; if (padding < 0) { memset(p, 0x00, padding + sizeof (guint64)); @@ -250,6 +250,12 @@ return TRUE; } + static size_t +md4_get_digest_size(PurpleCipherContext *context) +{ + return 16; +} + static void md4_uninit(PurpleCipherContext *context) { struct MD4_Context *md4_context; @@ -275,10 +281,12 @@ NULL, /* Get option */ md4_init, /* init */ md4_reset, /* reset */ + md4_reset, /* reset state */ md4_uninit, /* uninit */ NULL, /* set iv */ md4_append, /* append */ md4_digest, /* digest */ + md4_get_digest_size, /* get digest size */ NULL, /* encrypt */ NULL, /* decrypt */ NULL, /* set salt */ @@ -288,7 +296,7 @@ NULL, /* set batch mode */ NULL, /* get batch mode */ md4_get_block_size, /* get block size */ - NULL /* set key with len */ + NULL, NULL, NULL, NULL /* reserved */ }; PurpleCipherOps *
--- a/libpurple/ciphers/rc4.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/ciphers/rc4.c Thu May 09 02:56:05 2013 -0400 @@ -19,6 +19,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ + +#include "internal.h" #include <cipher.h> #include "ciphers.h" #include <util.h> @@ -72,7 +74,7 @@ static void -rc4_set_key (PurpleCipherContext *context, const guchar * key) { +rc4_set_key (PurpleCipherContext *context, const guchar * key, size_t len) { struct RC4Context *ctx; guchar *state; guchar temp_swap; @@ -84,57 +86,21 @@ x = 0; y = 0; state = &ctx->state[0]; + ctx->key_len = len; for(i = 0; i < 256; i++) { y = (key[x] + state[i] + y) % 256; temp_swap = state[i]; state[i] = state[y]; state[y] = temp_swap; - x = (x + 1) % ctx->key_len; - } -} - -static void -rc4_set_opt(PurpleCipherContext *context, const gchar *name, void *value) { - struct RC4Context *ctx; - - ctx = purple_cipher_context_get_data(context); - - if(purple_strequal(name, "key_len")) { - ctx->key_len = GPOINTER_TO_INT(value); + x = (x + 1) % len; } } -static size_t -rc4_get_key_size (PurpleCipherContext *context) -{ - struct RC4Context *ctx; - g_return_val_if_fail(context, -1); - - ctx = purple_cipher_context_get_data(context); - - g_return_val_if_fail(ctx, -1); - - return ctx->key_len; -} - -static void * -rc4_get_opt(PurpleCipherContext *context, const gchar *name) { - struct RC4Context *ctx; - - ctx = purple_cipher_context_get_data(context); - - if(purple_strequal(name, "key_len")) { - return GINT_TO_POINTER(ctx->key_len); - } - - return NULL; -} - -static gint -rc4_encrypt(PurpleCipherContext *context, const guchar data[], - size_t len, guchar output[], size_t *outlen) { +static ssize_t +rc4_encrypt(PurpleCipherContext *context, const guchar input[], size_t in_len, + guchar output[], size_t out_size) { struct RC4Context *ctx; guchar temp_swap; guchar x, y, z; @@ -147,7 +113,7 @@ y = ctx->y; state = &ctx->state[0]; - for(i = 0; i < len; i++) + for(i = 0; i < in_len; i++) { x = (x + 1) % 256; y = (state[x] + y) % 256; @@ -155,35 +121,35 @@ state[x] = state[y]; state[y] = temp_swap; z = state[x] + (state[y]) % 256; - output[i] = data[i] ^ state[z]; + output[i] = input[i] ^ state[z]; } ctx->x = x; ctx->y = y; - if(outlen) - *outlen = len; - return 0; + return in_len; } static PurpleCipherOps RC4Ops = { - rc4_set_opt, /* Set Option */ - rc4_get_opt, /* Get Option */ + NULL, /* Set Option */ + NULL, /* Get Option */ rc4_init, /* init */ rc4_reset, /* reset */ + NULL, /* reset state */ rc4_uninit, /* uninit */ NULL, /* set iv */ NULL, /* append */ NULL, /* digest */ + NULL, /* get digest size */ rc4_encrypt, /* encrypt */ NULL, /* decrypt */ NULL, /* set salt */ NULL, /* get salt size */ rc4_set_key, /* set key */ - rc4_get_key_size, /* get key size */ + NULL, /* get key size */ NULL, /* set batch mode */ NULL, /* get batch mode */ NULL, /* get block size */ - NULL /* set key with len */ + NULL, NULL, NULL, NULL /* reserved */ }; PurpleCipherOps *
--- a/libpurple/ntlm.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/ntlm.c Thu May 09 02:56:05 2013 -0400 @@ -192,12 +192,11 @@ { PurpleCipher *cipher; PurpleCipherContext *context; - size_t outlen; cipher = purple_ciphers_find_cipher("des"); context = purple_cipher_context_new(cipher, NULL); - purple_cipher_context_set_key(context, key); - purple_cipher_context_encrypt(context, plaintext, 8, result, &outlen); + purple_cipher_context_set_key(context, key, 8); + purple_cipher_context_encrypt(context, plaintext, 8, result, 8); purple_cipher_context_destroy(context); } @@ -379,7 +378,7 @@ cipher = purple_ciphers_find_cipher("md4"); context = purple_cipher_context_new(cipher, NULL); purple_cipher_context_append(context, (guint8 *)nt_pw, 2 * lennt); - purple_cipher_context_digest(context, 21, nt_hpw, NULL); + purple_cipher_context_digest(context, nt_hpw, sizeof(nt_hpw)); purple_cipher_context_destroy(context); memset(nt_hpw + 16, 0, 5);
--- a/libpurple/plugins/ciphertest.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/plugins/ciphertest.c Thu May 09 02:56:05 2013 -0400 @@ -86,8 +86,7 @@ purple_cipher_context_append(context, (guchar *)md5_tests[i].question, strlen(md5_tests[i].question)); - ret = purple_cipher_context_digest_to_str(context, sizeof(digest), - digest, NULL); + ret = purple_cipher_context_digest_to_str(context, digest, sizeof(digest)); if(!ret) { purple_debug_info("cipher-test", "failed\n"); @@ -155,8 +154,7 @@ purple_cipher_context_append(context, buff, 1000); } - ret = purple_cipher_context_digest_to_str(context, sizeof(digest), - digest, NULL); + ret = purple_cipher_context_digest_to_str(context, digest, sizeof(digest)); if(!ret) { purple_debug_info("cipher-test", "failed\n");
--- a/libpurple/plugins/perl/common/Cipher.xs Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/plugins/perl/common/Cipher.xs Thu May 09 02:56:05 2013 -0400 @@ -25,6 +25,7 @@ const_iv(SET_IV), const_iv(APPEND), const_iv(DIGEST), + const_iv(GET_DIGEST_SIZE), const_iv(ENCRYPT), const_iv(DECRYPT), const_iv(SET_SALT), @@ -34,7 +35,6 @@ const_iv(SET_BATCH_MODE), const_iv(GET_BATCH_MODE), const_iv(GET_BLOCK_SIZE), - const_iv(SET_KEY_WITH_LEN), const_iv(UNKNOWN), #undef const_iv }; @@ -54,28 +54,30 @@ purple_cipher_get_capabilities(cipher) Purple::Cipher cipher -size_t -purple_cipher_digest_region(name, data_sv, in_len, digest) +gboolean +purple_cipher_digest_region(name, data_sv, data_len, digest) const gchar *name SV *data_sv - size_t in_len + size_t data_len SV *digest PREINIT: - gboolean ret; guchar *buff = NULL; guchar *data = NULL; - size_t data_len; + ssize_t digest_len; + size_t max_digest_len = 100; CODE: data = (guchar *)SvPV(data_sv, data_len); SvUPGRADE(digest, SVt_PV); - buff = (guchar *)SvGROW(digest, in_len); - ret = purple_cipher_digest_region(name, data, data_len, in_len, buff, &RETVAL); - if(!ret) { + buff = (guchar *)SvGROW(digest, max_digest_len); + digest_len = purple_cipher_digest_region(name, data, data_len, buff, max_digest_len); + if(digest_len == -1) { SvSetSV_nosteal(digest, &PL_sv_undef); - XSRETURN_UNDEF; + RETVAL = 0; + } else { + SvCUR_set(digest, digest_len); + SvPOK_only(digest); + RETVAL = 1; } - SvCUR_set(digest, RETVAL); - SvPOK_only(digest); OUTPUT: RETVAL @@ -171,110 +173,120 @@ purple_cipher_context_append(Purple::Cipher::Context context, guchar *data, size_t length(data)) PROTOTYPE: $$ -size_t -purple_cipher_context_digest(context, in_len, digest) +gboolean +purple_cipher_context_digest(context, digest) Purple::Cipher::Context context - size_t in_len SV *digest PREINIT: - gboolean ret; guchar *buff = NULL; + size_t digest_size; CODE: + digest_size = purple_cipher_context_get_digest_size(context); SvUPGRADE(digest, SVt_PV); - buff = (guchar *)SvGROW(digest, in_len); - ret = purple_cipher_context_digest(context, in_len, buff, &RETVAL); - if(!ret) { + buff = (guchar *)SvGROW(digest, digest_size); + if (purple_cipher_context_digest(context, buff, digest_size)) { + SvCUR_set(digest, digest_size); + SvPOK_only(digest); + RETVAL = 1; + } else { SvSetSV_nosteal(digest, &PL_sv_undef); - XSRETURN_UNDEF; + RETVAL = 0; } - SvCUR_set(digest, RETVAL); - SvPOK_only(digest); OUTPUT: RETVAL -size_t -purple_cipher_context_digest_to_str(context, in_len, digest_s) +gboolean +purple_cipher_context_digest_to_str(context, digest_s) Purple::Cipher::Context context - size_t in_len SV *digest_s PREINIT: - gboolean ret; gchar *buff = NULL; + size_t digest_size, str_len; CODE: - in_len += 1; /* perl shouldn't need to care about '\0' at the end */ + digest_size = purple_cipher_context_get_digest_size(context); + str_len = 2 * digest_size; SvUPGRADE(digest_s, SVt_PV); - buff = SvGROW(digest_s, in_len); - ret = purple_cipher_context_digest_to_str(context, in_len, buff, &RETVAL); - if(!ret) { + buff = SvGROW(digest_s, str_len + 1); + if (purple_cipher_context_digest_to_str(context, buff, str_len + 1)) { + SvCUR_set(digest_s, str_len); + SvPOK_only(digest_s); + RETVAL = 1; + } else { SvSetSV_nosteal(digest_s, &PL_sv_undef); - XSRETURN_UNDEF; + RETVAL = 0; } - SvCUR_set(digest_s, RETVAL); - SvPOK_only(digest_s); OUTPUT: RETVAL -gint -purple_cipher_context_encrypt(context, data_sv, output, OUTLIST size_t outlen) +gboolean +purple_cipher_context_encrypt(context, input, output) Purple::Cipher::Context context - SV *data_sv + SV *input SV *output - PROTOTYPE: $$$ PREINIT: - size_t datalen; + size_t input_len, output_len; + ssize_t ret; guchar *buff = NULL; guchar *data = NULL; CODE: - data = (guchar *)SvPV(data_sv, datalen); + data = (guchar *)SvPV(input, input_len); + output_len = input_len + purple_cipher_context_get_block_size(context); SvUPGRADE(output, SVt_PV); - buff = (guchar *)SvGROW(output, datalen); - RETVAL = purple_cipher_context_encrypt(context, data, datalen, buff, &outlen); - if(outlen != 0) { + buff = (guchar *)SvGROW(output, output_len); + ret = purple_cipher_context_encrypt(context, data, input_len, buff, output_len); + if (ret >= 0) { + RETVAL = 1; SvPOK_only(output); - SvCUR_set(output, outlen); + SvCUR_set(output, ret); } else { + RETVAL = 0; SvSetSV_nosteal(output, &PL_sv_undef); } OUTPUT: RETVAL -gint -purple_cipher_context_decrypt(context, data_sv, output, OUTLIST size_t outlen) +gboolean +purple_cipher_context_decrypt(context, input, output) Purple::Cipher::Context context - SV *data_sv + SV *input SV *output - PROTOTYPE: $$$ PREINIT: - size_t datalen; + size_t input_len, output_len; + ssize_t ret; guchar *buff = NULL; guchar *data = NULL; CODE: - data = (guchar *)SvPV(data_sv, datalen); + data = (guchar *)SvPV(input, input_len); + output_len = input_len + purple_cipher_context_get_block_size(context); SvUPGRADE(output, SVt_PV); - buff = (guchar *)SvGROW(output, datalen); - RETVAL = purple_cipher_context_decrypt(context, data, datalen, buff, &outlen); - if(outlen != 0) { + buff = (guchar *)SvGROW(output, output_len); + ret = purple_cipher_context_decrypt(context, data, input_len, buff, output_len); + if (ret >= 0) { + RETVAL = 1; SvPOK_only(output); - SvCUR_set(output, outlen); + SvCUR_set(output, ret); } else { + RETVAL = 0; SvSetSV_nosteal(output, &PL_sv_undef); } OUTPUT: RETVAL void -purple_cipher_context_set_salt(context, salt) +purple_cipher_context_set_salt(context, salt, len) Purple::Cipher::Context context guchar *salt + size_t len size_t purple_cipher_context_get_salt_size(context) Purple::Cipher::Context context void -purple_cipher_context_set_key(context, key) +purple_cipher_context_set_key(context, key, len) Purple::Cipher::Context context guchar *key + size_t len size_t purple_cipher_context_get_key_size(context) @@ -302,7 +314,3 @@ Purple::Cipher::Context context Purple::Cipher::BatchMode mode -void -purple_cipher_context_set_key_with_len(Purple::Cipher::Context context, guchar *key, size_t length(key)) - PROTOTYPE: $$ -
--- a/libpurple/protocols/bonjour/bonjour_ft.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/bonjour/bonjour_ft.c Thu May 09 02:56:05 2013 -0400 @@ -1039,8 +1039,8 @@ account = purple_buddy_get_account(pb); p = g_strdup_printf("%s%s%s", xf->sid, name, bonjour_get_jid(account)); - purple_cipher_digest_region("sha1", (guchar *)p, strlen(p), - sizeof(hashval), hashval, NULL); + purple_cipher_digest_region("sha1", (guchar *)p, strlen(p), hashval, + sizeof(hashval)); g_free(p); memset(dstaddr, 0, 41);
--- a/libpurple/protocols/gg/oauth/oauth.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/gg/oauth/oauth.c Thu May 09 02:56:05 2013 -0400 @@ -53,9 +53,9 @@ context = purple_cipher_context_new_by_name("hmac", NULL); purple_cipher_context_set_option(context, "hash", "sha1"); - purple_cipher_context_set_key(context, (guchar *)key); + purple_cipher_context_set_key(context, (guchar *)key, strlen(key)); purple_cipher_context_append(context, (guchar *)message, strlen(message)); - purple_cipher_context_digest(context, sizeof(digest), digest, NULL); + purple_cipher_context_digest(context, digest, sizeof(digest)); purple_cipher_context_destroy(context); return purple_base64_encode(digest, sizeof(digest));
--- a/libpurple/protocols/jabber/auth.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/jabber/auth.c Thu May 09 02:56:05 2013 -0400 @@ -282,9 +282,9 @@ challenge = xmlnode_get_attrib(x, "challenge"); hmac = purple_cipher_context_new_by_name("hmac", NULL); purple_cipher_context_set_option(hmac, "hash", "md5"); - purple_cipher_context_set_key(hmac, (guchar *)pw); + purple_cipher_context_set_key(hmac, (guchar *)pw, strlen(pw)); purple_cipher_context_append(hmac, (guchar *)challenge, strlen(challenge)); - purple_cipher_context_digest_to_str(hmac, 33, digest, NULL); + purple_cipher_context_digest_to_str(hmac, digest, 33); purple_cipher_context_destroy(hmac); /* Create the response query */
--- a/libpurple/protocols/jabber/auth_digest_md5.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/jabber/auth_digest_md5.c Thu May 09 02:56:05 2013 -0400 @@ -127,7 +127,7 @@ x = g_strdup_printf("%s:%s:%s", convnode, realm, convpasswd ? convpasswd : ""); purple_cipher_context_append(context, (const guchar *)x, strlen(x)); - purple_cipher_context_digest(context, sizeof(result), result, NULL); + purple_cipher_context_digest(context, result, sizeof(result)); a1 = g_strdup_printf("xxxxxxxxxxxxxxxx:%s:%s", nonce, cnonce); a1len = strlen(a1); @@ -135,13 +135,13 @@ purple_cipher_context_reset(context, NULL); purple_cipher_context_append(context, (const guchar *)a1, a1len); - purple_cipher_context_digest(context, sizeof(result), result, NULL); + purple_cipher_context_digest(context, result, sizeof(result)); ha1 = purple_base16_encode(result, 16); purple_cipher_context_reset(context, NULL); purple_cipher_context_append(context, (const guchar *)a2, strlen(a2)); - purple_cipher_context_digest(context, sizeof(result), result, NULL); + purple_cipher_context_digest(context, result, sizeof(result)); ha2 = purple_base16_encode(result, 16); @@ -149,7 +149,7 @@ purple_cipher_context_reset(context, NULL); purple_cipher_context_append(context, (const guchar *)kd, strlen(kd)); - purple_cipher_context_digest(context, sizeof(result), result, NULL); + purple_cipher_context_digest(context, result, sizeof(result)); purple_cipher_context_destroy(context); z = purple_base16_encode(result, 16);
--- a/libpurple/protocols/jabber/auth_scram.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/jabber/auth_scram.c Thu May 09 02:56:05 2013 -0400 @@ -98,9 +98,9 @@ /* Compute U0 */ purple_cipher_context_set_option(context, "hash", (gpointer)hash->name); - purple_cipher_context_set_key_with_len(context, (guchar *)str->str, str->len); + purple_cipher_context_set_key(context, (guchar *)str->str, str->len); purple_cipher_context_append(context, (guchar *)salt->str, salt->len); - purple_cipher_context_digest(context, hash->size, result, NULL); + purple_cipher_context_digest(context, result, hash->size); memcpy(prev, result, hash->size); @@ -108,9 +108,9 @@ for (i = 1; i < iterations; ++i) { guint j; purple_cipher_context_set_option(context, "hash", (gpointer)hash->name); - purple_cipher_context_set_key_with_len(context, (guchar *)str->str, str->len); + purple_cipher_context_set_key(context, (guchar *)str->str, str->len); purple_cipher_context_append(context, prev, hash->size); - purple_cipher_context_digest(context, hash->size, tmp, NULL); + purple_cipher_context_digest(context, tmp, hash->size); for (j = 0; j < hash->size; ++j) result[j] ^= tmp[j]; @@ -140,9 +140,9 @@ context = purple_cipher_context_new_by_name("hmac", NULL); purple_cipher_context_set_option(context, "hash", (gpointer)hash->name); - purple_cipher_context_set_key_with_len(context, key, hash->size); + purple_cipher_context_set_key(context, key, hash->size); purple_cipher_context_append(context, (guchar *)str, strlen(str)); - purple_cipher_context_digest(context, hash->size, out, NULL); + purple_cipher_context_digest(context, out, hash->size); purple_cipher_context_destroy(context); } @@ -153,7 +153,7 @@ context = purple_cipher_context_new_by_name(hash->name, NULL); purple_cipher_context_append(context, data, hash->size); - purple_cipher_context_digest(context, hash->size, out, NULL); + purple_cipher_context_digest(context, out, hash->size); purple_cipher_context_destroy(context); }
--- a/libpurple/protocols/jabber/caps.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/jabber/caps.c Thu May 09 02:56:05 2013 -0400 @@ -900,8 +900,8 @@ } /* generate hash */ - success = purple_cipher_context_digest(context, checksum_size, - checksum, &checksum_size); + success = purple_cipher_context_digest(context, checksum, checksum_size); + checksum_size = purple_cipher_context_get_digest_size(context); purple_cipher_context_destroy(context);
--- a/libpurple/protocols/jabber/jutil.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/jabber/jutil.c Thu May 09 02:56:05 2013 -0400 @@ -748,7 +748,7 @@ /* Hash the data */ purple_cipher_context_append(context, data, len); - if (!purple_cipher_context_digest_to_str(context, sizeof(digest), digest, NULL)) + if (!purple_cipher_context_digest_to_str(context, digest, sizeof(digest))) { purple_debug_error("jabber", "Failed to get digest for %s cipher.\n", hash_algo);
--- a/libpurple/protocols/msn/directconn.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/msn/directconn.c Thu May 09 02:56:05 2013 -0400 @@ -47,7 +47,7 @@ PurpleCipher *cipher = purple_ciphers_find_cipher("sha1"); PurpleCipherContext *context = purple_cipher_context_new(cipher, NULL); purple_cipher_context_append(context, nonce, nonce_len); - purple_cipher_context_digest(context, sizeof(digest), digest, NULL); + purple_cipher_context_digest(context, digest, sizeof(digest)); purple_cipher_context_destroy(context); } else if (type == DC_NONCE_PLAIN) { memcpy(digest, nonce, nonce_len);
--- a/libpurple/protocols/msn/msnutils.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/msn/msnutils.c Thu May 09 02:56:05 2013 -0400 @@ -565,7 +565,7 @@ purple_cipher_context_append(context, (guchar *)input, strlen(input)); purple_cipher_context_append(context, productKey, sizeof(productKey) - 1); - purple_cipher_context_digest(context, sizeof(md5Hash), md5Hash, NULL); + purple_cipher_context_digest(context, md5Hash, sizeof(md5Hash)); purple_cipher_context_destroy(context); /* Split it into four integers */
--- a/libpurple/protocols/msn/nexus.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/msn/nexus.c Thu May 09 02:56:05 2013 -0400 @@ -104,34 +104,28 @@ char *result; hmac = purple_cipher_context_new_by_name("hmac", NULL); + purple_cipher_context_set_option(hmac, "hash", "sha1"); + purple_cipher_context_set_key(hmac, (guchar *)key, key_len); - purple_cipher_context_set_option(hmac, "hash", "sha1"); - purple_cipher_context_set_key_with_len(hmac, (guchar *)key, key_len); purple_cipher_context_append(hmac, magic, magic_len); purple_cipher_context_append(hmac, (guchar *)data, data_len); - purple_cipher_context_digest(hmac, sizeof(hash1), hash1, NULL); + purple_cipher_context_digest(hmac, hash1, sizeof(hash1)); - purple_cipher_context_reset(hmac, NULL); - purple_cipher_context_set_option(hmac, "hash", "sha1"); - purple_cipher_context_set_key_with_len(hmac, (guchar *)key, key_len); + purple_cipher_context_reset_state(hmac, NULL); purple_cipher_context_append(hmac, hash1, 20); purple_cipher_context_append(hmac, magic, magic_len); purple_cipher_context_append(hmac, (guchar *)data, data_len); - purple_cipher_context_digest(hmac, sizeof(hash2), hash2, NULL); + purple_cipher_context_digest(hmac, hash2, sizeof(hash2)); - purple_cipher_context_reset(hmac, NULL); - purple_cipher_context_set_option(hmac, "hash", "sha1"); - purple_cipher_context_set_key_with_len(hmac, (guchar *)key, key_len); + purple_cipher_context_reset_state(hmac, NULL); purple_cipher_context_append(hmac, hash1, 20); - purple_cipher_context_digest(hmac, sizeof(hash3), hash3, NULL); + purple_cipher_context_digest(hmac, hash3, sizeof(hash3)); - purple_cipher_context_reset(hmac, NULL); - purple_cipher_context_set_option(hmac, "hash", "sha1"); - purple_cipher_context_set_key_with_len(hmac, (guchar *)key, key_len); + purple_cipher_context_reset_state(hmac, NULL); purple_cipher_context_append(hmac, hash3, sizeof(hash3)); purple_cipher_context_append(hmac, magic, magic_len); purple_cipher_context_append(hmac, (guchar *)data, data_len); - purple_cipher_context_digest(hmac, sizeof(hash4), hash4, NULL); + purple_cipher_context_digest(hmac, hash4, sizeof(hash4)); purple_cipher_context_destroy(hmac); @@ -147,18 +141,17 @@ { PurpleCipherContext *des3; char *out; - size_t outlen; des3 = purple_cipher_context_new_by_name("des3", NULL); - purple_cipher_context_set_key(des3, (guchar *)key); + purple_cipher_context_set_key(des3, (guchar *)key, 24); purple_cipher_context_set_batch_mode(des3, PURPLE_CIPHER_BATCH_MODE_CBC); purple_cipher_context_set_iv(des3, (guchar *)iv, 8); out = g_malloc(len); if (decrypt) - purple_cipher_context_decrypt(des3, (guchar *)data, len, (guchar *)out, &outlen); + purple_cipher_context_decrypt(des3, (guchar *)data, len, (guchar *)out, len); else - purple_cipher_context_encrypt(des3, (guchar *)data, len, (guchar *)out, &outlen); + purple_cipher_context_encrypt(des3, (guchar *)data, len, (guchar *)out, len); purple_cipher_context_destroy(des3); @@ -208,9 +201,9 @@ len = strlen(nexus->nonce); hmac = purple_cipher_context_new_by_name("hmac", NULL); purple_cipher_context_set_option(hmac, "hash", "sha1"); - purple_cipher_context_set_key_with_len(hmac, (guchar *)key2, 24); + purple_cipher_context_set_key(hmac, (guchar *)key2, 24); purple_cipher_context_append(hmac, (guchar *)nexus->nonce, len); - purple_cipher_context_digest(hmac, 20, hash, NULL); + purple_cipher_context_digest(hmac, hash, 20); purple_cipher_context_destroy(hmac); /* We need to pad this to 72 bytes, apparently */ @@ -576,7 +569,7 @@ ticket_domains[id][SSO_VALID_TICKET_POLICY] : nexus->policy); purple_cipher_context_append(sha1, (guchar *)domain, strlen(domain)); - purple_cipher_context_digest(sha1, 20, digest, NULL); + purple_cipher_context_digest(sha1, digest, 20); domain_b64 = purple_base64_encode(digest, 20); now = time(NULL); @@ -589,7 +582,7 @@ purple_utf8_strftime("%Y-%m-%dT%H:%M:%SZ", tm)); purple_cipher_context_reset(sha1, NULL); purple_cipher_context_append(sha1, (guchar *)timestamp, strlen(timestamp)); - purple_cipher_context_digest(sha1, 20, digest, NULL); + purple_cipher_context_digest(sha1, digest, 20); timestamp_b64 = purple_base64_encode(digest, 20); g_free(now_str); @@ -607,9 +600,9 @@ key = rps_create_key(nexus->secret, 24, (char *)nonce, sizeof(nonce)); hmac = purple_cipher_context_new_by_name("hmac", NULL); purple_cipher_context_set_option(hmac, "hash", "sha1"); - purple_cipher_context_set_key_with_len(hmac, (guchar *)key, 24); + purple_cipher_context_set_key(hmac, (guchar *)key, 24); purple_cipher_context_append(hmac, (guchar *)signedinfo, strlen(signedinfo)); - purple_cipher_context_digest(hmac, 20, signature, NULL); + purple_cipher_context_digest(hmac, signature, 20); purple_cipher_context_destroy(hmac); signature_b64 = purple_base64_encode(signature, 20);
--- a/libpurple/protocols/msn/notification.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/msn/notification.c Thu May 09 02:56:05 2013 -0400 @@ -1417,7 +1417,7 @@ cipher = purple_cipher_context_new_by_name("md5", NULL); purple_cipher_context_append(cipher, (const guchar *)buf, strlen(buf)); - purple_cipher_context_digest_to_str(cipher, sizeof(creds), creds, NULL); + purple_cipher_context_digest_to_str(cipher, creds, sizeof(creds)); purple_cipher_context_destroy(cipher); g_free(buf);
--- a/libpurple/protocols/msn/object.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/msn/object.c Thu May 09 02:56:05 2013 -0400 @@ -159,7 +159,7 @@ ctx = purple_cipher_context_new_by_name("sha1", NULL); purple_cipher_context_append(ctx, data, size); - purple_cipher_context_digest(ctx, sizeof(digest), digest, NULL); + purple_cipher_context_digest(ctx, digest, sizeof(digest)); base64 = purple_base64_encode(digest, sizeof(digest)); msn_object_set_sha1d(msnobj, base64); @@ -181,7 +181,7 @@ purple_cipher_context_reset(ctx, NULL); purple_cipher_context_append(ctx, (const guchar *)buf, strlen(buf)); - purple_cipher_context_digest(ctx, sizeof(digest), digest, NULL); + purple_cipher_context_digest(ctx, digest, sizeof(digest)); purple_cipher_context_destroy(ctx); g_free(buf);
--- a/libpurple/protocols/myspace/myspace.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/myspace/myspace.c Thu May 09 02:56:05 2013 -0400 @@ -584,7 +584,7 @@ /* Compute password hash */ purple_cipher_digest_region("sha1", (guchar *)password_utf16le, - conv_bytes_written, sizeof(hash_pw), hash_pw, NULL); + conv_bytes_written, hash_pw, sizeof(hash_pw)); g_free(password_utf16le); #ifdef MSIM_DEBUG_LOGIN_CHALLENGE @@ -599,7 +599,7 @@ key_context = purple_cipher_context_new(sha1, NULL); purple_cipher_context_append(key_context, hash_pw, HASH_SIZE); purple_cipher_context_append(key_context, (guchar *)(nonce + NONCE_SIZE), NONCE_SIZE); - purple_cipher_context_digest(key_context, sizeof(key), key, NULL); + purple_cipher_context_digest(key_context, key, sizeof(key)); purple_cipher_context_destroy(key_context); #ifdef MSIM_DEBUG_LOGIN_CHALLENGE @@ -614,8 +614,7 @@ /* Note: 'key' variable is 0x14 bytes (from SHA-1 hash), * but only first 0x10 used for the RC4 key. */ - purple_cipher_context_set_option(rc4, "key_len", (gpointer)0x10); - purple_cipher_context_set_key(rc4, key); + purple_cipher_context_set_key(rc4, key, 0x10); /* rc4 encrypt: * nonce1+email+IP list */ @@ -641,8 +640,8 @@ data_out = g_new0(guchar, data->len); - purple_cipher_context_encrypt(rc4, (const guchar *)data->str, - data->len, data_out, &data_out_len); + data_out_len = purple_cipher_context_encrypt(rc4, + (const guchar *)data->str, data->len, data_out, data->len); purple_cipher_context_destroy(rc4); if (data_out_len != data->len) {
--- a/libpurple/protocols/oscar/clientlogin.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/oscar/clientlogin.c Thu May 09 02:56:05 2013 -0400 @@ -133,9 +133,9 @@ context = purple_cipher_context_new_by_name("hmac", NULL); purple_cipher_context_set_option(context, "hash", "sha256"); - purple_cipher_context_set_key(context, (guchar *)key); + purple_cipher_context_set_key(context, (guchar *)key, strlen(key)); purple_cipher_context_append(context, (guchar *)message, strlen(message)); - purple_cipher_context_digest(context, sizeof(digest), digest, NULL); + purple_cipher_context_digest(context, digest, sizeof(digest)); purple_cipher_context_destroy(context); return purple_base64_encode(digest, sizeof(digest));
--- a/libpurple/protocols/oscar/family_auth.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/oscar/family_auth.c Thu May 09 02:56:05 2013 -0400 @@ -98,14 +98,14 @@ context = purple_cipher_context_new(cipher, NULL); purple_cipher_context_append(context, (const guchar *)password, password_len); - purple_cipher_context_digest(context, 16, passdigest, NULL); + purple_cipher_context_digest(context, passdigest, sizeof(passdigest)); purple_cipher_context_destroy(context); context = purple_cipher_context_new(cipher, NULL); purple_cipher_context_append(context, (const guchar *)key, strlen(key)); purple_cipher_context_append(context, passdigest, 16); purple_cipher_context_append(context, (const guchar *)AIM_MD5_STRING, strlen(AIM_MD5_STRING)); - purple_cipher_context_digest(context, 16, digest, NULL); + purple_cipher_context_digest(context, digest, 16); purple_cipher_context_destroy(context); return 0;
--- a/libpurple/protocols/oscar/family_oservice.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/oscar/family_oservice.c Thu May 09 02:56:05 2013 -0400 @@ -977,7 +977,7 @@ context = purple_cipher_context_new_by_name("md5", NULL); purple_cipher_context_append(context, buf, len); - purple_cipher_context_digest(context, 16, digest, NULL); + purple_cipher_context_digest(context, digest, sizeof(digest)); purple_cipher_context_destroy(context); byte_stream_putraw(&bs, digest, 0x10); @@ -993,7 +993,7 @@ */ context = purple_cipher_context_new_by_name("md5", NULL); purple_cipher_context_append(context, &nil, 0); - purple_cipher_context_digest(context, 16, digest, NULL); + purple_cipher_context_digest(context, digest, sizeof(digest)); purple_cipher_context_destroy(context); byte_stream_putraw(&bs, digest, 0x10);
--- a/libpurple/protocols/oscar/oscar.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/oscar/oscar.c Thu May 09 02:56:05 2013 -0400 @@ -5343,7 +5343,7 @@ context = purple_cipher_context_new_by_name("md5", NULL); purple_cipher_context_append(context, data, len); - purple_cipher_context_digest(context, 16, md5, NULL); + purple_cipher_context_digest(context, md5, sizeof(md5)); purple_cipher_context_destroy(context); aim_ssi_seticon(od, md5, 16);
--- a/libpurple/protocols/silc/Makefile.mingw Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/silc/Makefile.mingw Thu May 09 02:56:05 2013 -0400 @@ -10,8 +10,6 @@ DEFINES := $(subst -DWIN32_LEAN_AND_MEAN,,$(DEFINES)) TARGET = libsilc -NEEDED_DLLS = $(SILC_TOOLKIT)/bin/libsilc-1-1-2.dll \ - $(SILC_TOOLKIT)/bin/libsilcclient-1-1-3.dll TYPE = PLUGIN # Static or Plugin... @@ -76,7 +74,6 @@ install: all $(DLL_INSTALL_DIR) $(PURPLE_INSTALL_DIR) cp $(TARGET).dll $(DLL_INSTALL_DIR) - cp $(NEEDED_DLLS) $(PURPLE_INSTALL_DIR) $(OBJECTS): $(PURPLE_CONFIG_H)
--- a/libpurple/protocols/yahoo/libymsg.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/protocols/yahoo/libymsg.c Thu May 09 02:56:05 2013 -0400 @@ -1703,7 +1703,7 @@ md5_cipher = purple_ciphers_find_cipher("md5"); md5_ctx = purple_cipher_context_new(md5_cipher, NULL); purple_cipher_context_append(md5_ctx, (guchar *)crypt, strlen(crypt)); - purple_cipher_context_digest(md5_ctx, sizeof(md5_digest), md5_digest, NULL); + purple_cipher_context_digest(md5_ctx, md5_digest, sizeof(md5_digest)); to_y64(base64_string, md5_digest, 16);
--- a/libpurple/proxy.c Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/proxy.c Thu May 09 02:56:05 2013 -0400 @@ -1696,7 +1696,7 @@ pwlen=strlen(passwd); if (pwlen>64) { purple_cipher_context_append(ctx, (const guchar *)passwd, strlen(passwd)); - purple_cipher_context_digest(ctx, sizeof(Kxoripad), Kxoripad, NULL); + purple_cipher_context_digest(ctx, Kxoripad, sizeof(Kxoripad)); pwlen=16; } else { memcpy(Kxoripad, passwd, pwlen); @@ -1711,12 +1711,12 @@ purple_cipher_context_reset(ctx, NULL); purple_cipher_context_append(ctx, Kxoripad, 64); purple_cipher_context_append(ctx, challenge, challen); - purple_cipher_context_digest(ctx, sizeof(Kxoripad), Kxoripad, NULL); + purple_cipher_context_digest(ctx, Kxoripad, sizeof(Kxoripad)); purple_cipher_context_reset(ctx, NULL); purple_cipher_context_append(ctx, Kxoropad, 64); purple_cipher_context_append(ctx, Kxoripad, 16); - purple_cipher_context_digest(ctx, 16, response, NULL); + purple_cipher_context_digest(ctx, response, 16); purple_cipher_context_destroy(ctx); }
--- a/libpurple/win32/global.mak Wed May 08 21:03:34 2013 -0400 +++ b/libpurple/win32/global.mak Thu May 09 02:56:05 2013 -0400 @@ -26,7 +26,7 @@ GCC_SSP_TOP ?= $(shell dirname $(shell which $(CC))) CYRUS_SASL_TOP ?= $(WIN32_DEV_TOP)/cyrus-sasl-2.1 WEBKITGTK_TOP ?= $(WIN32_DEV_TOP)/libwebkitgtk-1.10 -LIBSOUP_TOP ?= $(WIN32_DEV_TOP)/libsoup-2.40 +LIBSOUP_TOP ?= $(WIN32_DEV_TOP)/libsoup-2.42 GETTEXT_TOP ?= $(WIN32_DEV_TOP)/gettext-0.18 INTLTOOL_TOP ?= $(WIN32_DEV_TOP)/intltool-0.50
--- a/pidgin/win32/nsis/generate_gtk_zip.sh Wed May 08 21:03:34 2013 -0400 +++ b/pidgin/win32/nsis/generate_gtk_zip.sh Thu May 09 02:56:05 2013 -0400 @@ -18,7 +18,7 @@ #This needs to be changed every time there is any sort of change. BUNDLE_VERSION=2.24.14.0 -BUNDLE_SHA1SUM="f2f1f74295ab237bedddbe38586bb7e5191178f1" +BUNDLE_SHA1SUM="835a5ac2760e967c71611539d3d4da3e9b4675ed" ZIP_FILE="$PIDGIN_BASE/pidgin/win32/nsis/gtk-runtime-$BUNDLE_VERSION.zip" #BUNDLE_URL="https://pidgin.im/win32/download_redir.php?version=$PIDGIN_VERSION>k_version=$BUNDLE_VERSION&dl_pkg=gtk" BUNDLE_URL="https://dl.dropbox.com/u/5448886/pidgin-win32/gtk-runtime-2.24.14.0.zip" @@ -77,53 +77,52 @@ #TODO: this is just a temporary mirror - Tomek Wasilczyk's <tomkiewicz@cpw.pidgin.im> Dropbox DOWNLOAD_HOST="https://dl.dropbox.com/u/5448886/pidgin-win32/runtime-deps/" -ATK="${DOWNLOAD_HOST}mingw32-atk-2.6.0-1.4.noarch.rpm ATK 2.6.0-1.4 sha1sum:d0792a3355b22cf4f0e218382dde71b1e22a2b03" -CAIRO2="${DOWNLOAD_HOST}mingw32-libcairo2-1.10.2-8.4.noarch.rpm Cairo 1.10.2-8.4 sha1sum:f69af74753c7fcd95b7778eee7c3d731d64749ba" +ATK="${DOWNLOAD_HOST}mingw32-atk-2.8.0-1.5.noarch.rpm ATK 2.8.0-1.5 sha1sum:0c682eadc299963aaa5d7998d655e46ead7d7515" +CAIRO2="${DOWNLOAD_HOST}mingw32-libcairo2-1.10.2-8.12.noarch.rpm Cairo 1.10.2-8.12 sha1sum:e33c58603678a8ba113bffe282bec810bd70172e" DBUS="${DOWNLOAD_HOST}mingw32-dbus-1-1.7.0-2.1.noarch.rpm D-Bus 1.7.0-2.1 sha1sum:6961e4df15172b057e91b266dbb7cbd01a736e56" -DBUS_GLIB="${DOWNLOAD_HOST}mingw32-dbus-1-glib-0.92-3.4.noarch.rpm dbus-glib 0.92-3.4 sha1sum:3af1dd35cbe2cdf62ee5144862934f5f8dd5e20d" -ENCHANT="${DOWNLOAD_HOST}mingw32-enchant-1.6.0-3.7.noarch.rpm Enchant 1.6.0-3.4 sha1sum:f7e0571ef98833b087be6c9d71008b3c4c4435d6" +DBUS_GLIB="${DOWNLOAD_HOST}mingw32-dbus-1-glib-0.100.2-1.2.noarch.rpm dbus-glib 0.100.2-1.2 sha1sum:72d27c0c01ce3e94e4dddc653c6ac0544c28362f" +ENCHANT="${DOWNLOAD_HOST}mingw32-enchant-1.6.0-3.9.noarch.rpm Enchant 1.6.0-3.9 sha1sum:a8569c8dcc77f69d065320388fca822ef5bf1fe5" FONTCONFIG="${DOWNLOAD_HOST}mingw32-fontconfig-2.10.92-1.2.noarch.rpm fontconfig 2.10.92-1.2 sha1sum:d8da351f5d4d9816f02ac5287dd7887c711902ed" FREETYPE="${DOWNLOAD_HOST}mingw32-freetype-2.4.11-2.1.noarch.rpm freetype 2.4.11-2.1 sha1sum:0eee29696e87d47e7487ba5e90530bf20159f31e" -GDK_PIXBUF="${DOWNLOAD_HOST}mingw32-gdk-pixbuf-2.28.0-1.1.noarch.rpm gdk-pixbuf 2.28.0-1.1 sha1sum:f75f3c989d8d8ee3f92555d269465d1bc26ea428" -GEOCLUE="${DOWNLOAD_HOST}mingw32-libgeoclue-0.12.99-1.4.noarch.rpm Geoclue 0.12.99-1.4 sha1sum:cf3df30e75c5b38fbe2f63689cadcc2930823b9c" -GLIB="${DOWNLOAD_HOST}mingw32-glib2-2.36.0-2.2.noarch.rpm Glib 2.36.0-2.2 sha1sum:1b788be9f7b15cde9452f135831feebc51f3a5a4" -GST="${DOWNLOAD_HOST}mingw32-libgstreamer-0.10.35-1.4.noarch.rpm GStreamer 0.10.35-1.4 sha1sum:fd5bb6f8a9083eb3ca402670e7c38474f7270efe" -GST_INT="${DOWNLOAD_HOST}mingw32-libgstinterfaces-0.10.32-5.4.noarch.rpm GStreamer-interfaces 0.10.32-5.4 sha1sum:cec1dd36bbcc10716e9f8776e4bd53fb0b07d8bb" -GTK2="${DOWNLOAD_HOST}mingw32-gtk2-2.24.14-1.4.noarch.rpm GTK+ 2.24.14-1.4 sha1sum:71971fe63d355aa893536b691f249ace78d89a2b" -GTKSPELL="${DOWNLOAD_HOST}mingw32-gtkspell-2.0.16-2.5.noarch.rpm GtkSpell 2.0.16-2.5 sha1sum:49381274b248ffe56ef733a90908541dc587c9af" -LIBFFI="${DOWNLOAD_HOST}mingw32-libffi-3.0.10-2.4.noarch.rpm libffi 3.0.10-2.4 sha1sum:871f13d5f02c03d62b882cc1fa4c98dcff76d4c5" +GDK_PIXBUF="${DOWNLOAD_HOST}mingw32-gdk-pixbuf-2.28.0-1.2.noarch.rpm gdk-pixbuf 2.28.0-1.2 sha1sum:8673e06c3a838e47a093043bf86bb62ea3627fe0" +GEOCLUE="${DOWNLOAD_HOST}mingw32-libgeoclue-0.12.99-1.10.noarch.rpm Geoclue 0.12.99-1.10 sha1sum:84410ca9a6d2fac46217c51e22ebbc5ac3cae040" +GLIB="${DOWNLOAD_HOST}mingw32-glib2-2.36.1-1.1.noarch.rpm Glib 2.36.1-1.1 sha1sum:ed468f064f61c5a12b716c83cba8ccbe05d22992" +GST="${DOWNLOAD_HOST}mingw32-libgstreamer-0.10.35-1.10.noarch.rpm GStreamer 0.10.35-1.10 sha1sum:7097499f3a34b42c25a200fa18f5df6f3f3ba527" +GST_INT="${DOWNLOAD_HOST}mingw32-libgstinterfaces-0.10.32-5.10.noarch.rpm GStreamer-interfaces 0.10.32-5.10 sha1sum:29cfb0668a2e54287ea969eab1a4f3672a09c04a" +GTK2="${DOWNLOAD_HOST}mingw32-gtk2-2.24.14-2.7.noarch.rpm GTK+ 2.24.14-2.7 sha1sum:a6f98a0c974c0273127c6423d89fca5f48c7d30c" +GTKSPELL="${DOWNLOAD_HOST}mingw32-gtkspell-2.0.16-2.10.noarch.rpm GtkSpell 2.0.16-2.10 sha1sum:623afdc7cc2c43c1f5d39be797c3ec8ee1ab5570" +LIBFFI="${DOWNLOAD_HOST}mingw32-libffi-3.0.10-2.7.noarch.rpm libffi 3.0.10-2.7 sha1sum:628b014349dc132d3aa46362b30fc1cdd61f6b97" LIBGCC="${DOWNLOAD_HOST}mingw32-libgcc-4.8.0-6.1.noarch.rpm libgcc 4.8.0-6.1 sha1sum:ab599bf07bf2d56367c57b442440598358c943af" -LIBHB="${DOWNLOAD_HOST}mingw32-libharfbuzz0-0.9.14-1.5.noarch.rpm libharfbuzz 0.9.14-1.5 sha1sum:54106eb1e8ff42c79ea52c1ef64a066f1f2cb133" -LIBJASPER="${DOWNLOAD_HOST}mingw32-libjasper-1.900.1-6.4.noarch.rpm JasPer 1.900.1-6.4 sha1sum:25e01ed277b8dda6191afb7dd0e0928558c1f2d6" -LIBICU="${DOWNLOAD_HOST}mingw32-libicu-51.1-2.1.noarch.rpm ICU 51.1-2.1 sha1sum:97ec8264e38abceeadda4631730bb0b5f3f3ebfe" -LIBINTL="${DOWNLOAD_HOST}mingw32-libintl-0.18.1.1-13.4.noarch.rpm libintl 0.18.1.1-13.4 sha1sum:043c3b8eb9c872681faed5ec5263456a24bf29e4" -LIBJPEG="${DOWNLOAD_HOST}mingw32-libjpeg-8d-3.4.noarch.rpm libjpeg 8d-3.4 sha1sum:5d1db1eaabc6ababbed648408adbbe6eee0292fc" -LIBJSON="${DOWNLOAD_HOST}mingw32-libjson-glib-0.14.2-1.4.noarch.rpm json-glib 0.14.2-1.4 sha1sum:698194c97baf732bd6b109778f2834d71eedc524" -LIBLZMA="${DOWNLOAD_HOST}mingw32-liblzma-5.0.4-1.4.noarch.rpm liblzma 5.0.4-1.4 sha1sum:ef360fab4b6c77d1618891ccc8f52c2421f37c09" -LIBPNG="${DOWNLOAD_HOST}mingw32-libpng-1.5.11-1.4.noarch.rpm libpng 1.5.11-1.4 sha1sum:99d0a077f70e83f7df10f28915a2137a0ff34462" -LIBSOUP="${DOWNLOAD_HOST}mingw32-libsoup-2.40.3-1.9.noarch.rpm libsoup 2.40.3-1.9 sha1sum:d343f6f0661c4527901a0ba446f00af2f925e70f" +LIBGNURX="${DOWNLOAD_HOST}mingw32-libgnurx-2.5-4.6.noarch.rpm libgnurx 2.5-4.6 sha1sum:51571e6b1e5e9fb865c110cae04c582ff3c44cb7" +LIBHB="${DOWNLOAD_HOST}mingw32-libharfbuzz0-0.9.16-1.1.noarch.rpm libharfbuzz 0.9.16-1.1 sha1sum:9bd7d5132f3f7bace01202b380be474f9a1ae771" +LIBJASPER="${DOWNLOAD_HOST}mingw32-libjasper-1.900.1-6.6.noarch.rpm JasPer 1.900.1-6.6 sha1sum:1a0f0072e0b0f73bd8d4e26aed93baa10d77e504" +LIBICU="${DOWNLOAD_HOST}mingw32-libicu-51.1-2.3.noarch.rpm ICU 51.1-2.3 sha1sum:c259c9d7f9f58934ebb49ecc80b15b7492e5a245" +LIBINTL="${DOWNLOAD_HOST}mingw32-libintl-0.18.1.1-13.6.noarch.rpm libintl 0.18.1.1-13.6 sha1sum:0e6fde8e86788874366f308e25634f95613e906a" +LIBJPEG="${DOWNLOAD_HOST}mingw32-libjpeg-8d-3.6.noarch.rpm libjpeg 8d-3.6 sha1sum:db85723377243045388a5d3c873262cd83ffa7e2" +LIBJSON="${DOWNLOAD_HOST}mingw32-libjson-glib-0.14.2-2.1.noarch.rpm json-glib 0.14.2-2.1 sha1sum:366bf545855ced7fdfefc57b75ef7bbb5ebc249b" +LIBLZMA="${DOWNLOAD_HOST}mingw32-liblzma-5.0.4-1.6.noarch.rpm liblzma 5.0.4-1.6 sha1sum:67bad5204ae09d163f799adec3286fff297e3bc8" +LIBPNG="${DOWNLOAD_HOST}mingw32-libpng-1.5.11-1.6.noarch.rpm libpng 1.5.11-1.6 sha1sum:bb28549351c1f0d7a8afd129ac656be18a616149" +LIBSILC="${DOWNLOAD_HOST}mingw32-libsilc-1.1.10-2.1.noarch.rpm libsilc 1.1.10-2.1 sha1sum:b7690eac1a91caf2b02b058483a3768705a6f3df" +LIBSILCCL="${DOWNLOAD_HOST}mingw32-libsilcclient-1.1.10-2.1.noarch.rpm libsilcclient 1.1.10-2.1 sha1sum:88b84ff4c43643ce4b8ec1eb345e73c139cc164a" +LIBSOUP="${DOWNLOAD_HOST}mingw32-libsoup-2.42.2-1.1.noarch.rpm libsoup 2.42.2-1.1 sha1sum:f0af29ceb420daaa549dd5dc470fbd62bc732252" LIBSSP="${DOWNLOAD_HOST}mingw32-libssp-4.8.0-6.1.noarch.rpm LibSSP 4.8.0-6.1 sha1sum:c05b2e0470f41d26f8ebfff93dfd51263842a4ea" LIBSTDCPP="${DOWNLOAD_HOST}mingw32-libstdc++-4.8.0-6.1.noarch.rpm libstdc++ 4.8.0-6.1 sha1sum:627860950e951764fe1aa229d3a63bb01618ba90" -LIBTIFF="${DOWNLOAD_HOST}mingw32-libtiff-4.0.2-1.4.noarch.rpm libtiff 4.0.2-1.4 sha1sum:9a8f8b018e8bafd47067fe6fd0debc1e887239b1" +LIBTIFF="${DOWNLOAD_HOST}mingw32-libtiff-4.0.2-1.6.noarch.rpm libtiff 4.0.2-1.6 sha1sum:3a082540386748ead608d388ce55a0c1dd28715d" LIBXML="${DOWNLOAD_HOST}mingw32-libxml2-2.9.0-2.1.noarch.rpm libxml 2.9.0-2.1 sha1sum:de73090544effcd167f94fcfe8e2d1f005adbea7" -LIBXSLT="${DOWNLOAD_HOST}mingw32-libxslt-1.1.28-1.1.noarch.rpm libxslt 1.1.28-1.1 sha1sum:b43448edbbb04d72e355bd45d5bee94414395589" -MEANW="${DOWNLOAD_HOST}mingw32-meanwhile-1.0.2-3.1.noarch.rpm Meanwhile 1.0.2-3.1 sha1sum:89fc8c6c15bf4825a7d750a15134f14c8ae05c9c" -MOZNSS="${DOWNLOAD_HOST}mingw32-mozilla-nss-3.14.3-2.1.noarch.rpm NSS 3.14.3-2.1 sha1sum:0eec79ddee11f2453af34f85c5939e6d33f6c0c5" -MOZNSPR="${DOWNLOAD_HOST}mingw32-mozilla-nspr-4.9.6-3.1.noarch.rpm NSPR 4.9.6-3.1 sha1sum:87b562845f8e46d44e57262752dae406620ae6df" -PANGO="${DOWNLOAD_HOST}mingw32-pango-1.34.0-2.1.noarch.rpm Pango 1.34.0-2.1 sha1sum:f382abb3dfb822f647a902266039571c0506bfa4" -PIXMAN="${DOWNLOAD_HOST}mingw32-pixman-0.26.0-1.4.noarch.rpm pixman 0.26.0-1.4 sha1sum:f751fe428ea83996daf7e57bff6f4f79361b0d29" +LIBXSLT="${DOWNLOAD_HOST}mingw32-libxslt-1.1.28-1.2.noarch.rpm libxslt 1.1.28-1.2 sha1sum:6ee150c6271edded95f92285f59d02c2896e459e" +MEANW="${DOWNLOAD_HOST}mingw32-meanwhile-1.0.2-3.2.noarch.rpm Meanwhile 1.0.2-3.2 sha1sum:6b0fd8d94205d80eba37ea3e3f19ded7a1297473" +MOZNSS="${DOWNLOAD_HOST}mingw32-mozilla-nss-3.14.3-2.2.noarch.rpm NSS 3.14.3-2.2 sha1sum:b0353cda8b5670796f0246f1da27754c3205a009" +MOZNSPR="${DOWNLOAD_HOST}mingw32-mozilla-nspr-4.9.6-4.1.noarch.rpm NSPR 4.9.6-4.1 sha1sum:42b1a803c54639f6cf0aa1f6287324d0658c705c" +PANGO="${DOWNLOAD_HOST}mingw32-pango-1.34.0-2.3.noarch.rpm Pango 1.34.0-2.3 sha1sum:65b55b73c4f5c8107fdf48ef2e4f5c351189cd4f" +PIXMAN="${DOWNLOAD_HOST}mingw32-pixman-0.26.0-1.6.noarch.rpm pixman 0.26.0-1.6 sha1sum:b0a440a3761e77d890a2e7de52405e2ce364c9b2" PTHREADS="${DOWNLOAD_HOST}mingw32-pthreads-2.8.0-14.6.noarch.rpm pthreads 2.8.0-14.6 sha1sum:e948ae221f82bbcb4fbfd991638e4170c150fe9f" SQLITE="${DOWNLOAD_HOST}mingw32-libsqlite-3.7.6.2-1.6.noarch.rpm SQLite 3.7.6.2-1.6 sha1sum:f61529bc0c996d9af28a94648ce6102d579ed928" -TCL="${DOWNLOAD_HOST}mingw32-tcl-8.5.9-13.6.noarch.rpm Tcl 8.5.9-13.6 sha1sum:442eaf5e761d59bb527cb1f9f93749ebc13b4367" -TK="${DOWNLOAD_HOST}mingw32-tk-8.5.9-8.6.noarch.rpm Tk 8.5.9-8.6 sha1sum:d0884c56f767f76981ddf7bc6d74d3c47237740a" +TCL="${DOWNLOAD_HOST}mingw32-tcl-8.5.9-14.1.noarch.rpm Tcl 8.5.9-14.1 sha1sum:1178fc95ab97d274504f3d76c3ebe9bdbb39847a" +TK="${DOWNLOAD_HOST}mingw32-tk-8.5.9-8.7.noarch.rpm Tk 8.5.9-8.7 sha1sum:4ec1595fdf06eaa9f4d38b433edc430217697995" +WEBKITGTK="${DOWNLOAD_HOST}mingw32-libwebkitgtk-1.10.2-9.2.noarch.rpm WebKitGTK+ 1.10.2-9.2 sha1sum:010dbad413f824696cd1e32fe70046c9a1cb425f" +ZLIB="${DOWNLOAD_HOST}mingw32-zlib-1.2.7-1.4.noarch.rpm zlib 1.2.7-1.4 sha1sum:83e91f3b4d14e47131ca33fc69e12b82aabdd589" -#webkit 1.10 crashes when calling document.createElement, so I grabbed 1.8 from openSUSE_Factory instead -#TODO: investigate it -#WEBKITGTK="${DOWNLOAD_HOST}mingw32-libwebkitgtk-1.10.2-1.3.noarch.rpm WebKitGTK+ 1.10.2-1.3 sha1sum:33b558d2110fc2caf2c3c0ab24a6c18645814893" -WEBKITGTK="${DOWNLOAD_HOST}mingw32-libwebkitgtk-1.8.3-1.14.noarch.rpm WebKitGTK+ 1.8.3-1.14 sha1sum:ade86455fc2da257f4fe5831367f500a61a1af9a" - -ZLIB="${DOWNLOAD_HOST}mingw32-zlib-1.2.7-1.4.noarch.rpm zlib 1.2.7-1.4 sha1sum:83e91f3b4d14e47131ca33fc69e12b82aabdd589" -ALL="ATK CAIRO2 DBUS DBUS_GLIB ENCHANT FONTCONFIG FREETYPE GDK_PIXBUF GEOCLUE GLIB GST GST_INT GTK2 GTKSPELL LIBFFI LIBGCC LIBHB LIBJASPER LIBICU LIBINTL LIBJPEG LIBJSON LIBLZMA LIBPNG LIBSOUP LIBSSP LIBSTDCPP LIBTIFF LIBXML LIBXSLT MEANW MOZNSS MOZNSPR PANGO PIXMAN PTHREADS SQLITE TCL TK WEBKITGTK ZLIB" +ALL="ATK CAIRO2 DBUS DBUS_GLIB ENCHANT FONTCONFIG FREETYPE GDK_PIXBUF GEOCLUE GLIB GST GST_INT GTK2 GTKSPELL LIBFFI LIBGCC LIBGNURX LIBHB LIBJASPER LIBICU LIBINTL LIBJPEG LIBJSON LIBLZMA LIBPNG LIBSILC LIBSILCCL LIBSOUP LIBSSP LIBSTDCPP LIBTIFF LIBXML LIBXSLT MEANW MOZNSS MOZNSPR PANGO PIXMAN PTHREADS SQLITE TCL TK WEBKITGTK ZLIB" mkdir -p $STAGE_DIR cd $STAGE_DIR
--- a/pidgin/win32/prepare-workspace.sh Wed May 08 21:03:34 2013 -0400 +++ b/pidgin/win32/prepare-workspace.sh Thu May 09 02:56:05 2013 -0400 @@ -27,12 +27,10 @@ ARC_CSA="${DOWNLOAD_HOST}cyrus-sasl-2.1.25.tar.gz;Cyrus SASL;2.1.25;b9d7f510c0c5daa71ee5225daacdd58e948a8d19;cyrus-sasl-2.1.25;cyrus-sasl-2.1" ARCHIVES+="ARC_CSA " -ARC_NSS="${DOWNLOAD_HOST}mingw32-mozilla-nss-devel-3.14.3-2.1.noarch.rpm;NSS;3.14.3-2.1;8851c7989589ab76848f0c7b330a1f283c6d6819;${OBS_SKIP};nss-3.14" +ARC_NSS="${DOWNLOAD_HOST}mingw32-mozilla-nss-devel-3.14.3-2.2.noarch.rpm;NSS;3.14.3-2.2;fd394678ef2a8ef1dbbc20c25701678bc8678acf;${OBS_SKIP};nss-3.14" ARCHIVES+="ARC_NSS " -ARC_NSP="${DOWNLOAD_HOST}mingw32-mozilla-nspr-devel-4.9.6-3.1.noarch.rpm;NSPR;4.9.6-3.1;19e2b11cfb4990cd442ccb413875e4f35ef0b00c;${OBS_SKIP};nss-3.14" +ARC_NSP="${DOWNLOAD_HOST}mingw32-mozilla-nspr-devel-4.9.6-4.1.noarch.rpm;NSPR;4.9.6-4.1;b15aefbf99ade3042d0e4ed32f9368ff38064ecd;${OBS_SKIP};nss-3.14" ARCHIVES+="ARC_NSP " -ARC_NSPP="${DOWNLOAD_HOST}nspr-warnings-1.patch;NSPR patch;1;dd433456895b7232b61b272a99809f19f804e2ea;0;nss-3.14" -ARCHIVES+="ARC_NSPP " ARC_PID="${DOWNLOAD_HOST}pidgin-inst-deps-20130214.tar.gz;inst-deps;20130214;372218ab472c4070cd45489dae175dea5638cf17;;" ARCHIVES+="ARC_PID " @@ -52,7 +50,7 @@ ARCHIVES+="ARC_MG6 " ARC_MG7="${DOWNLOAD_HOST}mingw32-runtime-20130216-2.3.noarch.rpm;mingw: runtime;20130216-2.3;9ff3810f8313d19ab18458d73565856608cf9188;${OBS_SKIP};mingw" ARCHIVES+="ARC_MG7 " -ARC_MG8="${DOWNLOAD_HOST}mingw32-zlib-1.2.7-1.4.noarch.rpm;mingw: zlib;1.2.7-1.4;83e91f3b4d14e47131ca33fc69e12b82aabdd589;${OBS_SKIP};mingw" +ARC_MG8="${DOWNLOAD_HOST}mingw32-zlib-1.2.7-1.7.noarch.rpm;mingw: zlib;1.2.7-1.7;c34986df8520de706f9e8516f4353af90ba78f39;${OBS_SKIP};mingw" ARCHIVES+="ARC_MG8 " ARC_MG9="${DOWNLOAD_HOST}mingw32-headers-20130216-1.1.noarch.rpm;mingw: headers;20130216-1.1;313bdc131e15bbca1e4332395c536f2caa9e54b0;${OBS_SKIP}/include;mingw/lib/gcc/i686-w64-mingw32/4.8.0/include" ARCHIVES+="ARC_MG9 " @@ -61,67 +59,65 @@ #gtk and friends GTK_DIR="gtk2-2.24" -ARC_GT1="${DOWNLOAD_HOST}mingw32-glib2-devel-2.36.0-2.2.noarch.rpm;gtk: Glib;2.36.0-2.2;dd1a632960673c5a3e86a01015a15564d023f8d0;${OBS_SKIP};${GTK_DIR}" +ARC_GT1="${DOWNLOAD_HOST}mingw32-glib2-devel-2.36.1-1.1.noarch.rpm;gtk: Glib;2.36.1-1.1;af64b014c735cbdb750e35960c0fde9de4fef9f0;${OBS_SKIP};${GTK_DIR}" ARCHIVES+="ARC_GT1 " -ARC_GT2="${DOWNLOAD_HOST}mingw32-gtk2-devel-2.24.14-2.2.noarch.rpm;gtk: GTK+2;2.24.14-2.2;8be2b1c9dc94fa9e19f9f95a9b716340bbab643f;${OBS_SKIP};${GTK_DIR}" +ARC_GT2="${DOWNLOAD_HOST}mingw32-gtk2-devel-2.24.14-2.7.noarch.rpm;gtk: GTK+2;2.24.14-2.7;4abd5fddf7ca2b6ee7ab35f4b549894bc146a005;${OBS_SKIP};${GTK_DIR}" ARCHIVES+="ARC_GT2 " ARC_GT3="${DOWNLOAD_HOST}mingw32-libintl-devel-0.18.1.1-13.6.noarch.rpm;gtk: libintl;0.18.1.1-13.6;49afd3059ecc7713debb29b801558958637114d1;${OBS_SKIP};${GTK_DIR}" ARCHIVES+="ARC_GT3 " ARC_GT4="${DOWNLOAD_HOST}mingw32-zlib-devel-1.2.7-1.7.noarch.rpm;gtk: zlib;1.2.7-1.7;e3fd07747fcd96bbf83d7a1a870feccc19c0e15e;${OBS_SKIP};${GTK_DIR}" ARCHIVES+="ARC_GT4 " -ARC_GT5="${DOWNLOAD_HOST}mingw32-atk-devel-2.8.0-1.3.noarch.rpm;gtk: ATK;2.8.0-1.3;3324e25c85222a95ef12ef28305aa19680860c78;${OBS_SKIP};${GTK_DIR}" +ARC_GT5="${DOWNLOAD_HOST}mingw32-atk-devel-2.8.0-1.5.noarch.rpm;gtk: ATK;2.8.0-1.5;d6c54241ef3ce80b4a6722f23fe47eba88e0a9f0;${OBS_SKIP};${GTK_DIR}" ARCHIVES+="ARC_GT5 " -ARC_GT6="${DOWNLOAD_HOST}mingw32-cairo-devel-1.10.2-8.8.noarch.rpm;gtk: Cairo;1.10.2-8.8;9b6acea60968eb218a0eedbcca05820576d8d8df;${OBS_SKIP};${GTK_DIR}" +ARC_GT6="${DOWNLOAD_HOST}mingw32-cairo-devel-1.10.2-8.12.noarch.rpm;gtk: Cairo;1.10.2-8.12;a9ea09988bc896226971dc544d9b499882d37ba6;${OBS_SKIP};${GTK_DIR}" ARCHIVES+="ARC_GT6 " -ARC_GT7="${DOWNLOAD_HOST}mingw32-gdk-pixbuf-devel-2.28.0-1.1.noarch.rpm;gtk: GDK-PixBuf;2.28.0-1.1;94b3d4662ef02338c1b7ae936c3e1271652b1f62;${OBS_SKIP};${GTK_DIR}" +ARC_GT7="${DOWNLOAD_HOST}mingw32-gdk-pixbuf-devel-2.28.0-1.2.noarch.rpm;gtk: GDK-PixBuf;2.28.0-1.2;d476228dd6e1ad43bbf0dd5d6e9e9bad394c9ec5;${OBS_SKIP};${GTK_DIR}" ARCHIVES+="ARC_GT7 " -ARC_GT8="${DOWNLOAD_HOST}mingw32-pango-devel-1.34.0-2.1.noarch.rpm;gtk: Pango;1.34.0-2.1;d00aed92fb549096234507a431e21567e63c3977;${OBS_SKIP};${GTK_DIR}" +ARC_GT8="${DOWNLOAD_HOST}mingw32-pango-devel-1.34.0-2.3.noarch.rpm;gtk: Pango;1.34.0-2.3;c875ae60dacf05b642d7da5f289a3c58ff9b0e52;${OBS_SKIP};${GTK_DIR}" ARCHIVES+="ARC_GT8 " -ARC_ENC="${DOWNLOAD_HOST}mingw32-enchant-devel-1.6.0-3.7.noarch.rpm;Enchant;1.6.0-3.7;a535ac09423ba84fcd484ffa2251ab7ceea0121f;${OBS_SKIP};enchant-1.6" +ARC_ENC="${DOWNLOAD_HOST}mingw32-enchant-devel-1.6.0-3.9.noarch.rpm;Enchant;1.6.0-3.9;1daadbb4fbeb06a6ad26bed916dc2a980d971c49;${OBS_SKIP};enchant-1.6" ARCHIVES+="ARC_ENC " -ARC_GSP="${DOWNLOAD_HOST}mingw32-gtkspell-devel-2.0.16-2.5.noarch.rpm;GtkSpell;2.0.16-2.5;ededc099c2ad5ede6b27cf5f70753f693fa1f0e3;${OBS_SKIP};gtkspell-2.0" +ARC_GSP="${DOWNLOAD_HOST}mingw32-gtkspell-devel-2.0.16-2.10.noarch.rpm;GtkSpell;2.0.16-2.10;efbd58f41d9053c17eb2c6ea75dff9017068e01c;${OBS_SKIP};gtkspell-2.0" ARCHIVES+="ARC_GSP " # TODO: is it really necessary? ARC_INT="${DOWNLOAD_HOST}intltool-0.50.2-4.1.1.noarch.rpm;intltool;0.50.2-4.1.1;92c42de2b8a9827b6dca65090dd4b0e293397689;usr;intltool-0.50" ARCHIVES+="ARC_INT " -ARC_MWH="${DOWNLOAD_HOST}mingw32-meanwhile-devel-1.0.2-3.1.noarch.rpm;meanwhile;1.0.2-3.1;5a7cfa0057d865149e56445ca100489dc73843ee;${OBS_SKIP};meanwhile-1.0" +ARC_MWH="${DOWNLOAD_HOST}mingw32-meanwhile-devel-1.0.2-3.2.noarch.rpm;meanwhile;1.0.2-3.2;2c92bbf6084cb930c923ec94c17b62b4b894c146;${OBS_SKIP};meanwhile-1.0" ARCHIVES+="ARC_MWH " -ARC_MWHD="${DOWNLOAD_HOST}mingw32-meanwhile-debug-1.0.2-3.1.noarch.rpm;meanwhile debug symbols;1.0.2-3.1;ad1b315089d0ccb9605c287c382ef307cd864a6a;${OBS_SKIP};meanwhile-1.0" +ARC_MWHD="${DOWNLOAD_HOST}mingw32-meanwhile-debug-1.0.2-3.2.noarch.rpm;meanwhile debug symbols;1.0.2-3.2;7e3c02178d219426eeb8f4f34147763c7ea5be85;${OBS_SKIP};meanwhile-1.0" ARCHIVES+="ARC_MWHD " ARC_PRL="${DOWNLOAD_HOST}perl-5.10.0.tar.gz;Perl;5.10.0;46496029a80cabdfa119cbd70bc14d14bfde8071;perl-5.10.0;perl-5.10" ARCHIVES+="ARC_PRL " -ARC_SIL="${DOWNLOAD_HOST}silc-toolkit-1.1.10-1.tar.gz;SILC Toolkit;1.1.10-1;ead4463ea2ac9e24f18486d9c827dbf40119de80;silc-toolkit-1.1.10-1;silc-toolkit-1.1" +ARC_SIL="${DOWNLOAD_HOST}mingw32-silc-toolkit-devel-1.1.10-2.1.noarch.rpm;SILC Toolkit;1.1.10-2.1;cc92fc87c013a085bdd0664e8fba1acc5a2ccb18;${OBS_SKIP};silc-toolkit-1.1" ARCHIVES+="ARC_SIL " -ARC_TCL="${DOWNLOAD_HOST}mingw32-tcl-devel-8.5.9-13.6.noarch.rpm;Tcl;8.5.9-13.6;22a6d0e748d7c7c5863f15199a21019a57a46748;${OBS_SKIP};tcl-8.5;include/tcl-private/generic/(tcl|tclDecls|tclPlatDecls|tclTomMath|tclTomMathDecls)\\.h" +ARC_TCL="${DOWNLOAD_HOST}mingw32-tcl-devel-8.5.9-14.1.noarch.rpm;Tcl;8.5.9-14.1;22a64967654629e01a2f52226c3de431a43683f8;${OBS_SKIP};tcl-8.5;include/tcl-private/generic/(tcl|tclDecls|tclPlatDecls|tclTomMath|tclTomMathDecls)\\.h" ARCHIVES+="ARC_TCL " -ARC_TCLP="${DOWNLOAD_HOST}tcl-warnings-1.patch;Tcl patch;1;54bc9252c2af4b7ce7436aea7f1fa09a1e849202;0;tcl-8.5" -ARCHIVES+="ARC_TCLP " -ARC_TK="${DOWNLOAD_HOST}mingw32-tk-devel-8.5.9-8.6.noarch.rpm;Tk;8.5.9-8.6;17fc995bbdca21579b52991c2e74bead1815c76a;${OBS_SKIP};tcl-8.5;include/tk-private/generic/(tk|tkDecls|tkIntXlibDecls|tkPlatDecls)\\.h" +ARC_TK="${DOWNLOAD_HOST}mingw32-tk-devel-8.5.9-8.7.noarch.rpm;Tk;8.5.9-8.7;c469e5933cace0f2eed0fec9892843ca216c51ea;${OBS_SKIP};tcl-8.5;include/tk-private/generic/(tk|tkDecls|tkIntXlibDecls|tkPlatDecls)\\.h" ARCHIVES+="ARC_TK " -ARC_JSG="${DOWNLOAD_HOST}mingw32-json-glib-devel-0.14.2-1.7.noarch.rpm;json-glib;0.14.2-1.7;e86a81d5c4bbc7a2ea6b808dd5819c883c4303cc;${OBS_SKIP};json-glib-0.14" +ARC_JSG="${DOWNLOAD_HOST}mingw32-json-glib-devel-0.14.2-2.1.noarch.rpm;json-glib;0.14.2-2.1;27154ec4e4fa214b72f28658be2de7be4e0a9e3e;${OBS_SKIP};json-glib-0.14" ARCHIVES+="ARC_JSG " ARC_XML="${DOWNLOAD_HOST}mingw32-libxml2-devel-2.9.0-2.1.noarch.rpm;libxml2;2.9.0-2.1;bd63823e0be2436ee7d2369aa254e7214a0dd692;${OBS_SKIP};libxml2-2.9" ARCHIVES+="ARC_XML " -ARC_WKG="${DOWNLOAD_HOST}mingw32-libwebkitgtk-devel-1.8.3-1.14.noarch.rpm;WebKitGTK+;1.8.3-1.14;5f2ae2c8c04c4ad4309ba677de886f450db1fe6d;${OBS_SKIP};libwebkitgtk-1.10" +ARC_WKG="${DOWNLOAD_HOST}mingw32-libwebkitgtk-devel-1.10.2-9.2.noarch.rpm;WebKitGTK+;1.10.2-9.2;02cd5de75e3b4269bc1a31320e95f455d5804be9;${OBS_SKIP};libwebkitgtk-1.10" ARCHIVES+="ARC_WKG " -ARC_SOU="${DOWNLOAD_HOST}mingw32-libsoup-devel-2.40.3-1.9.noarch.rpm;libsoup;2.40.3-1.9;8eed05e330ec00edb1b8bcb672a9e1aecbe66560;${OBS_SKIP};libsoup-2.40" +ARC_SOU="${DOWNLOAD_HOST}mingw32-libsoup-devel-2.42.2-1.1.noarch.rpm;libsoup;2.42.2-1.1;cb4e520f1bb17c83230f28bb225420dce54c8d80;${OBS_SKIP};libsoup-2.42" ARCHIVES+="ARC_SOU " ARC_GTT="${DOWNLOAD_HOST}mingw32-gettext-runtime-0.18.1.1-13.6.noarch.rpm;gettext;0.18.1.1-13.6;e3785e932427d63bf5cf27f258d1236e49437143;${OBS_SKIP};gettext-0.18" ARCHIVES+="ARC_GTT " -ARC_GTL="${DOWNLOAD_HOST}mingw32-libintl-0.18.1.1-13.4.noarch.rpm;gettext: libintl;0.18.1.1-13.4;043c3b8eb9c872681faed5ec5263456a24bf29e4;${OBS_SKIP};gettext-0.18" +ARC_GTL="${DOWNLOAD_HOST}mingw32-libintl-0.18.1.1-13.6.noarch.rpm;gettext: libintl;0.18.1.1-13.6;0e6fde8e86788874366f308e25634f95613e906a;${OBS_SKIP};gettext-0.18" ARCHIVES+="ARC_GTL " # implementation