| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok tb@
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a negative n is passed, these functions would underrun the bitstring's
data array. So add checks for that and drop spades of unnecessary parens.
These functions are quite broken anyway. The setter attempts to zap the
unnecessary trailing zero octets, but fails to do so if the bit being
cleared isn't already set. Worse is the getter where you can't tell an
error (like attempting an out-of-bounds read) from the bit being unset.
ok joshua
|
|
|
|
|
|
|
|
|
| |
This removes ASN1_BIT_STRING_name_print(), ASN1_BIT_STRING_{num,set}_asc().
Before trust was properly handled using OIDs, there was a period where it
used bit strings. The actual interfaces used in openssl x509 were removed,
but the functions they wrapped remained unused for the next 24 years.
ok jsing
|
|
|
|
|
|
|
|
| |
This was added with the TS code for no discernible reason. I could not
find a single consumer. In the unlikely event that you need this, it is
easy enough to write a better version of it yourself.
ok jsing
|
|
|
|
| |
ok jsing@
|
|
|
|
|
|
|
|
|
|
| |
If an ASN.1 BIT STRING a of length > 0 contains only zero bytes in a->data,
this old code would end up reading from a->data[-1]. This may or may not
crash. Luckily, anton observed two openssl-ruby regress test failures in
the last few days, which could eventually be traced back to this (after a
lot of painful digging due to coredumps not working properly).
ok jsing
|
|
|
|
|
|
|
|
|
| |
If the length of the bitstring is INT_MAX, adding 1 to it is undefined
behavior, so error out before doing so.
Based on BoringSSL eeb3333f by davidben
ok beck joshua
|
|
|
|
|
|
| |
Should have been part of a previous commit.
ok jsing
|
|
|
|
| |
ok inoguchi@ tb@
|
|
|
|
|
|
|
|
|
| |
Also switch to freeing and allocating, rather than attempting to recycle.
While here, factor out the flags ASN1_STRING_FLAG_BITS_LEFT bit bashing
and use the name "unused bits" rather than "bits left", to be more inline
with X.690 wording.
ok inoguchi@ tb@
|
|
|
|
|
|
|
| |
Where an ASN.1 type has its own file, move the ASN.1 item template and
template related functions into the file.
Discussed with tb@
|
|
|
|
| |
No functional change.
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zap a memset that was redundant since OpenSSL 0.97b was merged by
markus in 2003. Nowadays it's otto's recallocarray(3) that does the
zeroing.
ok beck inoguchi otto
PS: ASN1_BIT_STRING_set_bit(3) was committed on Dec 21 1998 by Ralf S.
Engelschnall and used this bizarre allocation idiom:
if (a->data == NULL)
c=(unsigned char *)Malloc(w+1);
else
c=(unsigned char *)Realloc(a->data,w+1);
People complained about Malloc, Realloc and Free being used elsewhere, so
on Jun 1 2000, Richarde Levitte swept the OpenSSL tree and it became this.
if (a->data == NULL)
c=(unsigned char *)OPENSSL_malloc(w+1);
else
c=(unsigned char *)OPENSSL_realloc(a->data,w+1);
Then it was found that existing data should be cleaned, and on Nov 13 2002
Ben Laurie changed the last line to
c=(unsigned char *)OPENSSL_realloc_clean(a->data,
a->length,
w+1);
|
|
|
|
|
|
|
| |
compiler warning by Pavel Kraynyukhov. A similar fix was made in
OpenSSL commit 369e93398b68b8a328e6c1d766222b.
ok inoguchi
|
|
|
|
|
|
|
| |
Also place all of the OPENSSL_* memory related prototypes under #ifndef
LIBRESSL_INTERNAL.
ok beck@ tb@
|
|
|
|
|
|
|
|
|
|
| |
Avoid overloading a variable to store both a value and an error code - we
can simply inline the error calls (as done everywhere else). Remove a bunch
of unnecessary parentheses and tidy a few other things.
With input from tb@.
ok inoguchi@ tb@
|
|
|
|
|
|
|
|
|
| |
This could potentially result in a left shift that exceeded the size of the
storage type.
Issue found by Simon Friedberger, Robert Merget and Juraj Somorovsky.
ok inoguchi@ tb@
|
|
|
|
|
|
|
| |
BIO_f_asn1() will be taken care of later.
Tested in a bulk by sthen
ok bcook jca jsing
|
|
|
|
|
|
| |
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@
|
|
|
|
|
|
| |
ASN1_BIT_STRING_(new|free).
ok beck@ doug@
|
|
|
|
|
|
| |
assembly.
ok bcook@
|
|
|
|
|
| |
not 16-bit MS-DOS anymore.
ok bcook@ tedu@
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
are needed in the source files that actually require them.
ok beck@ miod@
|
| |
|
| |
|
|
|
|
| |
ok tedu guenther
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
new minor for libcrypto (_X509_REQ_print_ex)
tested by miod@, pb@
|
|
|
|
| |
correctly autogenerate obj_mac.h
|
| |
|
| |
|
|
|
|
|
|
| |
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
|
| |
|
|
functionality for shared libs.
Note that routines such as sslv2_init and friends that use RSA will
not work due to lack of RSA in this library.
Needs documentation and help from ports for easy upgrade to full
functionality where legally possible.
|