summaryrefslogtreecommitdiff
path: root/tools/base64.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/base64.c')
-rw-r--r--tools/base64.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/base64.c b/tools/base64.c
index 9f31def..e131198 100644
--- a/tools/base64.c
+++ b/tools/base64.c
@@ -7,7 +7,6 @@
7#include <openssl/bio.h> 7#include <openssl/bio.h>
8#include <openssl/evp.h> 8#include <openssl/evp.h>
9 9
10#include <fido.h>
11#include <limits.h> 10#include <limits.h>
12#include <stdint.h> 11#include <stdint.h>
13#include <string.h> 12#include <string.h>
@@ -62,7 +61,7 @@ fail:
62} 61}
63 62
64int 63int
65base64_decode(char *in, void **ptr, size_t *len) 64base64_decode(const char *in, void **ptr, size_t *len)
66{ 65{
67 BIO *bio_mem = NULL; 66 BIO *bio_mem = NULL;
68 BIO *bio_b64 = NULL; 67 BIO *bio_b64 = NULL;
@@ -78,7 +77,7 @@ base64_decode(char *in, void **ptr, size_t *len)
78 77
79 if ((bio_b64 = BIO_new(BIO_f_base64())) == NULL) 78 if ((bio_b64 = BIO_new(BIO_f_base64())) == NULL)
80 goto fail; 79 goto fail;
81 if ((bio_mem = BIO_new_mem_buf((void *)in, -1)) == NULL) 80 if ((bio_mem = BIO_new_mem_buf((const void *)in, -1)) == NULL)
82 goto fail; 81 goto fail;
83 82
84 BIO_set_flags(bio_b64, BIO_FLAGS_BASE64_NO_NL); 83 BIO_set_flags(bio_b64, BIO_FLAGS_BASE64_NO_NL);