#ifndef SIGNET_TIMESTAMP_H
#define SIGNET_TIMESTAMP_H

#include <stddef.h>

#define TIMESTAMP_MAX_REPLY 65536

struct timestamp_reply {
	unsigned char data[TIMESTAMP_MAX_REPLY];
	size_t size;
	char at[32];
	const char *error;
};

/* HTTPS, SHA-256 imprint, fresh nonce, explicit TSA trust; no document upload. */
int timestamp_fetch(const char *url, const char *ca_file, const char *tls_ca_file,
    const char *sha256, long timeout_ms, struct timestamp_reply *reply);

#endif
