History log of /openbsd-src/lib/libcrypto/asn1/a_string.c (Results 1 – 17 of 17)
Revision Date Author Comments
# 2e0be48d 15-Aug-2023 tb <tb@openbsd.org>

Zap extra parens


# c489c5d0 15-Aug-2023 tb <tb@openbsd.org>

Fix typo in previous


# 2c8a0eae 15-Aug-2023 tb <tb@openbsd.org>

Avoid undefined behavior with memcmp(NULL, x, 0) in ASN1_STRING_cmp()

ok jsing miod


# acf64401 05-Jul-2023 beck <beck@openbsd.org>

Hide symbols in asn1 and bio

ok jsing@


# 6644e3f0 28-Nov-2022 tb <tb@openbsd.org>

Garbage collect the unused asn1_add_error()

ok jsing


# c9675a23 26-Nov-2022 tb <tb@openbsd.org>

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 *_l

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

show more ...


# 38884b26 20-May-2022 tb <tb@openbsd.org>

Drop *out == NULL check in ASN1_STRING_to_UTF8()

Unfortunately, several things in the ecosystem depend on the existing
API behavior of being able to pass in an uninitialized pointer on the
stack: ha

Drop *out == NULL check in ASN1_STRING_to_UTF8()

Unfortunately, several things in the ecosystem depend on the existing
API behavior of being able to pass in an uninitialized pointer on the
stack: haproxy, grpc, mongo-tools and others show up on the first two
pages of Debian codesearch.

ok jsing

show more ...


# d404e6c0 16-May-2022 tb <tb@openbsd.org>

Clean up and fix ASN1_STRING_to_UTF8()

Instead of using a temporary variable on the stack, we can use the usual
Henson mechanism for allocating the struct. Make the function single exit
and throw an

Clean up and fix ASN1_STRING_to_UTF8()

Instead of using a temporary variable on the stack, we can use the usual
Henson mechanism for allocating the struct. Make the function single exit
and throw an error instead of crashing or leaking if out is NULL or *out
is non-NULL.

tweaks/ok jsing

show more ...


# 71ddac4a 16-May-2022 tb <tb@openbsd.org>

Remove a stray space


# 0cfc2465 16-May-2022 tb <tb@openbsd.org>

Avoid use of uninitialized in ASN1_STRING_to_UTF8()

A long standing failure to initialize a struct on the stack fully was
exposed by a recent refactoring. Fortunately, the uninitialized 'flag'
membe

Avoid use of uninitialized in ASN1_STRING_to_UTF8()

A long standing failure to initialize a struct on the stack fully was
exposed by a recent refactoring. Fortunately, the uninitialized 'flag'
member is only used to decide whether or not to call freezero(NULL, 0),
so it is completely harmless. This is a first trivial fix, a better
version will be landed separately with regress.

Reported by Steffen Jaeckel, GH #760

ok beck

show more ...


# 867c12bb 17-Mar-2022 jsing <jsing@openbsd.org>

Rework ASN1_STRING_set()

Rework ASN1_STRING_set() so that we always clear and free an existing
allocation, prior to storing the new data. This fixes a number of issues,
including a failure to zero d

Rework ASN1_STRING_set()

Rework ASN1_STRING_set() so that we always clear and free an existing
allocation, prior to storing the new data. This fixes a number of issues,
including a failure to zero data if the existing allocation was too small.
This also fixes other bugs such as leaving the allocation uninitialised
if NULL is passed for data. Require -1 where strlen() is expected and
improve length and overflow checks.

ok inoguchi@ tb@

show more ...


# 31b410a6 14-Mar-2022 jsing <jsing@openbsd.org>

Factor out ASN1_STRING clearing code.

This fixes a bug in ASN1_STRING_set0() where it does not respect the
ASN1_STRING_FLAG_NDEF flag and potentially frees memory that we do not own.

ok inguchi@ tb@


# 89827a00 14-Mar-2022 jsing <jsing@openbsd.org>

First pass clean up of ASN1_STRING code.

Use consistent variable names (astr/src) rather than 'a', 'bs', 'str', 'v'
or 'x', add some whitespace and remove some unneeded parentheses.

ok inoguchi@ tb@


# 1ee5d7ed 25-Dec-2021 jsing <jsing@openbsd.org>

Indent goto labels for diffability.

Whitespace change only.


# aebda5a7 25-Dec-2021 jsing <jsing@openbsd.org>

Move more ASN1_STRING_* functions to a_string.c.

No functional change.


# a7deaf8f 24-Dec-2021 jsing <jsing@openbsd.org>

Reorder some functions.

No functional change.


# e77f3548 15-Dec-2021 jsing <jsing@openbsd.org>

Consolidate various ASN.1 code.

Rather than having multiple files per type (with minimal code per file),
use one file per type (a_<type>.c).

No functional change.

Discussed with tb@