Nicolas Williams
2b6bc1a7dc
asn1_compile: fix null deref bug
2016-02-29 19:13:13 -06:00
Love Hornquist Astrand
7c77f1842a
generate .x files for template too
2013-06-05 20:28:56 -07:00
Love Hornquist Astrand
060474df16
quel 64bit warnings, fixup implicit encoding for template, fix spelling
2013-06-03 21:46:20 -07:00
Jeffrey Altman
571e7daab3
Revert "generated files must #include config if supported"
...
therefore #include config.h is not required.
This reverts commit 9be792055c
.
2012-08-12 16:05:04 -04:00
Jeffrey Altman
2f17afacda
Revert "do not include stdint.h unprotected"
...
This reverts commit cb6f7ea40e
.
stdint.h can be included everywhere now that the Windows
platform generates and installs a stdint.h when Visual
Studio does not provide one.
Change-Id: Ia3cab28d7f5806203cd45227765debda54ac7472
2012-06-26 17:05:54 -04:00
Roland C. Dowdeswell
abdde6a608
Additional changes to make -Wshadow build on Ubuntu 10.04.
...
Looks like they defined basename() in string.h and ntohs/htonl are
implemented in terms of __bswap16() which is a macro with tmp
variables and so one cannot embed one call to ntohs/htons in another.
Not good but we workaround this limitation in glibc.
2012-06-07 16:59:01 +01:00
Jeffrey Altman
9be792055c
generated files must #include config if supported
...
The source files generated by compile_et and asn1-compile must
begin with:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
This permits conditional includes based on HAVE_STDINT_H and
HAVE_UNISTD_H to work.
Change-Id: Iefe25317ac3cb1970793748b8318174bcd7a087f
2012-04-10 17:17:33 -04:00
Jeffrey Altman
cb6f7ea40e
do not include stdint.h unprotected
...
In most cases stdint.h should be inherited from roken.h.
In those cases where it cannot be, it must be protected by
#ifdef HAVE_STDINT_H
Change-Id: I46cbaeab1d65939468f84179aeeef7e4f898b0bb
2012-03-13 23:54:27 -04:00
Nicolas Williams
6dd66df594
Make master build on Windows
...
Add strtoll()/strtoull() to lib/roken
Add stdint.h to lib/roken (Windows only)
Add logic to detect whether to use lib/roken's stdint.h based on
Visual Studio version
Add include of stdint.h in generated ASN.1 code
Export missing symbols for 64-bit integers in lib/asn1
Export missing symbols for FAST
Add missing sources to kdc/NTMakefile
Fix issue in kuserok
Fix bsearch issues
2012-01-17 12:10:14 -06:00
Nicolas Williams
dd05873d0c
Fix regression in ASN.1 int type generation
...
The 64-bit integer support changed the logic for deciding when an
INTEGER should map to a signed or unsigned 32- or 64-bit integer
type. The upshot is that two places where we had {0, INT_MAX}
ranges needed to be changed to be {0, UINT_MAX}.
We need to tweak the integer type mapping logic to have a bias for
unsigned integer types. Unsigned is better.
2011-12-15 14:37:09 -06:00
Nicolas Williams
a222521e68
64-bit build fixes for ASN.1 compiler 64-bit integer support
2011-12-13 13:03:57 -06:00
Nicolas Williams
19d378f44d
Add 64-bit integer support to ASN.1 compiler
...
ASN.1 INTEGERs will now compile to C int64_t or uint64_t, depending
on whether the constraint ranges include numbers that cannot be
represented in 32-bit ints and whether they include negative
numbers.
Template backend support included. check-template is now built with
--template, so we know we're testing it.
Tests included.
2011-12-12 20:01:20 -06:00
Love Hörnquist Åstrand
58329bc1a0
__HEIM_OCTET_STRING__
2011-11-30 00:35:51 -08:00
Love Hornquist Astrand
204166e001
Name the choice enum type.
2011-07-24 20:24:37 -07:00
Love Hornquist Astrand
0879b9831a
remove trailing whitespace
2011-05-21 11:57:31 -07:00
Andrew Bartlett
1d09e39d45
Don't segfault when in --one-file mode
...
The problem is that on Linux, fclose() of a NULL pointer segfaults
Signed-off-by: Love Hornquist Astrand <lha@h5l.org >
2010-10-02 11:51:42 -07:00
Asanka Herath
ed226d4241
Declare ASN.1 exported data using ASN1EXP
2010-09-14 08:03:35 -04:00
Asanka Herath
3d83131be8
Export and calling convention annotation for lib/asn1
2010-08-20 13:14:10 -04:00
Love Hornquist Astrand
72892fccbb
Provide a cpp symbols for oids that is a pointer
2010-08-08 16:56:44 -07:00
Love Hornquist Astrand
fa4c84e6d6
make printablestring and ia5string octetstrings
2010-08-08 15:51:33 -07:00
Love Hornquist Astrand
e65154c6db
catch error from as.*printf
2010-05-30 14:48:48 -07:00
Love Hornquist Astrand
351e0d0914
catch error from as.*printf
2010-05-30 13:28:09 -07:00
Asanka Herath
84344949ec
(lib/asn1/gen.c) The name for define_type() shouldn't include a semicolon
2009-11-25 12:43:10 -05:00
Love Hornquist Astrand
b939943b07
first stange of asn1 table driven compiler
2009-11-21 10:24:56 -08:00
Love Hornquist Astrand
4d06f484ec
implement TeletexString
2009-09-30 00:48:18 -07:00
Love Hörnquist Åstrand
e0a1d5a8cb
filename != headername
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25263 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-03 17:24:58 +00:00
Love Hörnquist Åstrand
508add9595
Generate header as foo.hx so that we don't overwrite it.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25259 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-03 17:24:14 +00:00
Love Hörnquist Åstrand
0e6b5c5c22
remove trailing whitespace
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25232 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-28 01:17:17 +00:00
Love Hörnquist Åstrand
5ea67034d0
drop variable at the end
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24676 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-11 05:59:02 +00:00
Love Hörnquist Åstrand
ba859e47b0
Export oid as variable, simplies codebase.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24671 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-11 05:58:10 +00:00
Love Hörnquist Åstrand
0179e12d54
remove -DHAVE_CONFIG_H, add --one-source-file, rename krb5 and cms to "better" file names
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24337 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:23:39 +00:00
Love Hörnquist Åstrand
466f1f1cb4
free array when done, cid#127
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24115 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:02:11 +00:00
Love Hörnquist Åstrand
6937d41a02
remove trailing whitespace
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898
switch to utf8 encoding of all files
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
423306b2f7
Use unsigned where appropriate.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22896 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-07 18:52:24 +00:00
Love Hörnquist Åstrand
731d6e6df8
REVERT: add and use der_{malloc,free}
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22429 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-01-13 10:25:50 +00:00
Love Hörnquist Åstrand
9af9863be1
add and use der_{malloc,free}
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22426 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-01-13 09:54:32 +00:00
Love Hörnquist Åstrand
a593f1136d
Include <limits.h> for UINT_MAX.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21364 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-27 08:51:06 +00:00
Love Hörnquist Åstrand
b313013d8f
Add struct units; as a forward declaration. Pointed out by Marcus Watts.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20670 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-11 00:39:41 +00:00
Love Hörnquist Åstrand
983b89b811
Add VisibleString parsing
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19539 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-28 17:15:05 +00:00
Love Hörnquist Åstrand
09dc4cecca
move any definitions here.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18435 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-14 05:11:52 +00:00
Love Hörnquist Åstrand
9f8a9ce2dd
Generate sequence function.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18007 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-05 12:28:56 +00:00
Love Hörnquist Åstrand
916925bc94
(generate_header_of_codefile): remove unused variable.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16877 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-31 02:52:21 +00:00
Love Hörnquist Åstrand
fb6af46d0e
Put all the IMPORTed headers into the headerfile to avoid hidden depencies.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16859 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-30 04:40:52 +00:00
Love Hörnquist Åstrand
5be7181d53
(init_generate): Nothing in the generated files needs timegm(), so no
...
need to provide a prototype for it.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16791 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-08 12:29:34 +00:00
Love Hörnquist Åstrand
fcfe7bc161
Set new constraints pointer in Type to NULL for inline constructed types.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16356 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-12-06 19:59:13 +00:00
Love Hörnquist Åstrand
c6dc7f253e
Const poision.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15959 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-08-23 10:50:12 +00:00
Love Hörnquist Åstrand
3d0c56c8fc
(generate_constant): oid elements are unsigned
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15678 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-19 18:46:50 +00:00
Love Hörnquist Åstrand
b838707d0e
Commit much improved ASN.1 compiler from joda-choice-branch.
...
Highlighs for the compiler is support for CHOICE and in general better
support for tags. This compiler support most of what is needed for
PK-INIT, LDAP, X.509, PKCS-12 and many other protocols.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15617 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-12 06:27:42 +00:00
Love Hörnquist Åstrand
53ac3a20b2
make scope variables unique to avoid shadow warnings
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15614 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-10 05:13:09 +00:00