aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/x509/pkcs12_encr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/x509/pkcs12_encr.c')
-rw-r--r--src/daemon/https/x509/pkcs12_encr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/daemon/https/x509/pkcs12_encr.c b/src/daemon/https/x509/pkcs12_encr.c
index 0cfb59e5..e534489c 100644
--- a/src/daemon/https/x509/pkcs12_encr.c
+++ b/src/daemon/https/x509/pkcs12_encr.c
@@ -55,9 +55,9 @@ MHD_pkcs12_check_pass (const char *pass, size_t plen)
55 */ 55 */
56int 56int
57MHD_pkcs12_string_to_key (unsigned int id, const opaque * salt, 57MHD_pkcs12_string_to_key (unsigned int id, const opaque * salt,
58 unsigned int salt_size, unsigned int iter, 58 unsigned int salt_size, unsigned int iter,
59 const char *pw, unsigned int req_keylen, 59 const char *pw, unsigned int req_keylen,
60 opaque * keybuf) 60 opaque * keybuf)
61{ 61{
62 int rc; 62 int rc;
63 unsigned int i, j; 63 unsigned int i, j;
@@ -115,13 +115,13 @@ MHD_pkcs12_string_to_key (unsigned int id, const opaque * salt,
115 for (i = 0; i < 64; i++) 115 for (i = 0; i < 64; i++)
116 { 116 {
117 unsigned char lid = id & 0xFF; 117 unsigned char lid = id & 0xFF;
118 MHD_gc_hash_write (md, 1, (const char*) &lid); 118 MHD_gc_hash_write (md, 1, (const char *) &lid);
119 } 119 }
120 MHD_gc_hash_write (md, pw ? 128 : 64, (const char*) buf_i); 120 MHD_gc_hash_write (md, pw ? 128 : 64, (const char *) buf_i);
121 memcpy (hash, MHD_gc_hash_read (md), 20); 121 memcpy (hash, MHD_gc_hash_read (md), 20);
122 MHD_gc_hash_close (md); 122 MHD_gc_hash_close (md);
123 for (i = 1; i < iter; i++) 123 for (i = 1; i < iter; i++)
124 MHD_gc_hash_buffer (GC_SHA1, hash, 20, (char*) hash); 124 MHD_gc_hash_buffer (GC_SHA1, hash, 20, (char *) hash);
125 for (i = 0; i < 20 && cur_keylen < req_keylen; i++) 125 for (i = 0; i < 20 && cur_keylen < req_keylen; i++)
126 keybuf[cur_keylen++] = hash[i]; 126 keybuf[cur_keylen++] = hash[i];
127 if (cur_keylen == req_keylen) 127 if (cur_keylen == req_keylen)