boringssl/crypto
Adam Langley 62882187c9 Update comments to better document in-place semantics.
(Comment-only change; no functional difference.)

Some code was broken by the |d2i_ECDSA_SIG| change in 87897a8c. It was
passing in a pointer to an existing |ECDSA_SIG| as the first argument
and then simply assuming that the structure would be updated in place.
The comments on the function suggested that this was reasonable.

This change updates the comments that use similar wording to either note
that the function will never update in-place, or else to note that
depending on that is a bad idea for the future.

I've also audited all the uses of these functions that I can find and,
in addition to the one case with |d2i_ECDSA_SIG|, there are several
users of |d2i_PrivateKey| that could become a problem in the future.
I'll try to fix them before it does become an issue.

Change-Id: I769f7b2e0b5308d09ea07dd447e02fc161795071
Reviewed-on: https://boringssl-review.googlesource.com/6902
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2016-01-19 17:01:37 +00:00
..
aes
asn1 Remove ASN1_R_MALLOC_FAILURE. 2015-12-22 00:12:24 +00:00
base64
bio
bn Fix a ** 0 mod 1 = 0 for real this time. 2015-12-22 23:30:22 +00:00
buf
bytestring Rewrite ssl3_send_server_key_exchange to use CBB. 2015-12-22 17:23:58 +00:00
chacha
cipher Remove the stitched RC4-MD5 code and use the generic one. 2015-12-16 23:57:42 +00:00
cmac
conf
curve25519 Rename the curve25519 precomputed tables. 2016-01-15 19:51:05 +00:00
des
dh
digest Fix build. 2015-12-16 21:26:12 +00:00
dsa Fix memory leak in DSA redo case. 2015-12-16 21:17:09 +00:00
ec Slightly tweak some array allocations. 2015-12-16 21:19:32 +00:00
ecdh
ecdsa Remove a trailing ^M (DOS newline). 2016-01-16 04:08:14 +00:00
engine
err Remove ASN1_R_MALLOC_FAILURE. 2015-12-22 00:12:24 +00:00
evp Update comments to better document in-place semantics. 2016-01-19 17:01:37 +00:00
hkdf
hmac
lhash
md4
md5
modes
obj Allocate a NID for X25519. 2015-12-22 18:56:53 +00:00
pem Resolve a few old TODOs. 2015-12-22 00:14:35 +00:00
perlasm Fix arm perlasm trailing newline. 2016-01-19 16:35:20 +00:00
pkcs8
poly1305
rand
rc4 Remove the stitched RC4-MD5 code and use the generic one. 2015-12-16 23:57:42 +00:00
rsa Fix bits vs. bytes confusion in RSA encryption. 2016-01-13 22:28:54 +00:00
sha
stack
test
x509 Resolve a few old TODOs. 2015-12-22 00:14:35 +00:00
x509v3
CMakeLists.txt
constant_time_test.c
cpu-arm-asm.S
cpu-arm.c
cpu-intel.c
crypto.c
directory_posix.c
directory_win.c
directory.h
ex_data.c
internal.h
mem.c
refcount_c11.c
refcount_lock.c
refcount_test.c
thread_none.c
thread_pthread.c
thread_test.c
thread_win.c
thread.c
time_support.c