summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/recallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-08-27Dedup DTLS header writing code and convert to CBB.jsing1-25/+35
There are three versions of the DTLS header writing code, which primarily differ by the fragment offset and fragment length values that differ. Rework dtls1_write_message_header() such that it can be used in all three cases and convert it to CBB in the process. ok inoguchi@ tb@
2018-08-27Add some missing statics.jsing2-5/+5
2018-08-27Simplify new session ticket encoding/generation.jsing3-84/+90
The original code did a crazy encode/malloc/encode/decode/modify/encode dance, in order to encode a session in the form needed to encrypt then add to a session ticket. By modifying the encoding functions slightly, we can do this entire dance as a single encode. Inspired by similar changes in BoringSSL. ok inoguchi@ tb@
2018-08-27Fix formatting and grammatical issues with the description of how to usejsing1-19/+17
i2d_SSL_SESSION. Also rework the example code so that it is clearer and uses more appropriate names. Input from and ok schwarze@, tb@
2018-08-27Add protocol and cipher patterns in regress appstest.shinoguchi1-18/+88
2018-08-26fix the same "an non" issue found by tb in EVP_EncryptInit.3;jmc1-3/+3
2018-08-26Check return value of EVP_CipherInit_ex()tb1-6/+15
2018-08-26Run Wycheproof AES-CBC-PKCS5 testvectors against libcrypto.tb1-1/+189
2018-08-26Remove some redundant info from log.Fatalftb1-2/+2
2018-08-26simplify returned valuetb1-2/+2
2018-08-26Some of the functions in this manual need <openssl/dsa.h>, otherstb1-3/+45
need <openssl/x509.h>. The functions {d2i,i2d}_DSA_params_{bio,fp}(3) were missing from the manual, so document them. The return values of the i2d_* functions are left undocumented, as these still need to be audited. ok schwarze (lots of input and help as usual)
2018-08-26typo: an nonce -> a noncetb1-3/+3
2018-08-26Stop s_server if error occurs in regress appstest.shinoguchi1-4/+13
2018-08-25Also run DSA tests with the PEM encoded public key.tb1-2/+22
2018-08-24update usage for pkcs8;jmc1-10/+9
ok tb
2018-08-24tweak previous;jmc1-3/+3
2018-08-24crank majors after symbol addition/modification/removaltb3-6/+6
2018-08-24Adjust documentation for SSL_copy_session_id()tb1-8/+7
ok jsing
2018-08-24Let SSL_copy_session_id() return an int for error checking.tb3-28/+31
Accordingly, add some error checking to SSL_copy_session_id(), BIO_ssl_copy_session_id(), and SSL_dup(). Prompted by OpenSSL commit 17dd65e6e1f Tested in a bulk build by sthen ok jsing
2018-08-24Add const to EVP_PKCS82PKEY().tb2-4/+4
tested in a bulk by sthen ok jsing
2018-08-24Add consts to EVP_PKEY_asn1_set_private()tb8-16/+16
Requires adding a const to the priv_decode() member of EVP_PKEY_ASN1_METHOD and adjusting all *_priv_decode() functions. All this is already documented this way. tested in a bulk build by sthen ok jsing
2018-08-24After removing support for broken PKCS#8 formats (it was high time),tb7-22/+19
we can add const to PKCS8_pkey_get0(). In order for this to work, we need to sprinkle a few consts here and there. tested in a bulk by sthen ok jsing
2018-08-24The broken pkcs8 formats generated by openssl pkcs -{embed,nooct,nsdb}tb1-22/+2
are no longer supported. Remove their documentation. ok jsing
2018-08-24Stop handling broken PKCS#8 formats in openssl(1).tb1-52/+2
ok jsing
2018-08-24Remove EVP_PKEY2PKCS8_broken() and PKCS8_set_broken()tb5-98/+46
Provide PKCS8_pkey_add1_attr_by_NID() and PKCS8_pkey_get0_attrs(). Remove the whole broken code and simplify pkcs8_priv_key_info_st accordingly. Based on OpenSSL commit 54dbf42398e23349b59f258a3dd60387bbc5ba13 plus some const that was added later. tested in a bulk build by sthen ok jsing
2018-08-24Document const change for OCSP_cert_to_id()tb1-4/+4
ok jsing
2018-08-24Add const to two arguments of OCSP_cert_to_id()tb2-6/+7
tested in a bulk by sthen ok jsing
2018-08-24Provide X509_get0_serialNumber()tb3-2/+10
tested in a bulk by sthen ok jsing
2018-08-24Turn a number of #defines into proper functions with prototypes matchingtb5-18/+80
those that OpenSSL has had for ages. ok jsing
2018-08-24Change PEM_Sign{Init,Update}() to return an int.tb2-8/+8
tested in a bulk by sthen ok jsing
2018-08-24Check return value of EVP_EncodeUpdate() in PEM_write_bio().tb1-2/+3
ok jsing
2018-08-24Check return value of EVP_EncodeUpdate() in b64_write().tb1-3/+4
ok jsing
2018-08-24Convert EVP_EncodeUpdate() to return an int to allow for errortb2-8/+10
checking. Matches our documented behavior. Based on OpenSSL commit c5ebfcab713a82a1d46a51c8c2668c419425b387 tested in a bulk by sthen ok jsing
2018-08-24Provide EVP_CIPHER_CTX_encrypting().tb3-2/+10
tested in a bulk by sthen ok jsing
2018-08-24unifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE.jsing2-26/+3
This code has been rotting since 2006. ok bcook@ tb@
2018-08-24Document prototype change and return values for BIO_set_cipher()tb1-3/+5
ok jsing
2018-08-24Return an int in BIO_set_cipher() to be able to report errors.tb2-13/+22
tested in a bulk by sthen ok jsing
2018-08-24In DSO_up_ref(), check return value of CRYPTO_add() and reporttb1-3/+5
failure accordingly. ok jsing
2018-08-24In ENGINE_up_ref(), check return value of CRYPTO_add() and reporttb1-3/+5
failure accordingly. ok jsing
2018-08-24Document new prototype and return values of X509_OBJECT_up_ref_count()tb1-3/+6
ok jsing
2018-08-24Make X509_OBJECT_up_ref_count return an int.tb2-9/+7
Based on OpenSSL commit c5ebfcab713a82a1d46a51c8c2668c419425b387 tested in a bulk by sthen ok jsing
2018-08-24Update documentation of CRYPTO_mem_leaks*.tb1-6/+12
ok jsing
2018-08-24Let CRYPTO_mem_leaks{,_fp,_cb}() return -1.tb2-12/+12
These functions are no-ops. Their signature was changed by OpenSSL to allow error checking. This way we return an error and do not indicate the (non-)existence of memory leaks. tested in a bulk by sthen ok jsing
2018-08-24Simplify session ticket parsing/handling.jsing4-69/+46
The original implementation is rather crazy and means that we effectively have two lots of code that parse a ClientHello and two lots of code that parse TLS extensions. Partially simplify this by passing a CBS containing the extension block through to the session handling functions, removing the need to reimplement the ClientHello parsing. While here standarise on naming for session_id and session_id_len. ok inoguchi@ tb@
2018-08-24Pull up the parsing of a ClientHello.jsing1-20/+20
Parse up until the extensions (if any), then proceed with processing, rather than gradually parsing while processing. This makes the code cleaner, requires messages to be valid before processing and makes way for upcoming changes. ok inoguchi@ tb@
2018-08-24Add my copyright.tb1-1/+2
Discussed with jsing
2018-08-24Remove DSA from TODO list and add RSA-PSS back.tb1-2/+2
2018-08-24Also test DSA with the DER encoded key. Lots of help from jsing, thanks!tb1-1/+27
2018-08-24Clean up handshake message start/finish functions.jsing6-76/+38
Now that all handshake messages are created using CBB, remove the non-CBB ssl3_handshake_msg_start()/ssl3_handshake_msg_finish() functions. Rename the CBB variants by dropping the _cbb suffix. ok bcook@ inoguchi@ tb@
2018-08-23Run our DSA against wycheproof test vectors.tb1-1/+129