aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/tasn_fre.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-08Update copyright yearMatt Caswell1-1/+1
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14801)
2021-03-18Add ossl_asn1 symbolsShane Lontis1-20/+20
Partial fix for #12964 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14473)
2020-09-13Fix safestack issues in asn1t.hMatt Caswell1-2/+0
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12781)
2020-05-15Update copyright yearMatt Caswell1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11839)
2020-04-24In OpenSSL builds, declare STACK for datatypes ...Rich Salz1-0/+2
... and only *define* them in the source files that need them. Use DEFINE_OR_DECLARE which is set appropriately for internal builds and not non-deprecated builds. Deprecate stack-of-block Better documentation Move some ASN1 struct typedefs to types.h Update ParseC to handle this. Most of all, ParseC needed to be more consistent. The handlers are "recursive", in so far that they are called again and again until they terminate, which depends entirely on what the "massager" returns. There's a comment at the beginning of ParseC that explains how that works. {Richard Levtte} Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10669)
2019-10-09Explicitly test against NULL; do not use !p or similarRich Salz1-5/+5
Also added blanks lines after declarations in a couple of places. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9916)
2019-09-28Reorganize local header filesDr. Matthias St. Pierre1-1/+1
Apart from public and internal header files, there is a third type called local header files, which are located next to source files in the source directory. Currently, they have different suffixes like '*_lcl.h', '*_local.h', or '*_int.h' This commit changes the different suffixes to '*_local.h' uniformly. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
2019-03-06constify *_dup() and *i2d_*() and related functions as far as possible, ↵David von Oheimb1-1/+1
introducing DECLARE_ASN1_DUP_FUNCTION Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8029)
2018-12-06Following the license change, modify the boilerplates in crypto/asn1/Richard Levitte1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7772)
2017-10-24asn1_item_embed_new(): don't free an embedded itemRichard Levitte1-5/+1
The previous change with this intention didn't quite do it. An embedded item must not be freed itself, but might potentially contain non-embedded elements, which must be freed. So instead of calling ASN1_item_ex_free(), where we can't pass the embed flag, we call asn1_item_embed_free() directly. This changes asn1_item_embed_free() from being a static function to being a private non-static function. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/4579)
2017-04-13ASN.1: extend the possibilities to embed data instead of pointersRichard Levitte1-1/+6
Also, when "allocating" or "deallocating" an embedded item, never call prim_new() or prim_free(). Call prim_clear() instead. Fixes #3191 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3199)
2016-10-17Fix embedded string handling.Dr. Stephen Henson1-5/+5
Don't rely on embedded flag to free strings correctly: it wont be set if there is a malloc failure during initialisation. Thanks to Guido Vranken for reporting this issue. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1725)
2016-08-05spelling fixes, just comments and readme.klemens1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1413)
2016-06-23Rework error handling from asn1_do_lock method.FdaSilvaYY1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-24Avoid creating an illegal pointerKurt Roeckx1-2/+4
Found by tis-interpreter Reviewed-by: Richard Levitte <levitte@openssl.org> GH: #1115
2016-05-17Copyright consolidation 08/10Rich Salz1-54/+5
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz1-1/+0
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-10-11embed support for CHOICE typeDr. Stephen Henson1-2/+4
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-07Don't check pointer we just freed, always set it to NULL.Pascal Cuoq1-2/+1
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> MR #1231
2015-09-16New ASN.1 embed macro.Dr. Stephen Henson1-5/+22
New ASN.1 macro ASN1_EMBED. This is the same as ASN1_SIMPLE except the structure is not allocated: it is part of the parent. That is instead of FOO *x; it must be: FOO x; This reduces memory fragmentation and make it impossible to accidentally set a mandatory field to NULL. This currently only works for SEQUENCE and since it is equivalent to ASN1_SIMPLE it cannot be tagged, OPTIONAL, SET OF or SEQUENCE OF. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-26Remove combine option from ASN.1 code.Dr. Stephen Henson1-21/+7
Remove the combine option. This was used for compatibility with some non standard behaviour in ancient versions of OpenSSL: specifically the X509_ATTRIBUTE and DSAPublicKey handling. Since these have now been revised it is no longer needed. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-26Move more internal only functions to asn1_locl.hDr. Stephen Henson1-8/+8
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-25Move internal only ASN.1 functions to asn1_locl.hDr. Stephen Henson1-0/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-24free NULL cleanupRich Salz1-9/+17
Start ensuring all OpenSSL "free" routines allow NULL, and remove any if check before calling them. This gets ASN1_OBJECT_free and ASN1_STRING_free. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-23Remove old style ASN.1 support.Dr. Stephen Henson1-7/+0
Remove old ASN.1 COMPAT type. This was meant as a temporary measure so older ASN.1 code (from OpenSSL 0.9.6) still worked. It's a hack which breaks constification and hopefully nothing uses it now, if it ever did. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell1-196/+179
Reviewed-by: Tim Hudson <tjh@openssl.org>
2008-11-05Update obsolete email address...Dr. Stephen Henson1-1/+1
2008-03-14Only call free once in CHOICE type.Dr. Stephen Henson1-2/+0
2006-11-16Initial, incomplete support for typesafe macros without using functionDr. Stephen Henson1-1/+1
casts.
2005-09-01Extend callback function to support print customization.Dr. Stephen Henson1-5/+5
2004-04-25More ASN1 reformat/tidy.Dr. Stephen Henson1-55/+93
2002-11-05Check for NULL ASN1_ITEM when initializeingDr. Stephen Henson1-1/+4
boolean option in ASN1_TYPE.
2002-10-03Preliminary streaming ASN1 encode support.Dr. Stephen Henson1-0/+1
2001-02-23Initial support for ASN1_ITEM_FUNCTION option toDr. Stephen Henson1-2/+3
change the way ASN1 modules are exported. Still needs a bit of work for example the hack which a dummy function prototype to avoid compilers warning about multiple ;s.
2000-12-08Merge from the ASN1 branch of new ASN1 codeDr. Stephen Henson1-0/+225
to main trunk. Lets see if the makes it to openssl-cvs :-)