History log of /openbsd-src/lib/libcrypto/stack/stack.c (Results 1 – 25 of 33)
Revision Date Author Comments
# 3015a2d4 03-Jan-2025 tb <tb@openbsd.org>

Remove now unnecessary initialization of c and i


# f9c82970 03-Jan-2025 tb <tb@openbsd.org>

Remove unnecessary early return if num == 0

Review feedback by jsing


# a94c6d92 03-Jan-2025 tb <tb@openbsd.org>

Make obj_bsearch_ex() resemble libc bsearch() a bit more

ok jsing


# 11c22f69 28-Dec-2024 tb <tb@openbsd.org>

Remove flags argument from obj_bsearch_ex()

The only caller passes in OBJ_BSEARCH_FIRST_VALUE_ON_MATCH, so the
condition involving this flag is always true. On the other hand,
while OBJ_BSEARCh_VALU

Remove flags argument from obj_bsearch_ex()

The only caller passes in OBJ_BSEARCH_FIRST_VALUE_ON_MATCH, so the
condition involving this flag is always true. On the other hand,
while OBJ_BSEARCh_VALUE_ON_NOMATCH is left unset hence the condition
involving this flag is also true (since negated).

ok jsing

show more ...


# a3c93913 28-Dec-2024 tb <tb@openbsd.org>

stack: inline internal_find() in sk_find()

internal_find() was a generalization needed for sk_find_ex(), which was
removed a while ago.

ok jsing


# bc8b9123 02-Mar-2024 tb <tb@openbsd.org>

Remove sk_find_ex()

This API intends to find the closest match to the needle. M2Crypto
exposes it because it can. This will be fixed by patching the port.

ok jsing


# b9351927 02-Mar-2024 tb <tb@openbsd.org>

Make LHASH_OF() and STACK_OF() use opaque structs

This removes internals of these two special snowflakes and will allow
further simplifications. Unfortunately, there are some pieces of
software that

Make LHASH_OF() and STACK_OF() use opaque structs

This removes internals of these two special snowflakes and will allow
further simplifications. Unfortunately, there are some pieces of
software that actually use LHASH_OF() (looking at you, pound, Ruby, and
openssl(1)), so we get to keep exposing this garbage, at least for now.

Expose lh_error() as a symbol to replace a macro reaching into _LHASH.
lh_down_load() is no longer available. _LHASH and _STACK are now opaque,
LHASH_NODE becomes internal-only.

from jsing

show more ...


# f329cdbc 02-Mar-2024 tb <tb@openbsd.org>

Remove OBJ_bsearch_()

The only reason this has still been part of the public API was that libssl
used it for cipher lookup. This was fixed by replacing the lookup by proper
bsearch() -- why OpenSSL

Remove OBJ_bsearch_()

The only reason this has still been part of the public API was that libssl
used it for cipher lookup. This was fixed by replacing the lookup by proper
bsearch() -- why OpenSSL felt the need to reinvent ANSI C API badly will
forever remain a mystery.

The stack code in libcrypto still uses a version of this. This should
be rewritten. It will be a bit easier once sk_find_ex() is removed.

ok jsing

show more ...


# 2eb0a250 26-Feb-2024 tb <tb@openbsd.org>

Neuter OBJ_bsearch{_,ex_}()

Make these functions always fail. A copy of OBJ_bsearch_ex_() is kept
in stack.c, where it is still used by internal_find() for sk_find{,_ex}().
sk_find_ex() will be remo

Neuter OBJ_bsearch{_,ex_}()

Make these functions always fail. A copy of OBJ_bsearch_ex_() is kept
in stack.c, where it is still used by internal_find() for sk_find{,_ex}().
sk_find_ex() will be removed in the upcoming bump, and then we can
simplify or rewrite what's still needed.

ok jsing

show more ...


# 949c64fb 13-Jan-2024 tb <tb@openbsd.org>

Move errno.h inclusion where it belongs


# bde0d557 24-Apr-2023 beck <beck@openbsd.org>

Fix sk_is_sorted to tread 0 and 1 element lists as sorted.

from boringssl

ok tb@ jsing@


# cedac418 16-Feb-2023 tb <tb@openbsd.org>

libressl *_namespace.h: adjust *_ALIAS() to require a semicolon

LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon.
This does not conform to style(9), breaks editors and ctags and
(most

libressl *_namespace.h: adjust *_ALIAS() to require a semicolon

LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon.
This does not conform to style(9), breaks editors and ctags and
(most importantly) my workflow. Fix this by neutering them with
asm("") so that -Wpedantic doesn't complain. There's precedent
in libc's namespace.h

fix suggested by & ok jsing

show more ...


# 7a40b1c1 11-Nov-2022 beck <beck@openbsd.org>

Hide symbols in libcrypto/stack

Automated change from the first attempts at the semi automated
Guentherizer 2000.

ok jsing@ tb@ joshua@


# 10b27f3e 01-Apr-2018 schwarze <schwarze@openbsd.org>

When you replace an element in a sorted array with something
arbitrarily different, the array is in general no longer sorted.

This commit copies a small hidden bugfix from the OpenSSL commit
https:/

When you replace an element in a sorted array with something
arbitrarily different, the array is in general no longer sorted.

This commit copies a small hidden bugfix from the OpenSSL commit
https://github.com/openssl/openssl/commit/fbb7b33b
the rest of which is merely cosmetics.

I discovered the bug independently while documenting sk_find(3).

Keep the library's idea of when an empty stack or a one-element stack
is sorted and when it is not bug-compatible with OpenSSL, even though
in fact, empty and one-element stacks are of course always sorted.

OK beck@

show more ...


# 700744f6 07-Feb-2015 doug <doug@openbsd.org>

Delete a lot of #if 0 code in libressl.

There are a few instances where #if 1 is removed but the code remains.

Based on the following OpenSSL commits. Some of the commits weren't
strictly deletion

Delete a lot of #if 0 code in libressl.

There are a few instances where #if 1 is removed but the code remains.

Based on the following OpenSSL commits. Some of the commits weren't
strictly deletions so they are going to be split up into separate commits.

6f91b017bbb7140f816721141ac156d1b828a6b3
3d47c1d331fdc7574d2275cda1a630ccdb624b08
dfb56425b68314b2b57e17c82c1df42e7a015132
c8fa2356a00cbaada8963f739e5570298311a060
f16a64d11f55c01f56baa62ebf1dec7f8fe718cb
9ccc00ef6ea65567622e40c49aca43f2c6d79cdb
02a938c953b3e1ced71d9a832de1618f907eb96d
75d0ebef2aef7a2c77b27575b8da898e22f3ccd5
d6fbb194095312f4722c81c9362dbd0de66cb656
6f1a93ad111c7dfe36a09a976c4c009079b19ea1
1a5adcfb5edfe23908b350f8757df405b0f5f71f
8de24b792743d11e1d5a0dcd336a49368750c577
a2b18e657ea1a932d125154f4e13ab2258796d90
8e964419603d2478dfb391c66e7ccb2dcc9776b4
32dfde107636ac9bc62a5b3233fe2a54dbc27008

input + ok jsing@, miod@, tedu@

show more ...


# b6ab114e 11-Jul-2014 jsing <jsing@openbsd.org>

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need t

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@

show more ...


# a8913c44 10-Jul-2014 jsing <jsing@openbsd.org>

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 7376aa73 09-Jul-2014 bcook <bcook@openbsd.org>

remove unused, private version strings except SSL_version_str

Also remove unused des_ver.h, which exports some of these strings, but is not installed.

ok miod@ tedu@


# c3d6a26a 12-Jun-2014 deraadt <deraadt@openbsd.org>

tags as requested by miod and tedu


# 0b1e3033 30-May-2014 deraadt <deraadt@openbsd.org>

more: no need for null check before free
ok tedu guenther


# 23438649 22-May-2014 miod <miod@openbsd.org>

if (x) free(x) -> free(x); semantic patch generated with coccinelle, carefully
eyeballed before applying. Contributed by Cyril Roelandt on tech@


# c492f829 17-May-2014 tedu <tedu@openbsd.org>

does sunos not have memmove? sorry, i guess sunos will not have libressl.
ok guenther miod


# ac216665 17-May-2014 tedu <tedu@openbsd.org>

simple reallocarray to check multiplies. ok guenther


# 1ae1a380 20-Apr-2014 jsing <jsing@openbsd.org>

KNF.


# 6f3a6cb1 17-Apr-2014 beck <beck@openbsd.org>

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


12