History log of /openbsd-src/lib/libtls/tls_util.c (Results 1 – 16 of 16)
Revision Date Author Comments
# e6d77be9 14-May-2023 op <op@openbsd.org>

add missing #include <string.h>; ok tb@


# 718d8d98 16-Aug-2021 tb <tb@openbsd.org>

typo in comment


# 0f235647 13-Apr-2019 tb <tb@openbsd.org>

Null out pointers on asprintf() failure.

These pointers will be passed to free. According to asprintf(3), "on
OpenBSD, ret will be set to the null pointer, but this behavior should
not be relied upo

Null out pointers on asprintf() failure.

These pointers will be passed to free. According to asprintf(3), "on
OpenBSD, ret will be set to the null pointer, but this behavior should
not be relied upon."

ok jsing

show more ...


# a2b2c537 04-Apr-2019 jsing <jsing@openbsd.org>

Only assign destlen when src is non-NULL.

This avoids ever having a non-zero len with a NULL pointer.


# 15ba8e50 08-Feb-2018 jsing <jsing@openbsd.org>

Assert tedu's copyright since some of the code moved here is his.


# bb4cb1b0 08-Feb-2018 jsing <jsing@openbsd.org>

Split keypair handling out into its own file - it had already appeared
in multiple locations.

ok beck@


# 7add217b 05-Feb-2018 jsing <jsing@openbsd.org>

Be consistent with the goto label names used in libtls code.

No change to generated assembly.


# a192468a 22-Jun-2017 jsing <jsing@openbsd.org>

Use the tls_password_cb() callback with all PEM_read_bio_*() calls, so that
we can prevent libcrypto from going behind our back and trying to read
passwords from standard input (which we may not be p

Use the tls_password_cb() callback with all PEM_read_bio_*() calls, so that
we can prevent libcrypto from going behind our back and trying to read
passwords from standard input (which we may not be permitted to do).

Found by jsg@ with httpd and password protected keys.

show more ...


# 54356a5d 06-May-2017 jsing <jsing@openbsd.org>

Use freezero() for the tls_load_file() failure case, since we're
potentially dealing with key material. Also switch a calloc to malloc,
since we immediately copy the same amount of data to the newly

Use freezero() for the tls_load_file() failure case, since we're
potentially dealing with key material. Also switch a calloc to malloc,
since we immediately copy the same amount of data to the newly allocated
buffer.

show more ...


# 55177a38 06-May-2017 jsing <jsing@openbsd.org>

BIO_free_all() and EVP_PKEY_free() can be called with NULL.


# 028ca023 06-May-2017 jsing <jsing@openbsd.org>

Provide a tls_unload_file() function, that frees the memory returned from
a tls_load_file() call, ensuring that it the contents become inaccessible.
This is specifically needed on platforms where the

Provide a tls_unload_file() function, that frees the memory returned from
a tls_load_file() call, ensuring that it the contents become inaccessible.
This is specifically needed on platforms where the library allocators may
be different from the application allocator.

ok beck@

show more ...


# dad7bfe2 04-Nov-2016 jsing <jsing@openbsd.org>

Address some signed vs unsigned warnings and check that an integer value
is positive before passing it to several functions as a size_t.
Additionally, in tls_load_file() there is not much point using

Address some signed vs unsigned warnings and check that an integer value
is positive before passing it to several functions as a size_t.
Additionally, in tls_load_file() there is not much point using calloc(),
when we're immediately reading into the buffer (having an extra byte for
NUL termination seems pointless given the API).

ok beck@ miod@

show more ...


# b97593a4 03-Oct-2016 bcook <bcook@openbsd.org>

use the same type for buf as the return type in tls_load_file

ok tedu@, noted by kinichiro


# 240d3da6 09-Sep-2015 jsing <jsing@openbsd.org>

Indent labels with a space so that diff -p is more friendly.

Requested by bluhm@


# cbcdaa48 07-Feb-2015 reyk <reyk@openbsd.org>

Add tls_load_file() as a helper to load certificates or encrypted keys
into memory. This can be used for tls_config_set_ca_mem(),
tls_config_set_cert_mem() or tls_config_set_key_mem().

With input f

Add tls_load_file() as a helper to load certificates or encrypted keys
into memory. This can be used for tls_config_set_ca_mem(),
tls_config_set_cert_mem() or tls_config_set_key_mem().

With input from jsing@, tedu@ and henning@

OK tedu@

show more ...


# b600beed 31-Oct-2014 jsing <jsing@openbsd.org>

Rename libressl to libtls to avoid confusion and to make it easier to
distinguish between LibreSSL (the project) and libressl (the library).

Discussed with many.