History log of /openbsd-current/lib/libcrypto/asn1/tasn_new.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.25 28-Jul-2023 tb

Make ASN1_{primitive,template}_* internal

These were long removed from the public OpenSSL API, so we can do the
same. Remove ASN1_template_{d2i,i2d}() - those are unused internally.

ok jsing


# 1.24 05-Jul-2023 beck

Hide symbols in asn1 and bio

ok jsing@


Revision tags: OPENBSD_7_3_BASE
# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


Revision tags: OPENBSD_7_2_BASE
# 1.22 10-May-2022 jsing

Remove ASN.1 combining.

This was an option used to combine ASN.1 into a single structure, which was
only ever used by DSAPublicKey and X509_ATTRIBUTE. Since they no longer use
it we can mop this up and simplify all of the related code.

ok tb@


Revision tags: OPENBSD_7_1_BASE
# 1.21 07-Jan-2022 tb

A few more files need asn1_locl.h.


# 1.20 25-Dec-2021 jsing

Indent goto labels for diffability.

Whitespace change only.


# 1.19 15-Dec-2021 jsing

unifdef -U CRYPTO_MDEBUG -m tasn_new.c


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.18 01-Apr-2019 jsing

Require all ASN1_PRIMITIVE_FUNCS functions to be provided.

If an ASN.1 item provides its own ASN1_PRIMITIVE_FUNCS functions, require
all functions to be provided (currently excluding prim_clear). This avoids
situations such as having a custom allocator that returns a specific struct
but then is then printed using the default primative print functions, which
interpret the memory as a different struct.

Found by oss-fuzz, fixes issue #13799.

ok beck@, tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.17 29-Jan-2017 beck

Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@


# 1.16 30-Dec-2016 jsing

Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.


# 1.15 20-Jul-2015 miod

Use V_ASN1_UNDEF instead of -1.
Make sure ASN1_primitive_new() will return NULL in *pval in all error
situations.

ok bcook@ doug@


# 1.14 14-Feb-2015 miod

Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@


# 1.13 14-Feb-2015 miod

Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@


# 1.12 14-Feb-2015 jsing

Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.

ok doug@ miod@


# 1.11 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.10 21-Apr-2014 deraadt

improve realloc/calloc/malloc patterns; ok guenther


# 1.9 18-Apr-2014 jsing

More KNF.


# 1.8 18-Apr-2014 tedu

lob a few more knf grenades in here to soften things up.


# 1.7 18-Apr-2014 tedu

putting most of the braces in the right column is the very least we can do.


# 1.6 17-Apr-2014 beck

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


# 1.5 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.4 09-Jan-2009 djm

resolve conflicts


# 1.3 06-Sep-2008 djm

resolve conflicts


# 1.2 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.24 05-Jul-2023 beck

Hide symbols in asn1 and bio

ok jsing@


Revision tags: OPENBSD_7_3_BASE
# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


Revision tags: OPENBSD_7_2_BASE
# 1.22 10-May-2022 jsing

Remove ASN.1 combining.

This was an option used to combine ASN.1 into a single structure, which was
only ever used by DSAPublicKey and X509_ATTRIBUTE. Since they no longer use
it we can mop this up and simplify all of the related code.

ok tb@


Revision tags: OPENBSD_7_1_BASE
# 1.21 07-Jan-2022 tb

A few more files need asn1_locl.h.


# 1.20 25-Dec-2021 jsing

Indent goto labels for diffability.

Whitespace change only.


# 1.19 15-Dec-2021 jsing

unifdef -U CRYPTO_MDEBUG -m tasn_new.c


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.18 01-Apr-2019 jsing

Require all ASN1_PRIMITIVE_FUNCS functions to be provided.

If an ASN.1 item provides its own ASN1_PRIMITIVE_FUNCS functions, require
all functions to be provided (currently excluding prim_clear). This avoids
situations such as having a custom allocator that returns a specific struct
but then is then printed using the default primative print functions, which
interpret the memory as a different struct.

Found by oss-fuzz, fixes issue #13799.

ok beck@, tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.17 29-Jan-2017 beck

Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@


# 1.16 30-Dec-2016 jsing

Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.


# 1.15 20-Jul-2015 miod

Use V_ASN1_UNDEF instead of -1.
Make sure ASN1_primitive_new() will return NULL in *pval in all error
situations.

ok bcook@ doug@


# 1.14 14-Feb-2015 miod

Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@


