Skip to content
Snippets Groups Projects
Commit 4eceeba9 authored by Lev Walkin's avatar Lev Walkin
Browse files

utilizing new library

parent d61e1b13
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ check_PROGRAMS = \ ...@@ -13,6 +13,7 @@ check_PROGRAMS = \
check-XER \ check-XER \
check-PER check-PER
AM_LDFLAGS = $(top_srcdir)/skeletons/libasn1cskeletons.la
LDADD = -lm LDADD = -lm
TESTS = $(check_PROGRAMS) TESTS = $(check_PROGRAMS)
...@@ -147,7 +147,6 @@ EGREP = @EGREP@ ...@@ -147,7 +147,6 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ F77 = @F77@
FFLAGS = @FFLAGS@ FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
...@@ -179,10 +178,12 @@ SHELL = @SHELL@ ...@@ -179,10 +178,12 @@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
YACC = @YACC@ YACC = @YACC@
YFLAGS = @YFLAGS@ ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@ ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
...@@ -199,30 +200,23 @@ build_cpu = @build_cpu@ ...@@ -199,30 +200,23 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host = @host@ host = @host@
host_alias = @host_alias@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
host_os = @host_os@ host_os = @host_os@
host_vendor = @host_vendor@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
...@@ -232,6 +226,7 @@ target_cpu = @target_cpu@ ...@@ -232,6 +226,7 @@ target_cpu = @target_cpu@
target_os = @target_os@ target_os = @target_os@
target_vendor = @target_vendor@ target_vendor = @target_vendor@
AM_CPPFLAGS = -I$(top_srcdir)/skeletons AM_CPPFLAGS = -I$(top_srcdir)/skeletons
AM_LDFLAGS = $(top_srcdir)/skeletons/libasn1cskeletons.la
LDADD = -lm LDADD = -lm
TESTS = $(check_PROGRAMS) TESTS = $(check_PROGRAMS)
all: all-am all: all-am
......
#define __ASN_INTERNAL_TEST_MODE__ #include <stdio.h>
#include <assert.h>
#include <time.h>
#include <GeneralizedTime.c> #include <GeneralizedTime.c>
#include <constraints.c>
#include <math.h> /* for pow(3) */ #include <math.h> /* for pow(3) */
static void static void
...@@ -264,36 +266,3 @@ main(int ac, char **av) { ...@@ -264,36 +266,3 @@ main(int ac, char **av) {
return 0; return 0;
} }
/*
* Dummy function.
*/
asn_enc_rval_t
OCTET_STRING_encode_der(asn_TYPE_descriptor_t *td, void *ptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t erval;
(void)td;
(void)ptr;
(void)tag_mode;
(void)tag;
(void)cb;
(void)app_key;
memset(&erval, 0, sizeof(erval));
return erval;
}
asn_enc_rval_t
OCTET_STRING_encode_xer_utf8(asn_TYPE_descriptor_t *td, void *ptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t erval;
(void)td;
(void)ptr;
(void)ilevel;
(void)flags;
(void)cb;
(void)app_key;
memset(&erval, 0, sizeof(erval));
return erval;
}
#include <INTEGER.c> #include <stdio.h>
#include <asn_codecs_prim.c> #include <assert.h>
#include <ber_decoder.c>
#include <ber_tlv_length.c> #include <INTEGER.h>
#include <ber_tlv_tag.c>
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
#include <per_support.c>
#include <constraints.c>
static char *shared_scratch_start; static char *shared_scratch_start;
......
#define EMIT_ASN_DEBUG 1 #include <stdio.h>
#include <OCTET_STRING.c> #include <assert.h>
#include <BIT_STRING.c> #include <time.h>
#include <xer_decoder.c>
#include <xer_support.c>
#include <per_support.c>
#include <ber_decoder.c>
#include <ber_tlv_length.c>
#include <ber_tlv_tag.c>
#include <der_encoder.c>
#include <constraints.c>
#include <sys/time.h> #include <sys/time.h>
#define EMIT_ASN_DEBUG 1
#include <OCTET_STRING.h>
#include <BIT_STRING.h>
enum encoding_type { HEX, BINARY, UTF8 }; enum encoding_type { HEX, BINARY, UTF8 };
static void static void
......
#include <OBJECT_IDENTIFIER.c> #include <stdio.h>
#include <RELATIVE-OID.c> #include <assert.h>
#include <asn_codecs_prim.c>
#include <ber_decoder.c>
#include <ber_tlv_length.c>
#include <ber_tlv_tag.c>
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
#include <constraints.c>
#include <sys/time.h> #include <sys/time.h>
#include <OBJECT_IDENTIFIER.h>
#include <RELATIVE-OID.h>
static int static int
_print(const void *buffer, size_t size, void *app_key) { _print(const void *buffer, size_t size, void *app_key) {
(void)app_key; (void)app_key;
...@@ -443,6 +437,3 @@ main() { ...@@ -443,6 +437,3 @@ main() {
return 0; return 0;
} }
asn_dec_rval_t OCTET_STRING_decode_uper(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td, asn_per_constraints_t *cts, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv = { 0, 0 }; (void)ctx; (void)td; (void)cts; (void)sptr; (void)pd; return rv; }
asn_enc_rval_t OCTET_STRING_encode_uper(asn_TYPE_descriptor_t *td, asn_per_constraints_t *cts, void *sptr, asn_per_outp_t *po) { asn_enc_rval_t er = { 0, 0, 0 }; (void)td; (void)cts; (void)sptr; (void)po; return er; }
#include <per_support.c> #include <stdio.h>
#include <assert.h> #include <assert.h>
#include <per_support.h>
static void static void
check_per_decoding() { check_per_decoding() {
uint8_t buf[] = { 0xB7, 0x19, 0x2F, 0xEE, 0xAD }; uint8_t buf[] = { 0xB7, 0x19, 0x2F, 0xEE, 0xAD };
......
#include <stdio.h>
#include <assert.h>
#include <math.h>
#define EMIT_ASN_DEBUG 1 #define EMIT_ASN_DEBUG 1
#include <REAL.c> #include <REAL.h>
#include <asn_codecs_prim.c>
#include <ber_decoder.c>
#include <ber_tlv_length.c>
#include <ber_tlv_tag.c>
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
#include <xer_encoder.c>
#include <constraints.c>
static char reconstructed[2][512]; static char reconstructed[2][512];
static int reconstr_lens[2]; static int reconstr_lens[2];
...@@ -286,7 +281,3 @@ main() { ...@@ -286,7 +281,3 @@ main() {
return 0; return 0;
} }
asn_dec_rval_t OCTET_STRING_decode_uper(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td, asn_per_constraints_t *cts, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv = { 0, 0 }; (void)ctx; (void)td; (void)cts; (void)sptr; (void)pd; return rv; }
asn_enc_rval_t OCTET_STRING_encode_uper(asn_TYPE_descriptor_t *td, asn_per_constraints_t *cts, void *sptr, asn_per_outp_t *po) { asn_enc_rval_t er = { 0, 0, 0 }; (void)td; (void)cts; (void)sptr; (void)po; return er; }
#define __ASN_INTERNAL_TEST_MODE__ #include <stdio.h>
#include <assert.h>
#include <time.h>
#include <GeneralizedTime.c> #include <GeneralizedTime.c>
#include <UTCTime.c> #include <UTCTime.h>
#include <constraints.c>
static void static void
check(char *time_str, time_t sample, int as_gmt) { check(char *time_str, time_t sample, int as_gmt) {
...@@ -58,37 +60,3 @@ main(int ac, char **av) { ...@@ -58,37 +60,3 @@ main(int ac, char **av) {
return 0; return 0;
} }
/*
* Dummy function.
*/
asn_enc_rval_t
OCTET_STRING_encode_der(asn_TYPE_descriptor_t *td, void *ptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t erval;
(void)td;
(void)ptr;
(void)tag_mode;
(void)tag;
(void)cb;
(void)app_key;
memset(&erval, 0, sizeof(erval));
return erval;
}
asn_enc_rval_t
OCTET_STRING_encode_xer_utf8(asn_TYPE_descriptor_t *td, void *ptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t erval;
(void)td;
(void)ptr;
(void)ilevel;
(void)flags;
(void)cb;
(void)app_key;
memset(&erval, 0, sizeof(erval));
return erval;
}
#include <UTF8String.c> #include <stdio.h>
#include <OCTET_STRING.c> #include <assert.h>
#include <ber_decoder.c>
#include <ber_tlv_length.c>
#include <ber_tlv_tag.c>
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
#include <per_support.c>
#include <constraints.c>
#include <sys/time.h> #include <sys/time.h>
#include <UTF8String.h>
static void static void
check(int expect_length, char *buf, int buflen) { check(int expect_length, char *buf, int buflen) {
UTF8String_t st; UTF8String_t st;
......
#include <xer_decoder.c> #include <stdio.h>
#include <xer_support.c>
#include <assert.h> #include <assert.h>
#include <asn_internal.h>
#include <xer_decoder.h>
static void static void
check(char *tag, char *name, xer_check_tag_e value) { check(char *tag, char *name, xer_check_tag_e value) {
xer_check_tag_e xct; xer_check_tag_e xct;
......
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <assert.h> #include <assert.h>
#include <ber_tlv_tag.c> #include <asn_internal.h>
#include <ber_tlv_tag.h>
struct tag_control_s { struct tag_control_s {
int taglen; int taglen;
......
#include <ber_decoder.c> #include <stdio.h>
#include <ber_tlv_length.c> #include <assert.h>
#include <ber_tlv_tag.c>
#include <der_encoder.c> #include <asn_internal.h>
#include <xer_decoder.c> #include <ber_decoder.h>
#include <xer_support.c> #include <OCTET_STRING.h>
#include <per_support.c> #include <ber_tlv_length.h>
#include <constraints.c> #include <ber_tlv_tag.h>
#undef ADVANCE
#undef RETURN
#undef LEFT
#include <OCTET_STRING.c>
uint8_t *buf; uint8_t *buf;
size_t buf_size; size_t buf_size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment