| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
discussed with jsing
|
|
|
|
|
|
|
|
|
| |
This is slightly asymmetric with EC_POINT_point2bn() and different from
the other "print" functions since it has to deal with the asymmetry
between BN_bin2bn() and BN_bn2bin() and allocate itself. Still, we can
make this substantially shorter than it previously was.
ok jsing
|
|
|
|
|
|
| |
This can do the reverse dance: chain BN_hex2bn() with EC_POINT_bn2point().
ok jsing
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of doing everything by hand, this can use EC_POINT_point2bn()
and chain it with BN_bn2hex(), slashing the number of lines in half.
This removes one of the ten remaining "01234567890ABCDEF" strings from
libcrypto. Unfortunately, none of the nine others is used in an API that
could convert the octet string directly, so we use that ugly detour via
a bignum. Still it's better than what was there.
ok jsing
|
|
|
|
|
|
|
|
|
| |
While it makes little sens to place either one of the uncompressed, the
compressed or the hybrid X9.62 octet string encoding of an elliptic curve
point into a BIGNUM, it is what this API does. It's ec_point_to_octets()
followed by BN_bin2bn().
ok jsing
|
|
|
|
| |
It doesn't currently need ec_local.h, but it will soon, so leave it there.
|
| |
|
|
|
|
|
|
| |
(part 2 of commit)
ok jsing@
|
|
|
|
|
|
|
|
| |
Purely cosmetic change taking into account the fact that this function
returns a length rather than a boolean. This is the last offender in the
library.
ok jsing
|
|
|
|
|
|
|
|
|
|
| |
Rather than sometimes clearing, turn the free functions into ones that
always clear (as we've done elsewhere). Turn the EC_GROUP_clear_free() and
EC_POINT_clear_free() functions into wrappers that call the *_free()
version. Do similar for the EC_METHOD implementations, removing the
group_clear_finish() and point_clear_finish() hooks in the process.
ok tb@
|
|
|
|
|
|
|
| |
BN_clear_free() is a wrapper that calls BN_free() - call BN_free() directly
instead.
ok tb@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Dealing with elliptic curves makes some people think that it would be kind
of neat to multiply types with variable names. Sometimes. Only in function
definitions.
|
|
|
|
|
| |
EC_POINT_point2oct so that later allocation does not overflow
with miod
|
|
|
|
| |
ok miod
|
| |
|
|
|
|
| |
ok miod
|
| |
|
|
|
|
|
|
|
|
| |
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free
|
|
|