summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/recallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-10-23Provide a way to determine our maximum legacy version.jsing7-57/+62
With the introduction of TLSv1.3, we need the ability to determine our maximum legacy version and to track our peer's maximum legacy version. This is needed for both the TLS record layer when using TLSv1.3, plus it is needed for RSA key exhange in TLS prior to TLSv1.3, where the maximum legacy version is incorporated in the pre-master secret to avoid downgrade attacks. This unbreaks RSA KEX for the TLS client when the non-version specific method is used with TLSv1.0 or TLSv1.1 (clearly no one does this). ok tb@
2021-10-23Add a regress test for TLS client/server.jsing3-1/+496
This currently exercises various combinations of TLS versions and their associated key exchange mechanisms. Note that this currently fails for TLSv1.0/TLSv1.1 with RSA KEX (to be fixed shortly). Over time all of the ssl regress should be moved into the dtls and tls regress tests.
2021-10-23tweak previous: add missing OpenBSD CVS tagschwarze1-4/+5
and fix some weird typos in comments (duplicate '@' signs)
2021-10-23Remove unused fields from struct dtls1_retransmit_state.jsing1-3/+1
2021-10-23Fold DTLS1_STATE_INTERNAL into DTLS1_STATE.jsing8-171/+154
Now that DTLS1_STATE is opaque, fold DTLS1_STATE_INTERNAL back into DTLS1_STATE and remove D1I() usage. ok tb@
2021-10-23tweak previous: properly mark up function pointer typedefschwarze1-6/+18
plus .Dv NULL, SEE ALSO, HISTORY
2021-10-23Prepare to make many of the structs in x509.h opaque.tb1-76/+86
ok beck jsing
2021-10-23Change ssl_verify_cert_chain() for compatibility with opaquetb1-16/+19
X509_STORE_CTX and use accessors instead of reaching directly into the struct. ok jsing
2021-10-23Use X509_STORE_CTX_get0_chain() instead of grabbing the chain directlytb2-4/+4
out of the X509_STORE_CTX. ok jsing
2021-10-23Revise regress test for tls13_buffer rename.jsing1-14/+16
2021-10-23Rename tls13_buffer to tls_buffer.jsing7-69/+111
This code will soon be used in the DTLSv1.2 and TLSv1.2 stack. Also introduce tls_internal.h and move/rename the read/write/flush callbacks. ok beck@ tb@
2021-10-23Stop reaching into structs that will become opaque in ca.ctb1-5/+3
"just commit it" beck
2021-10-23Prepare to provide X509_re_X509*_tbs()tb4-4/+35
ok beck jsing
2021-10-23Prepare to provide X509_get_extension_flags()tb2-2/+13
ok beck jsing
2021-10-23Add SSL_CTX_set_keylog_callback and SSL_CTX_get_keylog_callbackbeck5-4/+67
Some things in ports care about calling these functions. Since we will not provide private key logging functionality they are documented as being for compatibility and that they don't do anything. ok tb@
2021-10-23Prepare to provide X509_SIG_get{0,m}.tb2-2/+28
ok beck jsing
2021-10-23Nuke the asn1-kludge. This was a workaround for CAs with broken PCKS#10tb2-35/+5
encoders many moons ago. OpenSSL removed it in 2015. ok beck jsing
2021-10-23Add back the fips mode test functions, new stuff requires this.beck3-3/+83
Symbols.list changes to follow with tb's upcoming bump ok jsing@
2021-10-23Untangle ssl3_get_message() return values.jsing6-166/+139
This function currently has a long return type that may be <= 0 on error/retry (which is then cast to an int in order to return it up the stack), or it returns the length of the handshake message (on success). This obviously means that 0 can be returned for both success and failure, which is the reason why a separate 'ok' argument has to exist. Untangle this mess by changing the return value to an int that indicates success (1) or error/retry (<= 0). The length never needs to actually be returned as it is already stored in s->internal->init_num (which is where the return value is read from anyway). ok tb@
2021-10-23Revise regress for tlsext_tick_lifetime_hint changing type.jsing1-2/+2
2021-10-23Add a length check before NUL-terminating target. From Jonas Termansen.tb1-1/+5
ok jsing
2021-10-23Change tlsext_tick_lifetime_hint to uint32_t.jsing4-17/+11
Now that SSL_SESSION is opaque, change tlsext_tick_lifetime_hint from long to uint32_t (matching RFC4507), rather than continuing to work around an inappropriate type choice. ok tb@
2021-10-22Prepare to provide X509_get_{extended_,}key_usage()tb2-2/+32
ok beck jsing
2021-10-22Switch from u_int and u_char to u32 and u8 to avoid portability issues.tb1-17/+14
Prompted by a diff by Jonas Termansen. ok jsing
2021-10-22Prepare to provide X509_REQ_pubkey_get0()tb2-2/+13
ok jsing
2021-10-22new manual page EVP_PKEY_add1_attr(3) documenting nine functionsschwarze7-8/+202
for associating X.501 Attributes with private keys
2021-10-22new manual page X509at_add1_attr(3)schwarze4-6/+140
describing five functions to change arrays of X.501 Attribute objects
2021-10-22fix a gratuitiously different argument nameschwarze1-3/+3
2021-10-22new manual page X509at_get_attr(3)schwarze3-4/+163
documenting five X.501 Attribute read accessors
2021-10-22Put back sys/types.h and sys/socket.h. The latter was unintentionallytb1-1/+3
removed and the former is still needed, as pointed out by kettenis
2021-10-22Fix some ghastly whitespace. From Martin Vahlensiecktb1-6/+6
2021-10-22Use unsigned char instead of u_char in base64.c. This is a mildtb1-9/+6
portability annoyance since not all systems have u_char. Remove the now unused includes sys/types.h and stdio.h. u_char diff from Jonas Termansen ok deraadt
2021-10-22Garbage collect an unused variable.tb1-4/+2
2021-10-22Stop setting enc.modified manually. It's no longer needed.tb2-4/+2
2021-10-21Simplify the description of RETURN VALUES.schwarze1-10/+4
After tb@'s commit x509/x509_lu.c rev. 1.33, it is no longer necessary to talk about X509_LU_* constants as return values from these functions. Feedback and OK from tb@.
2021-10-21Simplify a return value check for X509_STORE_get_by_subject() nowtb1-18/+7
that we know that it only returns 0 or 1. Eliminate the last uses of X509_LU_{FAIL,RETRY}. ok jsing
2021-10-21Set enc.modified if the X509_REQ is going to be modified.tb1-1/+4
ok jsing
2021-10-21new manual page X509_ATTRIBUTE_set1_object(3)schwarze4-6/+276
documenting five X.501 Attribute write accessors
2021-10-21Sync parts of X509_STORE_get_by_subject() with OpenSSLtb1-13/+7
Initialize stmp.type and stmp.data.ptr so that a user-defined lookup method need not take responsibility of initializing those. Get rid of current_method, which was never really used. Stop potentially returning a negative value since most callers assume Boolean return values already. In addition, garbage collect the pointless j variable. ok jsing
2021-10-21Prepare to make X509 opaque.tb1-4/+7
ok jsing
2021-10-21libtls: Don't reach into X509_STORE_CTX.tb1-12/+20
ok jsing
2021-10-21Switch from X509_VERIFY_PARAM_set_flags() to X509_STORE_set_flags().tb1-2/+2
This reduces the number of reacharounds into libcrypto internals. ok jsing
2021-10-21Add XKU_ANYEKU #define and use it to cache the anyExtendedKeyUsagetb2-3/+8
extension. This is part of OpenSSL commit df4c395c which didn't make it into our tree for some reason. ok jsing
2021-10-21Prepare to provide X509_get_X509_PUBKEY() as a function.tb2-5/+15
ok jsing
2021-10-21Bump to LibreSSL 3.5.0tb1-3/+3
2021-10-21Eliminate a dead assignment and a weird cast. Adjust a comment totb1-6/+3
reality while there. ok jsing
2021-10-21Print uid with %u instead of %i.tb1-2/+2
Prompted by a diff by Jonas Termansen, discussed with deraadt, millert ok jsing
2021-10-21Use *printf %d instead of %itb1-2/+2
ok jsing
2021-10-21Avoid potential NULL dereferences in dtls1_free()tb1-2/+7
ok jsing
2021-10-20document ASN1_STRING_set_by_NID(3)schwarze2-5/+129
and the three functions related to the global mask