diff --git a/contrib/sigp/Makefile b/contrib/sigp/Makefile new file mode 100644 index 000000000..65797fcf4 --- /dev/null +++ b/contrib/sigp/Makefile @@ -0,0 +1,21 @@ +FILES = taler_signatures.h + +gana = ../gana + + +all: check $(FILES) +check: registry.rec + recfix --check registry.rec +registry.rec: + ln -s $(gana)/gnunet-signatures/registry.rec +distclean: + rm -f *.tmp +clean: + rm -f $(FILES) *.tmp registry.rec +taler_signatures.h.tmp: registry.rec h.template + $(gana)/format.sh h.template 'Package = "GNU Taler"' < registry.rec > $@ + +taler_signatures.h: h.header taler_signatures.h.tmp h.footer + cat h.header taler_signatures.h.tmp h.footer > $@ + +.PHONY: check clean distclean diff --git a/contrib/sigp/README b/contrib/sigp/README new file mode 100644 index 000000000..34e479ea1 --- /dev/null +++ b/contrib/sigp/README @@ -0,0 +1,3 @@ +This directory contains bootstrap code to extract info from the +Signature Purposes database (registry) and format it in various ways. +It is a peer of ${top_srcdir}/contrib/gana/ (q.v.). diff --git a/contrib/sigp/h.footer b/contrib/sigp/h.footer new file mode 100644 index 000000000..c0fbf697b --- /dev/null +++ b/contrib/sigp/h.footer @@ -0,0 +1,3 @@ + + +#endif diff --git a/contrib/sigp/h.header b/contrib/sigp/h.header new file mode 100644 index 000000000..a0e3c6ae3 --- /dev/null +++ b/contrib/sigp/h.header @@ -0,0 +1,32 @@ +/* + This file is part of TALER + Copyright (C) 2014-2022 Taler Systems SA + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, see +*/ +/** + * @file taler_signatures.h + * @brief message formats and signature constants used to define + * the binary formats of signatures in Taler + * @author Florian Dold + * @author Benedikt Mueller + * + * This file should define the constants and C structs that one needs + * to know to implement Taler clients (wallets or merchants or + * auditor) that need to produce or verify Taler signatures. + */ +#ifndef TALER_SIGNATURES_H +#define TALER_SIGNATURES_H + +#include +#include "taler_amount_lib.h" +#include "taler_crypto_lib.h" diff --git a/contrib/sigp/h.template b/contrib/sigp/h.template new file mode 100644 index 000000000..66b0317e0 --- /dev/null +++ b/contrib/sigp/h.template @@ -0,0 +1,6 @@ + + +/** + * {{Comment}} + */ +#define TALER_SIGNATURE_{{Name}} {{Number}}