diff options
author | Rob Austein <sra@hactrn.net> | 2012-09-19 21:28:34 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-09-19 21:28:34 +0000 |
commit | c5ae5ad3053be9b246dec019a5a1c0e3f310a477 (patch) | |
tree | 01053007537c4005b6936b8f357879ec91faf579 /utils/print_rpki_manifest/print_rpki_manifest.c | |
parent | e84b489d2676abe1e9f7ebc78a0f06a2141d1c58 (diff) |
Move ASN.1 definitions for ROAs and Manifests to common header files
used by all the C programs.
svn path=/branches/tk274/; revision=4725
Diffstat (limited to 'utils/print_rpki_manifest/print_rpki_manifest.c')
-rw-r--r-- | utils/print_rpki_manifest/print_rpki_manifest.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/utils/print_rpki_manifest/print_rpki_manifest.c b/utils/print_rpki_manifest/print_rpki_manifest.c index 727bce5d..53962162 100644 --- a/utils/print_rpki_manifest/print_rpki_manifest.c +++ b/utils/print_rpki_manifest/print_rpki_manifest.c @@ -40,44 +40,7 @@ #include <openssl/asn1t.h> #include <openssl/cms.h> -/* - * ASN.1 templates for signed manifests. Not sure that ASN1_EXP_OPT() - * is the right macro for "version", but it's what the examples for - * this construction use. Probably doesn't matter since this program - * only decodes manifests, never encodes them. - */ - -typedef struct FileAndHash_st { - ASN1_IA5STRING *file; - ASN1_BIT_STRING *hash; -} FileAndHash; - -ASN1_SEQUENCE(FileAndHash) = { - ASN1_SIMPLE(FileAndHash, file, ASN1_IA5STRING), - ASN1_SIMPLE(FileAndHash, hash, ASN1_BIT_STRING) -} ASN1_SEQUENCE_END(FileAndHash) - -DECLARE_STACK_OF(FileAndHash) -DECLARE_ASN1_FUNCTIONS(FileAndHash) - -#define sk_FileAndHash_num(st) SKM_sk_num(FileAndHash, (st)) -#define sk_FileAndHash_value(st, i) SKM_sk_value(FileAndHash, (st), (i)) - -typedef struct Manifest_st { - ASN1_INTEGER *version, *manifestNumber; - ASN1_GENERALIZEDTIME *thisUpdate, *nextUpdate; - ASN1_OBJECT *fileHashAlg; - STACK_OF(FileAndHash) *fileList; -} Manifest; - -ASN1_SEQUENCE(Manifest) = { - ASN1_EXP_OPT(Manifest, version, ASN1_INTEGER, 0), - ASN1_SIMPLE(Manifest, manifestNumber, ASN1_INTEGER), - ASN1_SIMPLE(Manifest, thisUpdate, ASN1_GENERALIZEDTIME), - ASN1_SIMPLE(Manifest, nextUpdate, ASN1_GENERALIZEDTIME), - ASN1_SIMPLE(Manifest, fileHashAlg, ASN1_OBJECT), - ASN1_SEQUENCE_OF(Manifest, fileList, FileAndHash) -} ASN1_SEQUENCE_END(Manifest) +#include <rpki/manifest.h> /* * Read manifest (CMS object) in DER format. |