# 1.13 14-Feb-2015 miod

Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@


# 1.12 14-Feb-2015 jsing

Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.

ok doug@ miod@


# 1.11 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.10 21-Apr-2014 deraadt

improve realloc/calloc/malloc patterns; ok guenther


# 1.9 18-Apr-2014 jsing

More KNF.


# 1.8 18-Apr-2014 tedu

lob a few more knf grenades in here to soften things up.


# 1.7 18-Apr-2014 tedu

putting most of the braces in the right column is the very least we can do.


# 1.6 17-Apr-2014 beck

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


# 1.5 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.4 09-Jan-2009 djm

resolve conflicts


# 1.3 06-Sep-2008 djm

resolve conflicts


# 1.2 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


Revision tags: OPENBSD_7_2_BASE
# 1.22 10-May-2022 jsing

Remove ASN.1 combining.

This was an option used to combine ASN.1 into a single structure, which was
only ever used by DSAPublicKey and X509_ATTRIBUTE. Since they no longer use
it we can mop this up and simplify all of the related code.

ok tb@


Revision tags: OPENBSD_7_1_BASE
# 1.21 07-Jan-2022 tb

A few more files need asn1_locl.h.


# 1.20 25-Dec-2021 jsing

Indent goto labels for diffability.

Whitespace change only.


# 1.19 15-Dec-2021 jsing

unifdef -U CRYPTO_MDEBUG -m tasn_new.c


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.18 01-Apr-2019 jsing

Require all ASN1_PRIMITIVE_FUNCS functions to be provided.

If an ASN.1 item provides its own ASN1_PRIMITIVE_FUNCS functions, require
all functions to be provided (currently excluding prim_clear). This avoids
situations such as having a custom allocator that returns a specific struct
but then is then printed using the default primative print functions, which
interpret the memory as a different struct.

Found by oss-fuzz, fixes issue #13799.

ok beck@, tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.17 29-Jan-2017 beck

Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@


# 1.16 30-Dec-2016 jsing

Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.


# 1.15 20-Jul-2015 miod

Use V_ASN1_UNDEF instead of -1.
Make sure ASN1_primitive_new() will return NULL in *pval in all error
situations.

ok bcook@ doug@


# 1.14 14-Feb-2015 miod

Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@


# 1.13 14-Feb-2015 miod

Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@


# 1.12 14-Feb-2015 jsing

Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.

ok doug@ miod@


# 1.11 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.10 21-Apr-2014 deraadt

improve realloc/calloc/malloc patterns; ok guenther


# 1.9 18-Apr-2014 jsing

More KNF.


# 1.8 18-Apr-2014 tedu

lob a few more knf grenades in here to soften things up.


# 1.7 18-Apr-2014 tedu

putting most of the braces in the right column is the very least we can do.


# 1.6 17-Apr-2014 beck

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


# 1.5 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.4 09-Jan-2009 djm

resolve conflicts


# 1.3 06-Sep-2008 djm

resolve conflicts


# 1.2 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.22 10-May-2022 jsing

Remove ASN.1 combining.

This was an option used to combine ASN.1 into a single structure, which was
only ever used by DSAPublicKey and X509_ATTRIBUTE. Since they no longer use
it we can mop this up and simplify all of the related code.

ok tb@


Revision tags: OPENBSD_7_1_BASE
# 1.21 07-Jan-2022 tb

A few more files need asn1_locl.h.


# 1.20 25-Dec-2021 jsing

Indent goto labels for diffability.

Whitespace change only.


# 1.19 15-Dec-2021 jsing

unifdef -U CRYPTO_MDEBUG -m tasn_new.c


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.18 01-Apr-2019 jsing

Require all ASN1_PRIMITIVE_FUNCS functions to be provided.

If an ASN.1 item provides its own ASN1_PRIMITIVE_FUNCS functions, require
all functions to be provided (currently excluding prim_clear). This avoids
situations such as having a custom allocator that returns a specific struct
but then is then printed using the default primative print functions, which
interpret the memory as a different struct.

Found by oss-fuzz, fixes issue #13799.

ok beck@, tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.17 29-Jan-2017 beck

Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@


# 1.16 30-Dec-2016 jsing

Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.


# 1.15 20-Jul-2015 miod

Use V_ASN1_UNDEF instead of -1.
Make sure ASN1_primitive_new() will return NULL in *pval in all error
situations.

ok bcook@ doug@


# 1.14 14-Feb-2015 miod

Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@


