aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/lgl/des.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/lgl/des.c')
-rw-r--r--src/daemon/https/lgl/des.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/daemon/https/lgl/des.c b/src/daemon/https/lgl/des.c
index 7bc4c4d0..dbe5f3c6 100644
--- a/src/daemon/https/lgl/des.c
+++ b/src/daemon/https/lgl/des.c
@@ -543,7 +543,8 @@ MHD_gl_des_makekey (MHD_gl_des_ctx * ctx, const char *key, size_t keylen)
543} 543}
544 544
545void 545void
546MHD_gl_des_ecb_crypt (MHD_gl_des_ctx * ctx, const char *_from, char *_to, int mode) 546MHD_gl_des_ecb_crypt (MHD_gl_des_ctx * ctx, const char *_from, char *_to,
547 int mode)
547{ 548{
548 const unsigned char *from = (const unsigned char *) _from; 549 const unsigned char *from = (const unsigned char *) _from;
549 unsigned char *to = (unsigned char *) _to; 550 unsigned char *to = (unsigned char *) _to;
@@ -565,7 +566,8 @@ READ_64BIT_DATA (from, left, right)
565 FINAL_PERMUTATION (right, work, left) WRITE_64BIT_DATA (to, right, left)} 566 FINAL_PERMUTATION (right, work, left) WRITE_64BIT_DATA (to, right, left)}
566 567
567void 568void
568MHD_gl_3des_set2keys (MHD_gl_3des_ctx * ctx, const char *key1, const char *key2) 569MHD_gl_3des_set2keys (MHD_gl_3des_ctx * ctx, const char *key1,
570 const char *key2)
569{ 571{
570 int i; 572 int i;
571 573
@@ -590,7 +592,7 @@ MHD_gl_3des_set2keys (MHD_gl_3des_ctx * ctx, const char *key1, const char *key2)
590 592
591void 593void
592MHD_gl_3des_set3keys (MHD_gl_3des_ctx * ctx, const char *key1, 594MHD_gl_3des_set3keys (MHD_gl_3des_ctx * ctx, const char *key1,
593 const char *key2, const char *key3) 595 const char *key2, const char *key3)
594{ 596{
595 int i; 597 int i;
596 598
@@ -612,7 +614,8 @@ MHD_gl_3des_set3keys (MHD_gl_3des_ctx * ctx, const char *key1,
612} 614}
613 615
614void 616void
615MHD_gl_3des_ecb_crypt (MHD_gl_3des_ctx * ctx, const char *_from, char *_to, int mode) 617MHD_gl_3des_ecb_crypt (MHD_gl_3des_ctx * ctx, const char *_from, char *_to,
618 int mode)
616{ 619{
617 const unsigned char *from = (const unsigned char *) _from; 620 const unsigned char *from = (const unsigned char *) _from;
618 unsigned char *to = (unsigned char *) _to; 621 unsigned char *to = (unsigned char *) _to;
@@ -658,5 +661,6 @@ MHD_gl_3des_makekey (MHD_gl_3des_ctx * ctx, const char *key, size_t keylen)
658 MHD_gl_3des_set3keys (ctx, key, key + 8, key + 16); 661 MHD_gl_3des_set3keys (ctx, key, key + 8, key + 16);
659 662
660 return !(MHD_gl_des_is_weak_key (key) 663 return !(MHD_gl_des_is_weak_key (key)
661 || MHD_gl_des_is_weak_key (key + 8) || MHD_gl_des_is_weak_key (key + 16)); 664 || MHD_gl_des_is_weak_key (key + 8)
665 || MHD_gl_des_is_weak_key (key + 16));
662} 666}