diff options
Diffstat (limited to 'src/daemon/https/tls/x509_b64.c')
-rw-r--r-- | src/daemon/https/tls/x509_b64.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/daemon/https/tls/x509_b64.c b/src/daemon/https/tls/x509_b64.c index abe3fb40..152f7409 100644 --- a/src/daemon/https/tls/x509_b64.c +++ b/src/daemon/https/tls/x509_b64.c | |||
@@ -154,7 +154,7 @@ decode (uint8_t * result, const opaque * data) | |||
154 | */ | 154 | */ |
155 | int | 155 | int |
156 | MHD__gnutls_fbase64_encode (const char *msg, const uint8_t * data, | 156 | MHD__gnutls_fbase64_encode (const char *msg, const uint8_t * data, |
157 | int data_size, uint8_t ** result) | 157 | int data_size, uint8_t ** result) |
158 | { | 158 | { |
159 | int i, ret, tmp, j; | 159 | int i, ret, tmp, j; |
160 | char tmpres[4]; | 160 | char tmpres[4]; |
@@ -173,16 +173,16 @@ MHD__gnutls_fbase64_encode (const char *msg, const uint8_t * data, | |||
173 | memset (bottom, 0, sizeof (bottom)); | 173 | memset (bottom, 0, sizeof (bottom)); |
174 | memset (top, 0, sizeof (top)); | 174 | memset (top, 0, sizeof (top)); |
175 | 175 | ||
176 | strcat ((char*) top, "-----BEGIN "); /* Flawfinder: ignore */ | 176 | strcat ((char *) top, "-----BEGIN "); /* Flawfinder: ignore */ |
177 | strcat ((char*)top, msg); /* Flawfinder: ignore */ | 177 | strcat ((char *) top, msg); /* Flawfinder: ignore */ |
178 | strcat ((char*)top, "-----"); /* Flawfinder: ignore */ | 178 | strcat ((char *) top, "-----"); /* Flawfinder: ignore */ |
179 | 179 | ||
180 | strcat ((char*)bottom, "\n-----END "); /* Flawfinder: ignore */ | 180 | strcat ((char *) bottom, "\n-----END "); /* Flawfinder: ignore */ |
181 | strcat ((char*)bottom, msg); /* Flawfinder: ignore */ | 181 | strcat ((char *) bottom, msg); /* Flawfinder: ignore */ |
182 | strcat ((char*)bottom, "-----\n"); /* Flawfinder: ignore */ | 182 | strcat ((char *) bottom, "-----\n"); /* Flawfinder: ignore */ |
183 | 183 | ||
184 | top_len = strlen ((char*)top); | 184 | top_len = strlen ((char *) top); |
185 | bottom_len = strlen ((char*)bottom); | 185 | bottom_len = strlen ((char *) bottom); |
186 | 186 | ||
187 | ret = B64FSIZE (msglen, data_size); | 187 | ret = B64FSIZE (msglen, data_size); |
188 | 188 | ||
@@ -197,7 +197,7 @@ MHD__gnutls_fbase64_encode (const char *msg, const uint8_t * data, | |||
197 | INCR (bytes, top_len); | 197 | INCR (bytes, top_len); |
198 | pos = top_len; | 198 | pos = top_len; |
199 | 199 | ||
200 | strcpy ((char*)*result,(char*) top); /* Flawfinder: ignore */ | 200 | strcpy ((char *) *result, (char *) top); /* Flawfinder: ignore */ |
201 | 201 | ||
202 | for (i = j = 0; i < data_size; i += 3, j += 4) | 202 | for (i = j = 0; i < data_size; i += 3, j += 4) |
203 | { | 203 | { |
@@ -260,7 +260,7 @@ MHD__gnutls_fbase64_encode (const char *msg, const uint8_t * data, | |||
260 | */ | 260 | */ |
261 | int | 261 | int |
262 | MHD__gnutls_base64_decode (const uint8_t * data, size_t data_size, | 262 | MHD__gnutls_base64_decode (const uint8_t * data, size_t data_size, |
263 | uint8_t ** result) | 263 | uint8_t ** result) |
264 | { | 264 | { |
265 | unsigned int i, j; | 265 | unsigned int i, j; |
266 | int ret, tmp, est; | 266 | int ret, tmp, est; |
@@ -318,7 +318,7 @@ cpydata (const uint8_t * data, int data_size, uint8_t ** result) | |||
318 | #define ENDSTR2 "-----\r" | 318 | #define ENDSTR2 "-----\r" |
319 | int | 319 | int |
320 | MHD__gnutls_fbase64_decode (const char *header, const opaque * data, | 320 | MHD__gnutls_fbase64_decode (const char *header, const opaque * data, |
321 | size_t data_size, uint8_t ** result) | 321 | size_t data_size, uint8_t ** result) |
322 | { | 322 | { |
323 | int ret; | 323 | int ret; |
324 | static const char top[] = "-----BEGIN "; | 324 | static const char top[] = "-----BEGIN "; |
@@ -411,4 +411,3 @@ MHD__gnutls_fbase64_decode (const char *header, const opaque * data, | |||
411 | 411 | ||
412 | return ret; | 412 | return ret; |
413 | } | 413 | } |
414 | |||