# 1.13 14-Feb-2015 miod

Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@


# 1.12 14-Feb-2015 jsing

Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.

ok doug@ miod@


# 1.11 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.10 21-Apr-2014 deraadt

improve realloc/calloc/malloc patterns; ok guenther


# 1.9 18-Apr-2014 jsing

More KNF.


# 1.8 18-Apr-2014 tedu

lob a few more knf grenades in here to soften things up.


# 1.7 18-Apr-2014 tedu

putting most of the braces in the right column is the very least we can do.


# 1.6 17-Apr-2014 beck

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


# 1.5 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.4 09-Jan-2009 djm

resolve conflicts


# 1.3 06-Sep-2008 djm

resolve conflicts


# 1.2 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.21 07-Jan-2022 tb

A few more files need asn1_locl.h.


# 1.20 25-Dec-2021 jsing

Indent goto labels for diffability.

Whitespace change only.


# 1.19 15-Dec-2021 jsing

unifdef -U CRYPTO_MDEBUG -m tasn_new.c


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.18 01-Apr-2019 jsing

Require all ASN1_PRIMITIVE_FUNCS functions to be provided.

If an ASN.1 item provides its own ASN1_PRIMITIVE_FUNCS functions, require
all functions to be provided (currently excluding prim_clear). This avoids
situations such as having a custom allocator that returns a specific struct
but then is then printed using the default primative print functions, which
interpret the memory as a different struct.

Found by oss-fuzz, fixes issue #13799.

ok beck@, tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.17 29-Jan-2017 beck

Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@


# 1.16 30-Dec-2016 jsing

Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.


# 1.15 20-Jul-2015 miod

Use V_ASN1_UNDEF instead of -1.
Make sure ASN1_primitive_new() will return NULL in *pval in all error
situations.

ok bcook@ doug@


# 1.14 14-Feb-2015 miod

Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@


# 1.13 14-Feb-2015 miod

Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@


# 1.12 14-Feb-2015 jsing

Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.

ok doug@ miod@


# 1.11 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.10 21-Apr-2014 deraadt

improve realloc/calloc/malloc patterns; ok guenther


# 1.9 18-Apr-2014 jsing

More KNF.


# 1.8 18-Apr-2014 tedu

lob a few more knf grenades in here to soften things up.


# 1.7 18-Apr-2014 tedu

putting most of the braces in the right column is the very least we can do.


# 1.6 17-Apr-2014 beck

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


# 1.5 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.4 09-Jan-2009 djm

resolve conflicts


# 1.3 06-Sep-2008 djm

resolve conflicts


# 1.2 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.20 25-Dec-2021 jsing

Indent goto labels for diffability.

Whitespace change only.


# 1.19 15-Dec-2021 jsing

unifdef -U CRYPTO_MDEBUG -m tasn_new.c


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.18 01-Apr-2019 jsing

Require all ASN1_PRIMITIVE_FUNCS functions to be provided.

If an ASN.1 item provides its own ASN1_PRIMITIVE_FUNCS functions, require
all functions to be provided (currently excluding prim_clear). This avoids
situations such as having a custom allocator that returns a specific struct
but then is then printed using the default primative print functions, which
interpret the memory as a different struct.

Found by oss-fuzz, fixes issue #13799.

ok beck@, tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.17 29-Jan-2017 beck

Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@


# 1.16 30-Dec-2016 jsing

Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.


# 1.15 20-Jul-2015 miod

Use V_ASN1_UNDEF instead of -1.
Make sure ASN1_primitive_new() will return NULL in *pval in all error
situations.

ok bcook@ doug@


# 1.14 14-Feb-2015 miod

Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@


# 1.13 14-Feb-2015 miod

Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@


# 1.12 14-Feb-2015 jsing

Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.

ok doug@ miod@


# 1.11 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.10 21-Apr-2014 deraadt

improve realloc/calloc/malloc patterns; ok guenther


# 1.9 18-Apr-2014 jsing

More KNF.


# 1.8 18-Apr-2014 tedu

lob a few more knf grenades in here to soften things up.


# 1.7 18-Apr-2014 tedu

putting most of the braces in the right column is the very least we can do.


# 1.6 17-Apr-2014 beck

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


# 1.5 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.4 09-Jan-2009 djm

resolve conflicts


# 1.3 06-Sep-2008 djm

resolve conflicts


# 1.2 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.19 15-Dec-2021 jsing

