#include <libpq-fe.h>
#include <yubikey.h>
#include <time.h>
-#include <glib.h>
#include <gcrypt.h>
#include "util.h"
#include <arpa/inet.h>
return ts;
}
-gchar *sign_request(char *key, size_t key_len, char *info, char *status,
+char *sign_request(char *key, size_t key_len, char *info, char *status,
char *timestamp) {
char *line;
- gchar *ret;
+ char *ret;
gcry_md_hd_t hd;
if (info != NULL) {
asprintf(&line, "info=%s&status=%s×tamp=%s", info,
gcry_md_setkey(hd, key, key_len);
gcry_md_write(hd, line, strlen(line));
gcry_md_final(hd);
- ret = g_base64_encode(gcry_md_read(hd, 0), gcry_md_get_algo_dlen(GCRY_MD_SHA1));
+ ret = ysc_b64_encode((char *) gcry_md_read(hd, 0),
+ gcry_md_get_algo_dlen(GCRY_MD_SHA1));
gcry_md_close(hd);
free(line);
return ret;