diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-10-09 21:32:17 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-10-09 21:32:17 +0000 |
commit | 8bee920d50ed850e0354b18c6b8cd4a993069620 (patch) | |
tree | ef19f32609cb92364dd70f95510bd328d8b74f60 | |
parent | 6ff7b62145bb2d38f3ca5e23d3a8b80c54f0c0dd (diff) | |
download | libmicrohttpd-8bee920d50ed850e0354b18c6b8cd4a993069620.tar.gz libmicrohttpd-8bee920d50ed850e0354b18c6b8cd4a993069620.zip |
mega-renaming to avoid exporting symbols not starting with MHD
-rw-r--r-- | src/daemon/https/lgl/gc-gnulib.c | 12 | ||||
-rw-r--r-- | src/daemon/https/lgl/rijndael-alg-fst.c | 10 | ||||
-rw-r--r-- | src/daemon/https/lgl/rijndael-alg-fst.h | 8 | ||||
-rw-r--r-- | src/daemon/https/lgl/rijndael-api-fst.c | 46 | ||||
-rw-r--r-- | src/daemon/https/lgl/rijndael-api-fst.h | 28 | ||||
-rw-r--r-- | src/daemon/https/lgl/strverscmp.c | 10 | ||||
-rw-r--r-- | src/daemon/https/lgl/strverscmp.h | 2 | ||||
-rw-r--r-- | src/daemon/https/minitasn1/coding.c | 4 | ||||
-rw-r--r-- | src/daemon/https/minitasn1/parser_aux.c | 20 | ||||
-rw-r--r-- | src/daemon/https/tls/auth_rsa_export.c | 2 | ||||
-rw-r--r-- | 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 | |||
316 | for (i = 0; i < keylen; i++) | 316 | for (i = 0; i < keylen; i++) |
317 | sprintf (&keyMaterial[2 * i], "%02x", key[i] & 0xFF); | 317 | sprintf (&keyMaterial[2 * i], "%02x", key[i] & 0xFF); |
318 | 318 | ||
319 | rc = rijndaelMakeKey (&ctx->aesEncKey, RIJNDAEL_DIR_ENCRYPT, | 319 | rc = MHD_rijndaelMakeKey (&ctx->aesEncKey, RIJNDAEL_DIR_ENCRYPT, |
320 | keylen * 8, keyMaterial); | 320 | keylen * 8, keyMaterial); |
321 | if (rc < 0) | 321 | if (rc < 0) |
322 | return GC_INVALID_CIPHER; | 322 | return GC_INVALID_CIPHER; |
323 | 323 | ||
324 | rc = rijndaelMakeKey (&ctx->aesDecKey, RIJNDAEL_DIR_DECRYPT, | 324 | rc = MHD_rijndaelMakeKey (&ctx->aesDecKey, RIJNDAEL_DIR_DECRYPT, |
325 | keylen * 8, keyMaterial); | 325 | keylen * 8, keyMaterial); |
326 | if (rc < 0) | 326 | if (rc < 0) |
327 | return GC_INVALID_CIPHER; | 327 | return GC_INVALID_CIPHER; |
328 | 328 | ||
329 | rc = rijndaelCipherInit (&ctx->aesContext, RIJNDAEL_MODE_ECB, NULL); | 329 | rc = MHD_MHD_rijndaelCipherInit (&ctx->aesContext, RIJNDAEL_MODE_ECB, NULL); |
330 | if (rc < 0) | 330 | if (rc < 0) |
331 | return GC_INVALID_CIPHER; | 331 | return GC_INVALID_CIPHER; |
332 | } | 332 | } |
@@ -374,7 +374,7 @@ MHD_gc_cipher_setiv (MHD_gc_cipher_handle handle, size_t ivlen, const char *iv) | |||
374 | for (i = 0; i < ivlen; i++) | 374 | for (i = 0; i < ivlen; i++) |
375 | sprintf (&ivMaterial[2 * i], "%02x", iv[i] & 0xFF); | 375 | sprintf (&ivMaterial[2 * i], "%02x", iv[i] & 0xFF); |
376 | 376 | ||
377 | rc = rijndaelCipherInit (&ctx->aesContext, RIJNDAEL_MODE_CBC, | 377 | rc = MHD_MHD_rijndaelCipherInit (&ctx->aesContext, RIJNDAEL_MODE_CBC, |
378 | ivMaterial); | 378 | ivMaterial); |
379 | if (rc < 0) | 379 | if (rc < 0) |
380 | return GC_INVALID_CIPHER; | 380 | return GC_INVALID_CIPHER; |
@@ -449,7 +449,7 @@ MHD_gc_cipher_encrypt_inline (MHD_gc_cipher_handle handle, size_t len, char *dat | |||
449 | { | 449 | { |
450 | int nblocks; | 450 | int nblocks; |
451 | 451 | ||
452 | nblocks = rijndaelBlockEncrypt (&ctx->aesContext, &ctx->aesEncKey, | 452 | nblocks = MHD_rijndaelBlockEncrypt (&ctx->aesContext, &ctx->aesEncKey, |
453 | data, 8 * len, data); | 453 | data, 8 * len, data); |
454 | if (nblocks < 0) | 454 | if (nblocks < 0) |
455 | return GC_INVALID_CIPHER; | 455 | return GC_INVALID_CIPHER; |
@@ -521,7 +521,7 @@ MHD_gc_cipher_decrypt_inline (MHD_gc_cipher_handle handle, size_t len, char *dat | |||
521 | { | 521 | { |
522 | int nblocks; | 522 | int nblocks; |
523 | 523 | ||
524 | nblocks = rijndaelBlockDecrypt (&ctx->aesContext, &ctx->aesDecKey, | 524 | nblocks = MHD_rijndaelBlockDecrypt (&ctx->aesContext, &ctx->aesDecKey, |
525 | data, 8 * len, data); | 525 | data, 8 * len, data); |
526 | if (nblocks < 0) | 526 | if (nblocks < 0) |
527 | return GC_INVALID_CIPHER; | 527 | 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[] = { | |||
762 | * @return the number of rounds for the given cipher key size. | 762 | * @return the number of rounds for the given cipher key size. |
763 | */ | 763 | */ |
764 | int | 764 | int |
765 | rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], | 765 | MHD_rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], |
766 | const char cipherKey[], size_t keyBits) | 766 | const char cipherKey[], size_t keyBits) |
767 | { | 767 | { |
768 | size_t i = 0; | 768 | size_t i = 0; |
@@ -857,14 +857,14 @@ rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], | |||
857 | * @return the number of rounds for the given cipher key size. | 857 | * @return the number of rounds for the given cipher key size. |
858 | */ | 858 | */ |
859 | int | 859 | int |
860 | rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], | 860 | MHD_rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], |
861 | const char cipherKey[], size_t keyBits) | 861 | const char cipherKey[], size_t keyBits) |
862 | { | 862 | { |
863 | size_t Nr, i, j; | 863 | size_t Nr, i, j; |
864 | uint32_t temp; | 864 | uint32_t temp; |
865 | 865 | ||
866 | /* expand the cipher key: */ | 866 | /* expand the cipher key: */ |
867 | Nr = rijndaelKeySetupEnc (rk, cipherKey, keyBits); | 867 | Nr = MHD_rijndaelKeySetupEnc (rk, cipherKey, keyBits); |
868 | /* invert the order of the round keys: */ | 868 | /* invert the order of the round keys: */ |
869 | for (i = 0, j = 4 * Nr; i < j; i += 4, j -= 4) | 869 | for (i = 0, j = 4 * Nr; i < j; i += 4, j -= 4) |
870 | { | 870 | { |
@@ -911,7 +911,7 @@ rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], | |||
911 | } | 911 | } |
912 | 912 | ||
913 | void | 913 | void |
914 | rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, | 914 | MHD_rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, |
915 | const char pt[16], char ct[16]) | 915 | const char pt[16], char ct[16]) |
916 | { | 916 | { |
917 | uint32_t s0, s1, s2, s3, t0, t1, t2, t3; | 917 | 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, | |||
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | void | 1004 | void |
1005 | rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, | 1005 | MHD_rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, |
1006 | const char ct[16], char pt[16]) | 1006 | const char ct[16], char pt[16]) |
1007 | { | 1007 | { |
1008 | uint32_t s0, s1, s2, s3, t0, t1, t2, t3; | 1008 | 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 @@ | |||
55 | #define RIJNDAEL_MAXKB (256/8) | 55 | #define RIJNDAEL_MAXKB (256/8) |
56 | #define RIJNDAEL_MAXNR 14 | 56 | #define RIJNDAEL_MAXNR 14 |
57 | 57 | ||
58 | int rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], | 58 | int MHD_rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], |
59 | const char cipherKey[], size_t keyBits); | 59 | const char cipherKey[], size_t keyBits); |
60 | int rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], | 60 | int MHD_rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], |
61 | const char cipherKey[], size_t keyBits); | 61 | const char cipherKey[], size_t keyBits); |
62 | void rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, | 62 | void MHD_rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, |
63 | const char pt[16], char ct[16]); | 63 | const char pt[16], char ct[16]); |
64 | void rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, | 64 | void MHD_rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, |
65 | const char ct[16], char pt[16]); | 65 | const char ct[16], char pt[16]); |
66 | 66 | ||
67 | #endif /* __RIJNDAEL_ALG_FST_H */ | 67 | #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 @@ | |||
72 | #include <string.h> | 72 | #include <string.h> |
73 | 73 | ||
74 | rijndael_rc | 74 | rijndael_rc |
75 | rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, | 75 | MHD_rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, |
76 | size_t keyLen, const char *keyMaterial) | 76 | size_t keyLen, const char *keyMaterial) |
77 | { | 77 | { |
78 | size_t i; | 78 | size_t i; |
@@ -138,18 +138,18 @@ rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, | |||
138 | } | 138 | } |
139 | if (direction == RIJNDAEL_DIR_ENCRYPT) | 139 | if (direction == RIJNDAEL_DIR_ENCRYPT) |
140 | { | 140 | { |
141 | key->Nr = rijndaelKeySetupEnc (key->rk, cipherKey, keyLen); | 141 | key->Nr = MHD_rijndaelKeySetupEnc (key->rk, cipherKey, keyLen); |
142 | } | 142 | } |
143 | else | 143 | else |
144 | { | 144 | { |
145 | key->Nr = rijndaelKeySetupDec (key->rk, cipherKey, keyLen); | 145 | key->Nr = MHD_rijndaelKeySetupDec (key->rk, cipherKey, keyLen); |
146 | } | 146 | } |
147 | rijndaelKeySetupEnc (key->ek, cipherKey, keyLen); | 147 | MHD_rijndaelKeySetupEnc (key->ek, cipherKey, keyLen); |
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
150 | 150 | ||
151 | rijndael_rc | 151 | rijndael_rc |
152 | rijndaelCipherInit (rijndaelCipherInstance * cipher, rijndael_mode mode, | 152 | MHD_MHD_rijndaelCipherInit (rijndaelCipherInstance * cipher, rijndael_mode mode, |
153 | const char *IV) | 153 | const char *IV) |
154 | { | 154 | { |
155 | if ((mode == RIJNDAEL_MODE_ECB) || (mode == RIJNDAEL_MODE_CBC) | 155 | if ((mode == RIJNDAEL_MODE_ECB) || (mode == RIJNDAEL_MODE_CBC) |
@@ -199,7 +199,7 @@ rijndaelCipherInit (rijndaelCipherInstance * cipher, rijndael_mode mode, | |||
199 | } | 199 | } |
200 | 200 | ||
201 | int | 201 | int |
202 | rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, | 202 | MHD_rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, |
203 | const rijndaelKeyInstance * key, | 203 | const rijndaelKeyInstance * key, |
204 | const char *input, size_t inputLen, char *outBuffer) | 204 | const char *input, size_t inputLen, char *outBuffer) |
205 | { | 205 | { |
@@ -222,7 +222,7 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, | |||
222 | case RIJNDAEL_MODE_ECB: | 222 | case RIJNDAEL_MODE_ECB: |
223 | for (i = numBlocks; i > 0; i--) | 223 | for (i = numBlocks; i > 0; i--) |
224 | { | 224 | { |
225 | rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); | 225 | MHD_rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); |
226 | input += 16; | 226 | input += 16; |
227 | outBuffer += 16; | 227 | outBuffer += 16; |
228 | } | 228 | } |
@@ -240,7 +240,7 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, | |||
240 | ((uint32_t *) iv)[2]; | 240 | ((uint32_t *) iv)[2]; |
241 | ((uint32_t *) block)[3] = ((uint32_t *) input)[3] ^ | 241 | ((uint32_t *) block)[3] = ((uint32_t *) input)[3] ^ |
242 | ((uint32_t *) iv)[3]; | 242 | ((uint32_t *) iv)[3]; |
243 | rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); | 243 | MHD_rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); |
244 | memcpy (cipher->IV, outBuffer, 16); | 244 | memcpy (cipher->IV, outBuffer, 16); |
245 | input += 16; | 245 | input += 16; |
246 | outBuffer += 16; | 246 | outBuffer += 16; |
@@ -254,7 +254,7 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, | |||
254 | memcpy (outBuffer, input, 16); | 254 | memcpy (outBuffer, input, 16); |
255 | for (k = 0; k < 128; k++) | 255 | for (k = 0; k < 128; k++) |
256 | { | 256 | { |
257 | rijndaelEncrypt (key->ek, key->Nr, iv, block); | 257 | MHD_rijndaelEncrypt (key->ek, key->Nr, iv, block); |
258 | outBuffer[k >> 3] ^= (block[0] & 0x80U) >> (k & 7); | 258 | outBuffer[k >> 3] ^= (block[0] & 0x80U) >> (k & 7); |
259 | for (t = 0; t < 15; t++) | 259 | for (t = 0; t < 15; t++) |
260 | { | 260 | { |
@@ -276,7 +276,7 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, | |||
276 | } | 276 | } |
277 | 277 | ||
278 | int | 278 | int |
279 | rijndaelPadEncrypt (rijndaelCipherInstance * cipher, | 279 | MHD_rijndaelPadEncrypt (rijndaelCipherInstance * cipher, |
280 | const rijndaelKeyInstance * key, | 280 | const rijndaelKeyInstance * key, |
281 | const char *input, size_t inputOctets, char *outBuffer) | 281 | const char *input, size_t inputOctets, char *outBuffer) |
282 | { | 282 | { |
@@ -299,7 +299,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, | |||
299 | case RIJNDAEL_MODE_ECB: | 299 | case RIJNDAEL_MODE_ECB: |
300 | for (i = numBlocks; i > 0; i--) | 300 | for (i = numBlocks; i > 0; i--) |
301 | { | 301 | { |
302 | rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); | 302 | MHD_rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); |
303 | input += 16; | 303 | input += 16; |
304 | outBuffer += 16; | 304 | outBuffer += 16; |
305 | } | 305 | } |
@@ -307,7 +307,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, | |||
307 | assert (padLen > 0 && padLen <= 16); | 307 | assert (padLen > 0 && padLen <= 16); |
308 | memcpy (block, input, 16 - padLen); | 308 | memcpy (block, input, 16 - padLen); |
309 | memset (block + 16 - padLen, padLen, padLen); | 309 | memset (block + 16 - padLen, padLen, padLen); |
310 | rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); | 310 | MHD_rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); |
311 | break; | 311 | break; |
312 | 312 | ||
313 | case RIJNDAEL_MODE_CBC: | 313 | case RIJNDAEL_MODE_CBC: |
@@ -322,7 +322,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, | |||
322 | ((uint32_t *) iv)[2]; | 322 | ((uint32_t *) iv)[2]; |
323 | ((uint32_t *) block)[3] = ((uint32_t *) input)[3] ^ | 323 | ((uint32_t *) block)[3] = ((uint32_t *) input)[3] ^ |
324 | ((uint32_t *) iv)[3]; | 324 | ((uint32_t *) iv)[3]; |
325 | rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); | 325 | MHD_rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); |
326 | memcpy (cipher->IV, outBuffer, 16); | 326 | memcpy (cipher->IV, outBuffer, 16); |
327 | input += 16; | 327 | input += 16; |
328 | outBuffer += 16; | 328 | outBuffer += 16; |
@@ -337,7 +337,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, | |||
337 | { | 337 | { |
338 | block[i] = (char) padLen ^ iv[i]; | 338 | block[i] = (char) padLen ^ iv[i]; |
339 | } | 339 | } |
340 | rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); | 340 | MHD_rijndaelEncrypt (key->rk, key->Nr, block, outBuffer); |
341 | memcpy (cipher->IV, outBuffer, 16); | 341 | memcpy (cipher->IV, outBuffer, 16); |
342 | break; | 342 | break; |
343 | 343 | ||
@@ -349,7 +349,7 @@ rijndaelPadEncrypt (rijndaelCipherInstance * cipher, | |||
349 | } | 349 | } |
350 | 350 | ||
351 | int | 351 | int |
352 | rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, | 352 | MHD_rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, |
353 | const rijndaelKeyInstance * key, | 353 | const rijndaelKeyInstance * key, |
354 | const char *input, size_t inputLen, char *outBuffer) | 354 | const char *input, size_t inputLen, char *outBuffer) |
355 | { | 355 | { |
@@ -375,7 +375,7 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, | |||
375 | case RIJNDAEL_MODE_ECB: | 375 | case RIJNDAEL_MODE_ECB: |
376 | for (i = numBlocks; i > 0; i--) | 376 | for (i = numBlocks; i > 0; i--) |
377 | { | 377 | { |
378 | rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); | 378 | MHD_rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); |
379 | input += 16; | 379 | input += 16; |
380 | outBuffer += 16; | 380 | outBuffer += 16; |
381 | } | 381 | } |
@@ -385,7 +385,7 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, | |||
385 | iv = cipher->IV; | 385 | iv = cipher->IV; |
386 | for (i = numBlocks; i > 0; i--) | 386 | for (i = numBlocks; i > 0; i--) |
387 | { | 387 | { |
388 | rijndaelDecrypt (key->rk, key->Nr, input, block); | 388 | MHD_rijndaelDecrypt (key->rk, key->Nr, input, block); |
389 | ((uint32_t *) block)[0] ^= ((uint32_t *) iv)[0]; | 389 | ((uint32_t *) block)[0] ^= ((uint32_t *) iv)[0]; |
390 | ((uint32_t *) block)[1] ^= ((uint32_t *) iv)[1]; | 390 | ((uint32_t *) block)[1] ^= ((uint32_t *) iv)[1]; |
391 | ((uint32_t *) block)[2] ^= ((uint32_t *) iv)[2]; | 391 | ((uint32_t *) block)[2] ^= ((uint32_t *) iv)[2]; |
@@ -404,7 +404,7 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, | |||
404 | memcpy (outBuffer, input, 16); | 404 | memcpy (outBuffer, input, 16); |
405 | for (k = 0; k < 128; k++) | 405 | for (k = 0; k < 128; k++) |
406 | { | 406 | { |
407 | rijndaelEncrypt (key->ek, key->Nr, iv, block); | 407 | MHD_rijndaelEncrypt (key->ek, key->Nr, iv, block); |
408 | for (t = 0; t < 15; t++) | 408 | for (t = 0; t < 15; t++) |
409 | { | 409 | { |
410 | iv[t] = (iv[t] << 1) | (iv[t + 1] >> 7); | 410 | iv[t] = (iv[t] << 1) | (iv[t + 1] >> 7); |
@@ -425,7 +425,7 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, | |||
425 | } | 425 | } |
426 | 426 | ||
427 | int | 427 | int |
428 | rijndaelPadDecrypt (rijndaelCipherInstance * cipher, | 428 | MHD_rijndaelPadDecrypt (rijndaelCipherInstance * cipher, |
429 | const rijndaelKeyInstance * key, | 429 | const rijndaelKeyInstance * key, |
430 | const char *input, size_t inputOctets, char *outBuffer) | 430 | const char *input, size_t inputOctets, char *outBuffer) |
431 | { | 431 | { |
@@ -453,12 +453,12 @@ rijndaelPadDecrypt (rijndaelCipherInstance * cipher, | |||
453 | /* all blocks but last */ | 453 | /* all blocks but last */ |
454 | for (i = numBlocks - 1; i > 0; i--) | 454 | for (i = numBlocks - 1; i > 0; i--) |
455 | { | 455 | { |
456 | rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); | 456 | MHD_rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); |
457 | input += 16; | 457 | input += 16; |
458 | outBuffer += 16; | 458 | outBuffer += 16; |
459 | } | 459 | } |
460 | /* last block */ | 460 | /* last block */ |
461 | rijndaelDecrypt (key->rk, key->Nr, input, block); | 461 | MHD_rijndaelDecrypt (key->rk, key->Nr, input, block); |
462 | padLen = block[15]; | 462 | padLen = block[15]; |
463 | if (padLen >= 16) | 463 | if (padLen >= 16) |
464 | { | 464 | { |
@@ -478,7 +478,7 @@ rijndaelPadDecrypt (rijndaelCipherInstance * cipher, | |||
478 | /* all blocks but last */ | 478 | /* all blocks but last */ |
479 | for (i = numBlocks - 1; i > 0; i--) | 479 | for (i = numBlocks - 1; i > 0; i--) |
480 | { | 480 | { |
481 | rijndaelDecrypt (key->rk, key->Nr, input, block); | 481 | MHD_rijndaelDecrypt (key->rk, key->Nr, input, block); |
482 | ((uint32_t *) block)[0] ^= ((uint32_t *) cipher->IV)[0]; | 482 | ((uint32_t *) block)[0] ^= ((uint32_t *) cipher->IV)[0]; |
483 | ((uint32_t *) block)[1] ^= ((uint32_t *) cipher->IV)[1]; | 483 | ((uint32_t *) block)[1] ^= ((uint32_t *) cipher->IV)[1]; |
484 | ((uint32_t *) block)[2] ^= ((uint32_t *) cipher->IV)[2]; | 484 | ((uint32_t *) block)[2] ^= ((uint32_t *) cipher->IV)[2]; |
@@ -489,7 +489,7 @@ rijndaelPadDecrypt (rijndaelCipherInstance * cipher, | |||
489 | outBuffer += 16; | 489 | outBuffer += 16; |
490 | } | 490 | } |
491 | /* last block */ | 491 | /* last block */ |
492 | rijndaelDecrypt (key->rk, key->Nr, input, block); | 492 | MHD_rijndaelDecrypt (key->rk, key->Nr, input, block); |
493 | ((uint32_t *) block)[0] ^= ((uint32_t *) cipher->IV)[0]; | 493 | ((uint32_t *) block)[0] ^= ((uint32_t *) cipher->IV)[0]; |
494 | ((uint32_t *) block)[1] ^= ((uint32_t *) cipher->IV)[1]; | 494 | ((uint32_t *) block)[1] ^= ((uint32_t *) cipher->IV)[1]; |
495 | ((uint32_t *) block)[2] ^= ((uint32_t *) cipher->IV)[2]; | 495 | ((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 | |||
137 | from KEYMATERIAL, a hex string, of KEYLEN size. KEYLEN should be | 137 | from KEYMATERIAL, a hex string, of KEYLEN size. KEYLEN should be |
138 | 128, 192 or 256. Returns 0 on success, or an error code. */ | 138 | 128, 192 or 256. Returns 0 on success, or an error code. */ |
139 | extern rijndael_rc | 139 | extern rijndael_rc |
140 | rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, | 140 | MHD_rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, |
141 | size_t keyLen, const char *keyMaterial); | 141 | size_t keyLen, const char *keyMaterial); |
142 | 142 | ||
143 | /* Initialize cipher state CIPHER for encryption MODE (e.g., | 143 | /* Initialize cipher state CIPHER for encryption MODE (e.g., |
@@ -145,18 +145,18 @@ rijndaelMakeKey (rijndaelKeyInstance * key, rijndael_direction direction, | |||
145 | 2*RIJNDAEL_MAX_IV_SIZE length. IV may be NULL for modes that do | 145 | 2*RIJNDAEL_MAX_IV_SIZE length. IV may be NULL for modes that do |
146 | not need an IV (i.e., RIJNDAEL_MODE_ECB). */ | 146 | not need an IV (i.e., RIJNDAEL_MODE_ECB). */ |
147 | extern rijndael_rc | 147 | extern rijndael_rc |
148 | rijndaelCipherInit (rijndaelCipherInstance * cipher, | 148 | MHD_MHD_rijndaelCipherInit (rijndaelCipherInstance * cipher, |
149 | rijndael_mode mode, const char *IV); | 149 | rijndael_mode mode, const char *IV); |
150 | 150 | ||
151 | /* Encrypt data in INPUT, of INPUTLEN/8 bytes length, placing the | 151 | /* Encrypt data in INPUT, of INPUTLEN/8 bytes length, placing the |
152 | output in the pre-allocated OUTBUFFER which must hold at least | 152 | output in the pre-allocated OUTBUFFER which must hold at least |
153 | INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be | 153 | INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be |
154 | initialized with rijndaelCipherInit before calling this function. | 154 | initialized with MHD_MHD_rijndaelCipherInit before calling this function. |
155 | The encryption KEY must be initialized with rijndaelMakeKey before | 155 | The encryption KEY must be initialized with MHD_rijndaelMakeKey before |
156 | calling this function. Return the number of bits written, or a | 156 | calling this function. Return the number of bits written, or a |
157 | negative rijndael_rc error code. */ | 157 | negative rijndael_rc error code. */ |
158 | extern int | 158 | extern int |
159 | rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, | 159 | MHD_rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, |
160 | const rijndaelKeyInstance * key, | 160 | const rijndaelKeyInstance * key, |
161 | const char *input, size_t inputLen, char *outBuffer); | 161 | const char *input, size_t inputLen, char *outBuffer); |
162 | 162 | ||
@@ -165,24 +165,24 @@ rijndaelBlockEncrypt (rijndaelCipherInstance * cipher, | |||
165 | INPUTOCTETS aligned to the next block size boundary. | 165 | INPUTOCTETS aligned to the next block size boundary. |
166 | Ciphertext-Stealing as described in RFC 2040 is used to encrypt | 166 | Ciphertext-Stealing as described in RFC 2040 is used to encrypt |
167 | partial blocks. The CIPHER is used as state, and must be | 167 | partial blocks. The CIPHER is used as state, and must be |
168 | initialized with rijndaelCipherInit before calling this function. | 168 | initialized with MHD_MHD_rijndaelCipherInit before calling this function. |
169 | The encryption KEY must be initialized with rijndaelMakeKey before | 169 | The encryption KEY must be initialized with MHD_rijndaelMakeKey before |
170 | calling this function. Return the number of bits written, or a | 170 | calling this function. Return the number of bits written, or a |
171 | negative rijndael_rc error code. */ | 171 | negative rijndael_rc error code. */ |
172 | extern int | 172 | extern int |
173 | rijndaelPadEncrypt (rijndaelCipherInstance * cipher, | 173 | MHD_rijndaelPadEncrypt (rijndaelCipherInstance * cipher, |
174 | const rijndaelKeyInstance * key, | 174 | const rijndaelKeyInstance * key, |
175 | const char *input, size_t inputOctets, char *outBuffer); | 175 | const char *input, size_t inputOctets, char *outBuffer); |
176 | 176 | ||
177 | /* Decrypt data in INPUT, of INPUTLEN/8 bytes length, placing the | 177 | /* Decrypt data in INPUT, of INPUTLEN/8 bytes length, placing the |
178 | output in the pre-allocated OUTBUFFER which must hold at least | 178 | output in the pre-allocated OUTBUFFER which must hold at least |
179 | INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be | 179 | INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be |
180 | initialized with rijndaelCipherInit before calling this function. | 180 | initialized with MHD_MHD_rijndaelCipherInit before calling this function. |
181 | The encryption KEY must be initialized with rijndaelMakeKey before | 181 | The encryption KEY must be initialized with MHD_rijndaelMakeKey before |
182 | calling this function. Return the number of bits written, or a | 182 | calling this function. Return the number of bits written, or a |
183 | negative rijndael_rc error code. */ | 183 | negative rijndael_rc error code. */ |
184 | extern int | 184 | extern int |
185 | rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, | 185 | MHD_rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, |
186 | const rijndaelKeyInstance * key, | 186 | const rijndaelKeyInstance * key, |
187 | const char *input, size_t inputLen, char *outBuffer); | 187 | const char *input, size_t inputLen, char *outBuffer); |
188 | 188 | ||
@@ -191,12 +191,12 @@ rijndaelBlockDecrypt (rijndaelCipherInstance * cipher, | |||
191 | INPUTOCTETS aligned to the next block size boundary. | 191 | INPUTOCTETS aligned to the next block size boundary. |
192 | Ciphertext-Stealing as described in RFC 2040 is used to encrypt | 192 | Ciphertext-Stealing as described in RFC 2040 is used to encrypt |
193 | partial blocks. The CIPHER is used as state, and must be | 193 | partial blocks. The CIPHER is used as state, and must be |
194 | initialized with rijndaelCipherInit before calling this function. | 194 | initialized with MHD_MHD_rijndaelCipherInit before calling this function. |
195 | The encryption KEY must be initialized with rijndaelMakeKey before | 195 | The encryption KEY must be initialized with MHD_rijndaelMakeKey before |
196 | calling this function. Return the number of bits written, or a | 196 | calling this function. Return the number of bits written, or a |
197 | negative rijndael_rc error code. */ | 197 | negative rijndael_rc error code. */ |
198 | extern int | 198 | extern int |
199 | rijndaelPadDecrypt (rijndaelCipherInstance * cipher, | 199 | MHD_rijndaelPadDecrypt (rijndaelCipherInstance * cipher, |
200 | const rijndaelKeyInstance * key, | 200 | const rijndaelKeyInstance * key, |
201 | const char *input, size_t inputOctets, char *outBuffer); | 201 | const char *input, size_t inputOctets, char *outBuffer); |
202 | 202 | ||
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 @@ | |||
45 | of `digit' even when the host does not conform to POSIX. */ | 45 | of `digit' even when the host does not conform to POSIX. */ |
46 | #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) | 46 | #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) |
47 | 47 | ||
48 | #undef __strverscmp | 48 | #undef __MHD_strverscmp |
49 | #undef strverscmp | 49 | #undef MHD_strverscmp |
50 | 50 | ||
51 | #ifndef weak_alias | 51 | #ifndef weak_alias |
52 | # define __strverscmp strverscmp | 52 | # define __MHD_strverscmp MHD_strverscmp |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | /* Compare S1 and S2 as strings holding indices/version numbers, | 55 | /* Compare S1 and S2 as strings holding indices/version numbers, |
@@ -58,7 +58,7 @@ | |||
58 | */ | 58 | */ |
59 | 59 | ||
60 | int | 60 | int |
61 | __strverscmp (const char *s1, const char *s2) | 61 | __MHD_strverscmp (const char *s1, const char *s2) |
62 | { | 62 | { |
63 | const unsigned char *p1 = (const unsigned char *) s1; | 63 | const unsigned char *p1 = (const unsigned char *) s1; |
64 | const unsigned char *p2 = (const unsigned char *) s2; | 64 | const unsigned char *p2 = (const unsigned char *) s2; |
@@ -126,5 +126,5 @@ __strverscmp (const char *s1, const char *s2) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | #ifdef weak_alias | 128 | #ifdef weak_alias |
129 | weak_alias (__strverscmp, strverscmp) | 129 | weak_alias (__MHD_strverscmp, MHD_strverscmp) |
130 | #endif | 130 | #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 @@ | |||
19 | #ifndef STRVERSCMP_H_ | 19 | #ifndef STRVERSCMP_H_ |
20 | # define STRVERSCMP_H_ | 20 | # define STRVERSCMP_H_ |
21 | 21 | ||
22 | int strverscmp (const char *, const char *); | 22 | int MHD_strverscmp (const char *, const char *); |
23 | 23 | ||
24 | #endif /* not STRVERSCMP_H_ */ | 24 | #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) | |||
321 | } | 321 | } |
322 | 322 | ||
323 | 323 | ||
324 | const char bit_mask[] = { 0xFF, 0xFE, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0x80 }; | 324 | const char MHD_bit_mask[] = { 0xFF, 0xFE, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0x80 }; |
325 | 325 | ||
326 | /** | 326 | /** |
327 | * MHD__asn1_bit_der: | 327 | * MHD__asn1_bit_der: |
@@ -351,7 +351,7 @@ MHD__asn1_bit_der (const unsigned char *str, int bit_len, | |||
351 | MHD__asn1_length_der (len_byte + 1, der, &len_len); | 351 | MHD__asn1_length_der (len_byte + 1, der, &len_len); |
352 | der[len_len] = len_pad; | 352 | der[len_len] = len_pad; |
353 | memcpy (der + len_len + 1, str, len_byte); | 353 | memcpy (der + len_len + 1, str, len_byte); |
354 | der[len_len + len_byte] &= bit_mask[len_pad]; | 354 | der[len_len + len_byte] &= MHD_bit_mask[len_pad]; |
355 | *der_len = len_byte + len_len + 1; | 355 | *der_len = len_byte + len_len + 1; |
356 | } | 356 | } |
357 | 357 | ||
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 | |||
42 | 42 | ||
43 | 43 | ||
44 | /* Pointer to the first element of the list */ | 44 | /* Pointer to the first element of the list */ |
45 | list_type *firstElement = NULL; | 45 | list_type *MHD_firstElement = NULL; |
46 | 46 | ||
47 | /******************************************************/ | 47 | /******************************************************/ |
48 | /* Function : MHD__asn1_add_node */ | 48 | /* Function : MHD__asn1_add_node */ |
49 | /* Description: creates a new NODE_ASN element and */ | 49 | /* Description: creates a new NODE_ASN element and */ |
50 | /* puts it in the list pointed by firstElement. */ | 50 | /* puts it in the list pointed by MHD_firstElement. */ |
51 | /* Parameters: */ | 51 | /* Parameters: */ |
52 | /* type: type of the new element (see TYPE_ */ | 52 | /* type: type of the new element (see TYPE_ */ |
53 | /* and CONST_ constants). */ | 53 | /* and CONST_ constants). */ |
@@ -71,8 +71,8 @@ MHD__asn1_add_node (unsigned int type) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | listElement->node = punt; | 73 | listElement->node = punt; |
74 | listElement->next = firstElement; | 74 | listElement->next = MHD_firstElement; |
75 | firstElement = listElement; | 75 | MHD_firstElement = listElement; |
76 | 76 | ||
77 | punt->type = type; | 77 | punt->type = type; |
78 | 78 | ||
@@ -439,10 +439,10 @@ MHD__asn1_delete_list (void) | |||
439 | { | 439 | { |
440 | list_type *listElement; | 440 | list_type *listElement; |
441 | 441 | ||
442 | while (firstElement) | 442 | while (MHD_firstElement) |
443 | { | 443 | { |
444 | listElement = firstElement; | 444 | listElement = MHD_firstElement; |
445 | firstElement = firstElement->next; | 445 | MHD_firstElement = MHD_firstElement->next; |
446 | MHD__asn1_free (listElement); | 446 | MHD__asn1_free (listElement); |
447 | } | 447 | } |
448 | } | 448 | } |
@@ -457,10 +457,10 @@ MHD__asn1_delete_list_and_nodes (void) | |||
457 | { | 457 | { |
458 | list_type *listElement; | 458 | list_type *listElement; |
459 | 459 | ||
460 | while (firstElement) | 460 | while (MHD_firstElement) |
461 | { | 461 | { |
462 | listElement = firstElement; | 462 | listElement = MHD_firstElement; |
463 | firstElement = firstElement->next; | 463 | MHD_firstElement = MHD_firstElement->next; |
464 | MHD__asn1_remove_node (listElement->node); | 464 | MHD__asn1_remove_node (listElement->node); |
465 | MHD__asn1_free (listElement); | 465 | MHD__asn1_free (listElement); |
466 | } | 466 | } |
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); | |||
48 | static int gen_rsa_export_server_kx (MHD_gtls_session_t, opaque **); | 48 | static int gen_rsa_export_server_kx (MHD_gtls_session_t, opaque **); |
49 | static int proc_rsa_export_server_kx (MHD_gtls_session_t, opaque *, size_t); | 49 | static int proc_rsa_export_server_kx (MHD_gtls_session_t, opaque *, size_t); |
50 | 50 | ||
51 | const MHD_gtls_mod_auth_st rsa_export_auth_struct = { | 51 | const MHD_gtls_mod_auth_st MHD_rsa_export_auth_struct = { |
52 | "RSA EXPORT", | 52 | "RSA EXPORT", |
53 | MHD_gtls_gen_cert_server_certificate, | 53 | MHD_gtls_gen_cert_server_certificate, |
54 | MHD_gtls_gen_cert_client_certificate, | 54 | 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 | |||
386 | 386 | ||
387 | /* Key Exchange Section */ | 387 | /* Key Exchange Section */ |
388 | extern MHD_gtls_mod_auth_st MHD_gtls_rsa_auth_struct; | 388 | extern MHD_gtls_mod_auth_st MHD_gtls_rsa_auth_struct; |
389 | extern MHD_gtls_mod_auth_st rsa_export_auth_struct; | 389 | extern MHD_gtls_mod_auth_st MHD_rsa_export_auth_struct; |
390 | extern MHD_gtls_mod_auth_st MHD_gtls_dhe_rsa_auth_struct; | 390 | extern MHD_gtls_mod_auth_st MHD_gtls_dhe_rsa_auth_struct; |
391 | extern MHD_gtls_mod_auth_st MHD_gtls_dhe_dss_auth_struct; | 391 | extern MHD_gtls_mod_auth_st MHD_gtls_dhe_dss_auth_struct; |
392 | extern MHD_gtls_mod_auth_st MHD_gtls_anon_auth_struct; | 392 | 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[] = { | |||
416 | 0}, | 416 | 0}, |
417 | {"RSA-EXPORT", | 417 | {"RSA-EXPORT", |
418 | MHD_GNUTLS_KX_RSA_EXPORT, | 418 | MHD_GNUTLS_KX_RSA_EXPORT, |
419 | &rsa_export_auth_struct, | 419 | &MHD_rsa_export_auth_struct, |
420 | 0, | 420 | 0, |
421 | 1 /* needs RSA params */ }, | 421 | 1 /* needs RSA params */ }, |
422 | {"DHE-RSA", | 422 | {"DHE-RSA", |