From 8bee920d50ed850e0354b18c6b8cd4a993069620 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 9 Oct 2008 21:32:17 +0000 Subject: mega-renaming to avoid exporting symbols not starting with MHD --- src/daemon/https/lgl/gc-gnulib.c | 12 ++++----- src/daemon/https/lgl/rijndael-alg-fst.c | 10 +++---- src/daemon/https/lgl/rijndael-alg-fst.h | 8 +++--- src/daemon/https/lgl/rijndael-api-fst.c | 46 ++++++++++++++++---------------- src/daemon/https/lgl/rijndael-api-fst.h | 28 +++++++++---------- src/daemon/https/lgl/strverscmp.c | 10 +++---- src/daemon/https/lgl/strverscmp.h | 2 +- src/daemon/https/minitasn1/coding.c | 4 +-- src/daemon/https/minitasn1/parser_aux.c | 20 +++++++------- src/daemon/https/tls/auth_rsa_export.c | 2 +- src/daemon/https/tls/gnutls_algorithms.c | 4 +-- 11 files changed, 73 insertions(+), 73 deletions(-) diff --git a/src/daemon/https/lgl/gc-gnulib.c b/src/daemon/https/lgl/gc-gnulib.c index 46448679..7c16d443 100644 --- a/src/daemon/https/lgl/gc-gnulib.c +++ b/src/daemon/https/lgl/gc-gnulib.c @@ -316,17 +316,17 @@ MHD_gc_cipher_setkey (MHD_gc_cipher_handle handle, size_t keylen, const char *ke for (i = 0; i < keylen; i++) sprintf (&keyMaterial[2 * i], "%02x", key[i] & 0xFF); - rc = rijndaelMakeKey (&ctx->aesEncKey, RIJNDAEL_DIR_ENCRYPT, + rc = MHD_rijndaelMakeKey (&ctx->aesEncKey, RIJNDAEL_DIR_ENCRYPT, keylen * 8, keyMaterial); if (rc < 0) return GC_INVALID_CIPHER; - rc = rijndaelMakeKey (&ctx->aesDecKey, RIJNDAEL_DIR_DECRYPT, + rc = MHD_rijndaelMakeKey (&ctx->aesDecKey, RIJNDAEL_DIR_DECRYPT, keylen * 8, keyMaterial); if (rc < 0) return GC_INVALID_CIPHER; - rc = rijndaelCipherInit (&ctx->aesContext, RIJNDAEL_MODE_ECB, NULL); + rc = MHD_MHD_rijndaelCipherInit (&ctx->aesContext, RIJNDAEL_MODE_ECB, NULL); if (rc < 0) return GC_INVALID_CIPHER; } @@ -374,7 +374,7 @@ MHD_gc_cipher_setiv (MHD_gc_cipher_handle handle, size_t ivlen, const char *iv) for (i = 0; i < ivlen; i++) sprintf (&ivMaterial[2 * i], "%02x", iv[i] & 0xFF); - rc = rijndaelCipherInit (&ctx->aesContext, RIJNDAEL_MODE_CBC, + rc = MHD_MHD_rijndaelCipherInit (&ctx->aesContext, RIJNDAEL_MODE_CBC, ivMaterial); if (rc < 0) return GC_INVALID_CIPHER; @@ -449,7 +449,7 @@ MHD_gc_cipher_encrypt_inline (MHD_gc_cipher_handle handle, size_t len, char *dat { int nblocks; - nblocks = rijndaelBlockEncrypt (&ctx->aesContext, &ctx->aesEncKey, + nblocks = MHD_rijndaelBlockEncrypt (&ctx->aesContext, &ctx->aesEncKey, data, 8 * len, data); if (nblocks < 0) return GC_INVALID_CIPHER; @@ -521,7 +521,7 @@ MHD_gc_cipher_decrypt_inline (MHD_gc_cipher_handle handle, size_t len, char *dat { int nblocks; - nblocks = rijndaelBlockDecrypt (&ctx->aesContext, &ctx->aesDecKey, + nblocks = MHD_rijndaelBlockDecrypt (&ctx->aesContext, &ctx->aesDecKey, data, 8 * len, data); if (nblocks < 0) return GC_INVALID_CIPHER; diff --git a/src/daemon/https/lgl/rijndael-alg-fst.c b/src/daemon/https/lgl/rijndael-alg-fst.c index d14aad65..d17fbeed 100644 --- a/src/daemon/https/lgl/rijndael-alg-fst.c +++ b/src/daemon/https/lgl/rijndael-alg-fst.c @@ -762,7 +762,7 @@ static const uint32_t rcon[] = { * @return the number of rounds for the given cipher key size. */ int -rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], +MHD_rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], const char cipherKey[], size_t keyBits) { size_t i = 0; @@ -857,14 +857,14 @@ rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], * @return the number of rounds for the given cipher key size. */ int -rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], +MHD_rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], const char cipherKey[], size_t keyBits) { size_t Nr, i, j; uint32_t temp; /* expand the cipher key: */ - Nr = rijndaelKeySetupEnc (rk, cipherKey, keyBits); + Nr = MHD_rijndaelKeySetupEnc (rk, cipherKey, keyBits); /* invert the order of the round keys: */ for (i = 0, j = 4 * Nr; i < j; i += 4, j -= 4) { @@ -911,7 +911,7 @@ rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], } void -rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, +MHD_rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, const char pt[16], char ct[16]) { uint32_t s0, s1, s2, s3, t0, t1, t2, t3; @@ -1002,7 +1002,7 @@ rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, } void -rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, +MHD_rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, const char ct[16], char pt[16]) { uint32_t s0, s1, s2, s3, t0, t1, t2, t3; diff --git a/src/daemon/https/lgl/rijndael-alg-fst.h b/src/daemon/https/lgl/rijndael-alg-fst.h index 657d6697..c5496181 100644 --- a/src/daemon/https/lgl/rijndael-alg-fst.h +++ b/src/daemon/https/lgl/rijndael-alg-fst.h @@ -55,13 +55,13 @@ #define RIJNDAEL_MAXKB (256/8) #define RIJNDAEL_MAXNR 14 -int rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], +int MHD_rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], const char cipherKey[], size_t keyBits); -int rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], +int MHD_rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], const char cipherKey[], size_t keyBits); -void rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, +void MHD_rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, const char pt[16], char ct[16]); -void rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, +void MHD_rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, const char ct[16], char pt[16]); #endif /* __RIJNDAEL_ALG_FST_H */ diff --git a/src/daemon/https/lgl/rijndael-api-fst.c b/src/daemon/https/lgl/rijndael-api-fst.c index 327abdc8..62d2a4e6 100644 --- a/src/daemon/https/lgl/rijndael-api-fst.c +++ b/src/daemon/https/lgl/rijndael-api-fst.c @@ -72,7 +72,7 @@ #include rijndael_rc -rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, +MHD_rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, size_t keyLen, const char *keyMaterial) { size_t i; @@ -138,18 +138,18 @@ rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, } if (direction == RIJNDAEL_DIR_ENCRYPT) { - key->Nr = rijndaelKeySetupEnc (key->rk, cipherKey, keyLen); + key->Nr = MHD_rijndaelKeySetupEnc (key->rk, cipherKey, keyLen); } else { - key->Nr = rijndaelKeySetupDec (key->rk, cipherKey, keyLen); + key->Nr = MHD_rijndaelKeySetupDec (key->rk, cipherKey, keyLen); } - rijndaelKeySetupEnc (key->ek, cipherKey, keyLen); + MHD_rijndaelKeySetupEnc (key->ek, cipherKey, keyLen); return 0; } rijndael_rc -rijndaelCipherInit (rijndaelCipherInstance * cipher, rijndael_mode mode, +MHD_MHD_rijndaelCipherInit (rijndaelCipherInstance * cipher, rijndael_mode mode, const char *IV) { if ((mode == RIJNDAEL_MODE_ECB) || (mode == RIJNDAEL_MODE_CBC) @@ -199,7 +199,7 @@ rijndaelCipherInit (rijndaelCipherInstance * cipher, rijndael_mode mode, } int -rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, +MHD_rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, const rijndaelKeyInstance * key, const char *input, size_t inputLen, char *outBuffer) { @@ -222,7 +222,7 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, case RIJNDAEL_MODE_ECB: for (i = numBlocks; i > 0; i--) { - rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); + MHD_rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); input += 16; outBuffer += 16; } @@ -240,7 +240,7 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, ((uint32_t *) iv)[2]; ((uint32_t *) block)[3] = ((uint32_t *) input)[3] ^ ((uint32_t *) iv)[3]; - rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); + MHD_rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); memcpy (cipher->IV, outBuffer, 16); input += 16; outBuffer += 16; @@ -254,7 +254,7 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, memcpy (outBuffer, input, 16); for (k = 0; k < 128; k++) { - rijndaelEncrypt (key->ek, key->Nr, iv, block); + MHD_rijndaelEncrypt (key->ek, key->Nr, iv, block); outBuffer[k >> 3] ^= (block[0] & 0x80U) >> (k & 7); for (t = 0; t < 15; t++) { @@ -276,7 +276,7 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, } int -rijndaelPadEncrypt (rijndaelCipherInstance * cipher, +MHD_rijndaelPadEncrypt (rijndaelCipherInstance * cipher, const rijndaelKeyInstance * key, const char *input, size_t inputOctets, char *outBuffer) { @@ -299,7 +299,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, case RIJNDAEL_MODE_ECB: for (i = numBlocks; i > 0; i--) { - rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); + MHD_rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); input += 16; outBuffer += 16; } @@ -307,7 +307,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, assert (padLen > 0 && padLen <= 16); memcpy (block, input, 16 - padLen); memset (block + 16 - padLen, padLen, padLen); - rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); + MHD_rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); break; case RIJNDAEL_MODE_CBC: @@ -322,7 +322,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, ((uint32_t *) iv)[2]; ((uint32_t *) block)[3] = ((uint32_t *) input)[3] ^ ((uint32_t *) iv)[3]; - rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); + MHD_rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); memcpy (cipher->IV, outBuffer, 16); input += 16; outBuffer += 16; @@ -337,7 +337,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, { block[i] = (char) padLen ^ iv[i]; } - rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); + MHD_rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); memcpy (cipher->IV, outBuffer, 16); break; @@ -349,7 +349,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, } int -rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, +MHD_rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, const rijndaelKeyInstance * key, const char *input, size_t inputLen, char *outBuffer) { @@ -375,7 +375,7 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, case RIJNDAEL_MODE_ECB: for (i = numBlocks; i > 0; i--) { - rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); + MHD_rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); input += 16; outBuffer += 16; } @@ -385,7 +385,7 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, iv = cipher->IV; for (i = numBlocks; i > 0; i--) { - rijndaelDecrypt (key->rk, key->Nr, input, block); + MHD_rijndaelDecrypt (key->rk, key->Nr, input, block); ((uint32_t *) block)[0] ^= ((uint32_t *) iv)[0]; ((uint32_t *) block)[1] ^= ((uint32_t *) iv)[1]; ((uint32_t *) block)[2] ^= ((uint32_t *) iv)[2]; @@ -404,7 +404,7 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, memcpy (outBuffer, input, 16); for (k = 0; k < 128; k++) { - rijndaelEncrypt (key->ek, key->Nr, iv, block); + MHD_rijndaelEncrypt (key->ek, key->Nr, iv, block); for (t = 0; t < 15; t++) { iv[t] = (iv[t] << 1) | (iv[t + 1] >> 7); @@ -425,7 +425,7 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, } int -rijndaelPadDecrypt (rijndaelCipherInstance * cipher, +MHD_rijndaelPadDecrypt (rijndaelCipherInstance * cipher, const rijndaelKeyInstance * key, const char *input, size_t inputOctets, char *outBuffer) { @@ -453,12 +453,12 @@ rijndaelPadDecrypt (rijndaelCipherInstance * cipher, /* all blocks but last */ for (i = numBlocks - 1; i > 0; i--) { - rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); + MHD_rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); input += 16; outBuffer += 16; } /* last block */ - rijndaelDecrypt (key->rk, key->Nr, input, block); + MHD_rijndaelDecrypt (key->rk, key->Nr, input, block); padLen = block[15]; if (padLen >= 16) { @@ -478,7 +478,7 @@ rijndaelPadDecrypt (rijndaelCipherInstance * cipher, /* all blocks but last */ for (i = numBlocks - 1; i > 0; i--) { - rijndaelDecrypt (key->rk, key->Nr, input, block); + MHD_rijndaelDecrypt (key->rk, key->Nr, input, block); ((uint32_t *) block)[0] ^= ((uint32_t *) cipher->IV)[0]; ((uint32_t *) block)[1] ^= ((uint32_t *) cipher->IV)[1]; ((uint32_t *) block)[2] ^= ((uint32_t *) cipher->IV)[2]; @@ -489,7 +489,7 @@ rijndaelPadDecrypt (rijndaelCipherInstance * cipher, outBuffer += 16; } /* last block */ - rijndaelDecrypt (key->rk, key->Nr, input, block); + MHD_rijndaelDecrypt (key->rk, key->Nr, input, block); ((uint32_t *) block)[0] ^= ((uint32_t *) cipher->IV)[0]; ((uint32_t *) block)[1] ^= ((uint32_t *) cipher->IV)[1]; ((uint32_t *) block)[2] ^= ((uint32_t *) cipher->IV)[2]; diff --git a/src/daemon/https/lgl/rijndael-api-fst.h b/src/daemon/https/lgl/rijndael-api-fst.h index cbe6411f..088e6bfd 100644 --- a/src/daemon/https/lgl/rijndael-api-fst.h +++ b/src/daemon/https/lgl/rijndael-api-fst.h @@ -137,7 +137,7 @@ typedef struct from KEYMATERIAL, a hex string, of KEYLEN size. KEYLEN should be 128, 192 or 256. Returns 0 on success, or an error code. */ extern rijndael_rc -rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, +MHD_rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, size_t keyLen, const char *keyMaterial); /* Initialize cipher state CIPHER for encryption MODE (e.g., @@ -145,18 +145,18 @@ rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, 2*RIJNDAEL_MAX_IV_SIZE length. IV may be NULL for modes that do not need an IV (i.e., RIJNDAEL_MODE_ECB). */ extern rijndael_rc -rijndaelCipherInit (rijndaelCipherInstance * cipher, +MHD_MHD_rijndaelCipherInit (rijndaelCipherInstance * cipher, rijndael_mode mode, const char *IV); /* Encrypt data in INPUT, of INPUTLEN/8 bytes length, placing the output in the pre-allocated OUTBUFFER which must hold at least INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be - initialized with rijndaelCipherInit before calling this function. - The encryption KEY must be initialized with rijndaelMakeKey before + initialized with MHD_MHD_rijndaelCipherInit before calling this function. + The encryption KEY must be initialized with MHD_rijndaelMakeKey before calling this function. Return the number of bits written, or a negative rijndael_rc error code. */ extern int -rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, +MHD_rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, const rijndaelKeyInstance * key, const char *input, size_t inputLen, char *outBuffer); @@ -165,24 +165,24 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, INPUTOCTETS aligned to the next block size boundary. Ciphertext-Stealing as described in RFC 2040 is used to encrypt partial blocks. The CIPHER is used as state, and must be - initialized with rijndaelCipherInit before calling this function. - The encryption KEY must be initialized with rijndaelMakeKey before + initialized with MHD_MHD_rijndaelCipherInit before calling this function. + The encryption KEY must be initialized with MHD_rijndaelMakeKey before calling this function. Return the number of bits written, or a negative rijndael_rc error code. */ extern int -rijndaelPadEncrypt (rijndaelCipherInstance * cipher, +MHD_rijndaelPadEncrypt (rijndaelCipherInstance * cipher, const rijndaelKeyInstance * key, const char *input, size_t inputOctets, char *outBuffer); /* Decrypt data in INPUT, of INPUTLEN/8 bytes length, placing the output in the pre-allocated OUTBUFFER which must hold at least INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be - initialized with rijndaelCipherInit before calling this function. - The encryption KEY must be initialized with rijndaelMakeKey before + initialized with MHD_MHD_rijndaelCipherInit before calling this function. + The encryption KEY must be initialized with MHD_rijndaelMakeKey before calling this function. Return the number of bits written, or a negative rijndael_rc error code. */ extern int -rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, +MHD_rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, const rijndaelKeyInstance * key, const char *input, size_t inputLen, char *outBuffer); @@ -191,12 +191,12 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, INPUTOCTETS aligned to the next block size boundary. Ciphertext-Stealing as described in RFC 2040 is used to encrypt partial blocks. The CIPHER is used as state, and must be - initialized with rijndaelCipherInit before calling this function. - The encryption KEY must be initialized with rijndaelMakeKey before + initialized with MHD_MHD_rijndaelCipherInit before calling this function. + The encryption KEY must be initialized with MHD_rijndaelMakeKey before calling this function. Return the number of bits written, or a negative rijndael_rc error code. */ extern int -rijndaelPadDecrypt (rijndaelCipherInstance * cipher, +MHD_rijndaelPadDecrypt (rijndaelCipherInstance * cipher, const rijndaelKeyInstance * key, const char *input, size_t inputOctets, char *outBuffer); diff --git a/src/daemon/https/lgl/strverscmp.c b/src/daemon/https/lgl/strverscmp.c index 1b45810f..83971034 100644 --- a/src/daemon/https/lgl/strverscmp.c +++ b/src/daemon/https/lgl/strverscmp.c @@ -45,11 +45,11 @@ of `digit' even when the host does not conform to POSIX. */ #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) -#undef __strverscmp -#undef strverscmp +#undef __MHD_strverscmp +#undef MHD_strverscmp #ifndef weak_alias -# define __strverscmp strverscmp +# define __MHD_strverscmp MHD_strverscmp #endif /* Compare S1 and S2 as strings holding indices/version numbers, @@ -58,7 +58,7 @@ */ int -__strverscmp (const char *s1, const char *s2) +__MHD_strverscmp (const char *s1, const char *s2) { const unsigned char *p1 = (const unsigned char *) s1; const unsigned char *p2 = (const unsigned char *) s2; @@ -126,5 +126,5 @@ __strverscmp (const char *s1, const char *s2) } #ifdef weak_alias -weak_alias (__strverscmp, strverscmp) +weak_alias (__MHD_strverscmp, MHD_strverscmp) #endif diff --git a/src/daemon/https/lgl/strverscmp.h b/src/daemon/https/lgl/strverscmp.h index d95d7b31..48919889 100644 --- a/src/daemon/https/lgl/strverscmp.h +++ b/src/daemon/https/lgl/strverscmp.h @@ -19,6 +19,6 @@ #ifndef STRVERSCMP_H_ # define STRVERSCMP_H_ -int strverscmp (const char *, const char *); +int MHD_strverscmp (const char *, const char *); #endif /* not STRVERSCMP_H_ */ diff --git a/src/daemon/https/minitasn1/coding.c b/src/daemon/https/minitasn1/coding.c index 0f223b04..6124c859 100644 --- a/src/daemon/https/minitasn1/coding.c +++ b/src/daemon/https/minitasn1/coding.c @@ -321,7 +321,7 @@ MHD__asn1_objectid_der (unsigned char *str, unsigned char *der, int *der_len) } -const char bit_mask[] = { 0xFF, 0xFE, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0x80 }; +const char MHD_bit_mask[] = { 0xFF, 0xFE, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0x80 }; /** * MHD__asn1_bit_der: @@ -351,7 +351,7 @@ MHD__asn1_bit_der (const unsigned char *str, int bit_len, MHD__asn1_length_der (len_byte + 1, der, &len_len); der[len_len] = len_pad; memcpy (der + len_len + 1, str, len_byte); - der[len_len + len_byte] &= bit_mask[len_pad]; + der[len_len + len_byte] &= MHD_bit_mask[len_pad]; *der_len = len_byte + len_len + 1; } diff --git a/src/daemon/https/minitasn1/parser_aux.c b/src/daemon/https/minitasn1/parser_aux.c index 2ec54cbf..6e82dd71 100644 --- a/src/daemon/https/minitasn1/parser_aux.c +++ b/src/daemon/https/minitasn1/parser_aux.c @@ -42,12 +42,12 @@ typedef struct list_struct /* Pointer to the first element of the list */ -list_type *firstElement = NULL; +list_type *MHD_firstElement = NULL; /******************************************************/ /* Function : MHD__asn1_add_node */ /* Description: creates a new NODE_ASN element and */ -/* puts it in the list pointed by firstElement. */ +/* puts it in the list pointed by MHD_firstElement. */ /* Parameters: */ /* type: type of the new element (see TYPE_ */ /* and CONST_ constants). */ @@ -71,8 +71,8 @@ MHD__asn1_add_node (unsigned int type) } listElement->node = punt; - listElement->next = firstElement; - firstElement = listElement; + listElement->next = MHD_firstElement; + MHD_firstElement = listElement; punt->type = type; @@ -439,10 +439,10 @@ MHD__asn1_delete_list (void) { list_type *listElement; - while (firstElement) + while (MHD_firstElement) { - listElement = firstElement; - firstElement = firstElement->next; + listElement = MHD_firstElement; + MHD_firstElement = MHD_firstElement->next; MHD__asn1_free (listElement); } } @@ -457,10 +457,10 @@ MHD__asn1_delete_list_and_nodes (void) { list_type *listElement; - while (firstElement) + while (MHD_firstElement) { - listElement = firstElement; - firstElement = firstElement->next; + listElement = MHD_firstElement; + MHD_firstElement = MHD_firstElement->next; MHD__asn1_remove_node (listElement->node); MHD__asn1_free (listElement); } diff --git a/src/daemon/https/tls/auth_rsa_export.c b/src/daemon/https/tls/auth_rsa_export.c index 9269f704..31a5f2a6 100644 --- a/src/daemon/https/tls/auth_rsa_export.c +++ b/src/daemon/https/tls/auth_rsa_export.c @@ -48,7 +48,7 @@ int MHD__gnutls_proc_rsa_client_kx (MHD_gtls_session_t, opaque *, size_t); static int gen_rsa_export_server_kx (MHD_gtls_session_t, opaque **); static int proc_rsa_export_server_kx (MHD_gtls_session_t, opaque *, size_t); -const MHD_gtls_mod_auth_st rsa_export_auth_struct = { +const MHD_gtls_mod_auth_st MHD_rsa_export_auth_struct = { "RSA EXPORT", MHD_gtls_gen_cert_server_certificate, MHD_gtls_gen_cert_client_certificate, diff --git a/src/daemon/https/tls/gnutls_algorithms.c b/src/daemon/https/tls/gnutls_algorithms.c index bef51b19..d6e12f48 100644 --- a/src/daemon/https/tls/gnutls_algorithms.c +++ b/src/daemon/https/tls/gnutls_algorithms.c @@ -386,7 +386,7 @@ static const enum MHD_GNUTLS_CompressionMethod /* Key Exchange Section */ extern MHD_gtls_mod_auth_st MHD_gtls_rsa_auth_struct; -extern MHD_gtls_mod_auth_st rsa_export_auth_struct; +extern MHD_gtls_mod_auth_st MHD_rsa_export_auth_struct; extern MHD_gtls_mod_auth_st MHD_gtls_dhe_rsa_auth_struct; extern MHD_gtls_mod_auth_st MHD_gtls_dhe_dss_auth_struct; extern MHD_gtls_mod_auth_st MHD_gtls_anon_auth_struct; @@ -416,7 +416,7 @@ static const MHD_gtls_kx_algo_entry_t MHD_gtls_kx_algorithms[] = { 0}, {"RSA-EXPORT", MHD_GNUTLS_KX_RSA_EXPORT, - &rsa_export_auth_struct, + &MHD_rsa_export_auth_struct, 0, 1 /* needs RSA params */ }, {"DHE-RSA", -- cgit v1.2.3