unifdef -U CRYPTO_MDEBUG -m tasn_new.c


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.18 01-Apr-2019 jsing

Require all ASN1_PRIMITIVE_FUNCS functions to be provided.

If an ASN.1 item provides its own ASN1_PRIMITIVE_FUNCS functions, require
all functions to be provided (currently excluding prim_clear). This avoids
situations such as having a custom allocator that returns a specific struct
but then is then printed using the default primative print functions, which
interpret the memory as a different struct.

Found by oss-fuzz, fixes issue #13799.

ok beck@, tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.17 29-Jan-2017 beck

Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@


# 1.16 30-Dec-2016 jsing

Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.


# 1.15 20-Jul-2015 miod

Use V_ASN1_UNDEF instead of -1.
Make sure ASN1_primitive_new() will return NULL in *pval in all error
situations.

ok bcook@ doug@


# 1.14 14-Feb-2015 miod

Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@


# 1.13 14-Feb-2015 miod

Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@


# 1.12 14-Feb-2015 jsing

Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.

ok doug@ miod@


# 1.11 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.10 21-Apr-2014 deraadt

improve realloc/calloc/malloc patterns; ok guenther


# 1.9 18-Apr-2014 jsing

More KNF.


# 1.8 18-Apr-2014 tedu

lob a few more knf grenades in here to soften things up.


# 1.7 18-Apr-2014 tedu

putting most of the braces in the right column is the very least we can do.


# 1.6 17-Apr-2014 beck

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


# 1.5 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.4 09-Jan-2009 djm

resolve conflicts


# 1.3 06-Sep-2008 djm

resolve conflicts


# 1.2 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


Revision tags: OPENBSD_6_5_BASE
# 1.18 01-Apr-2019 jsing

Require all ASN1_PRIMITIVE_FUNCS functions to be provided.

If an ASN.1 item provides its own ASN1_PRIMITIVE_FUNCS functions, require
all functions to be provided (currently excluding prim_clear). This avoids
situations such as having a custom allocator that returns a specific struct
but then is then printed using the default primative print functions, which
interpret the memory as a different struct.

Found by oss-fuzz, fixes issue #13799.

ok beck@, tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.17 29-Jan-2017 beck

Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@


# 1.16 30-Dec-2016 jsing

Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.


# 1.15 20-Jul-2015 miod

Use V_ASN1_UNDEF instead of -1.
Make sure ASN1_primitive_new() will return NULL in *pval in all error
situations.

ok bcook@ doug@


# 1.14 14-Feb-2015 miod

Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@


# 1.13 14-Feb-2015 miod

Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@


# 1.12 14-Feb-2015 jsing

Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.

ok doug@ miod@


# 1.11 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.10 21-Apr-2014 deraadt

improve realloc/calloc/malloc patterns; ok guenther


# 1.9 18-Apr-2014 jsing

More KNF.


# 1.8 18-Apr-2014 tedu

lob a few more knf grenades in here to soften things up.


# 1.7 18-Apr-2014 tedu

putting most of the braces in the right column is the very least we can do.


# 1.6 17-Apr-2014 beck

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


# 1.5 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.4 09-Jan-2009 djm

resolve conflicts


# 1.3 06-Sep-2008 djm

resolve conflicts


# 1.2 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.17 29-Jan-2017 beck

Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@


# 1.16 30-Dec-2016 jsing

Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.


# 1.15 20-Jul-2015 miod

Use V_ASN1_UNDEF instead of -1.
Make sure ASN1_primitive_new() will return NULL in *pval in all error
situations.

ok bcook@ doug@


# 1.14 14-Feb-2015 miod

Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@


# 1.13 14-Feb-2015 miod

Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@


# 1.12 14-Feb-2015 jsing

Spell NULL correctly, be explicit with NULL checks and it is also easier to
initialise during declaration and drop the else statement.

ok doug@ miod@


# 1.11 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.10 21-Apr-2014 deraadt

improve realloc/calloc/malloc patterns; ok guenther


# 1.9 18-Apr-2014 jsing

More KNF.


# 1.8 18-Apr-2014 tedu

lob a few more knf grenades in here to soften things up.


# 1.7 18-Apr-2014 tedu

putting most of the braces in the right column is the very least we can do.


# 1.6 17-Apr-2014 beck

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


# 1.5 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.4 09-Jan-2009 djm

resolve conflicts


# 1.3 06-Sep-2008 djm

resolve conflicts


# 1.2 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge