summaryrefslogtreecommitdiff
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-07-25as noted by Hanno Boeck, using the *check_private_key functions isbenno1-6/+22
tricky, especially since the manpage is full of lies. Try to make readers think twice before using them. With oks and help from schwarze@, tedu@, sthen@, jmc@
2017-07-24Extend the SNI tests to ensure that we have a hostname in the sessionjsing1-2/+31
after a successful tlsext_sni_serverhello_parse() and that tlsext_sni_clienthello_parse() fails if we have an existing session and the SNI is mismatched.
2017-07-24Rewrite and move the last remnants of the ServerHello SNI handling intojsing2-29/+25
tlsext_sni_serverhello_parse(). This also adds a check to ensure that if we have an existing session, the name matches what we specified via SNI. ok doug@
2017-07-24Add regress coverage for the TLS Renegotiation Indication extension.jsing1-1/+266
2017-07-24Rewrite the TLS Renegotiation Indication extension handling using CBB/CBSjsing6-346/+161
and the new extension framework. Feedback from doug@ ok inoguchi@
2017-07-23Hook the TLS extension parsing framework into the serverhello parsing.jsing1-1/+6
Missed in the original commit.
2017-07-22zap trailing whitespace;jmc1-2/+2
2017-07-22rework the page a bit, clarify a few things, maybe better wordingtedu1-8/+13
2017-07-20Allow leading . in nameConstraints. from openssl via jabberwock. ok jsingtedu1-2/+2
2017-07-19Check the return value of CBB_init_fixed(), since it can fail.jsing1-3/+5
2017-07-16Provide a new regress test for TLS extension handlers, currently coveringjsing3-1/+256
the newly converted SNI code.
2017-07-16Start rewriting TLS extension handling.jsing4-141/+328
Introduce a TLS extension handling framework that has per-extension type functions to determine if an extension is needed, to build the extension data and parse the extension data. This is somewhat analogous to BoringSSL, however these build and parse functions are intentionally symetrical. The framework is hooked into the existing TLS handling code in such a way that we can gradual convert the extension handling code. Convert the TLS Server Name Indication extension to the new framework, while rewriting it to use CBB/CBS and be more strict in the process. Discussed with beck@ ok inoguchi@
2017-07-15grammar was ass backwards;jmc1-7/+7
2017-07-15Remove unused variable.jsing1-3/+3
Reported by <dravion at ht-foss dot net>
2017-07-15Add a "-T tlscompat" option to nc(1), which enables the use of all TLSjsing2-5/+12
protocols and "compat" ciphers. This allows for TLS connections to TLS servers that are using less than ideal cipher suites, without having to resort to "-T tlsall" which enables all known cipher suites. Diff from Kyle J. McKay <mackyle at gmail dot com> ok beck@
2017-07-15Add a test that covers the recently fixed "0x" prefix handling issue.jsing1-1/+2
2017-07-10remove misc. depend and yacc nits that no longer matter.espie1-2/+1
okay millert@
2017-07-10one more instance of the previous commit; also initialize ->offset to aotto1-2/+3
definite value in the size == 0 case
2017-07-09remove redundant variable declarations in Makefiles, since those arelibressl-v2.6.0espie1-2/+1
the default. okay millert@
2017-07-08update the little endian processor list to give it a chance of matchingtedu2-6/+6
what the reader is using.
2017-07-08Run malloc0test with all possible malloc options.bluhm1-1/+7
2017-07-07Only access offset if canaries are enabled *and* size > 0, otherwise offsetotto1-2/+2
is not initialized. Problem spotted by Carlin Bingham; ok phessler@ tedu@
2017-07-06Document tls_config_set_crl_file() and tls_config_set_crl_mem().jsing1-3/+30
Based on a diff from Jack Burton <jack at saosce dot com dot au>, thanks!
2017-07-06Bump minor due to symbol addition.jsing1-1/+1
2017-07-06Add support for providing CRLs to libtls - once a CRL is provided wejsing5-4/+67
enable CRL checking for the full certificate chain. Based on a diff from Jack Burton <jack at saosce dot com dot au>, thanks! Discussed with beck@
2017-07-06The 0x (or 0X) prefix in base 16 is optional so only skip over themillert6-18/+18
prefix if the character following it is a valid hex char. The C99 standard is clear that given the string "0xy" zero should be returned and endptr set to point to the "x". OK deraadt@ espie@
2017-07-06fix broken cross references; found with mandoc -Tlintschwarze3-43/+8
2017-07-05RFC 6066 states that IP literals are not permitted in "HostName" for ajsing1-3/+9
TLS Server Name extension, however seemingly several clients (including Python, Ruby and Safari) violate the RFC. Given that this is a fairly widespread issue, if we receive a TLS Server Name extension that contains an IP literal, pretend that we did not receive the extension rather than causing a handshake failure. Issue raised by jsg@ ok jsg@
2017-07-05nits about trailing punctuation found with mandoc -Tlintschwarze1-4/+4
2017-07-05void functions don't return 0tb1-6/+2
From Klemens Nanni
2017-07-05fix cross references to self; found with mandoc -Tlintschwarze4-13/+12
2017-06-28.init stub creation doesn't need a jmp + .align to reach a branch target,deraadt1-3/+0
just fall into the code. The .align created a FILL zone in the .init section, which on i386 was filled with a NOP-sled, something we want to get away from. discussed with kettenis and tom
2017-06-22Use the tls_password_cb() callback with all PEM_read_bio_*() calls, so thatjsing4-11/+14
we can prevent libcrypto from going behind our back and trying to read passwords from standard input (which we may not be permitted to do). Found by jsg@ with httpd and password protected keys.
2017-06-22Fix incorrect indentation.jsing1-2/+2
2017-06-22Plug a memory leak in tls_keypair_cert_hash(), introduced in r1.60.jsing1-1/+3
2017-06-22Remove dead code that has remained hiding since ressl.c r1.14!jsing1-4/+1
2017-06-22Use the standard `rv' idiom in tls_keypair_load_cert(), rather thanjsing1-5/+4
duplicating clean up code.
2017-06-22Distinguish between self-issued certificates and self-signed certificates.jsing2-30/+40
The certificate verification code has special cases for self-signed certificates and without this change, self-issued certificates (which it seems are common place with openvpn/easyrsa) were also being included in this category. Based on BoringSSL. Thanks to Dale Ghent <daleg at elemental dot org> for assisting in identifying the issue and testing this fix. ok inoguchi@
2017-06-19port the RBT code to userland by making it part of libc.dlg1-10/+11
src/lib/libc/gen/tree.c is a copy of src/sys/kern/subr_tree.c, but with annotations for symbol visibility. changes to one should be reflected in the other. the malloc debug code that uses RB code is ported to RBT. because libc provides the RBT code, procmap doesn't have to reach into the kernel and build subr_tree.c itself now. mild enthusiasm from many ok guenther@
2017-06-16mark files as BUILDFIRST, or write explicit dependencies, so that mostespie1-1/+2
programs will build even without a make depend first. okay tb@ millert@
2017-06-11Continue the flattening of the pledge logic started in r1.184 and placetb1-8/+8
a blank space somewhere else. suggested by and ok jsing
2017-06-11Simple style(9) fixes from Juuso Lapinlampi, mostly whitespace andtb1-33/+35
omitting parentheses in return statements. Binary change because of return instead of exit(3) from main and because help() is now __dead. ok awolk
2017-06-10If -P and -c were given, a second pledge call tried to add "rpath" to thetb1-8/+5
first pledge promises, so nc exited with EPERM. To fix this, merge the pledge of the Pflag && usetls case into the first pledge block. This allows us to get rid of the second pledge block and thus to simplify the logic a bit. While there, add a missing blank to an error string. Joint effort by the #openbsd-daily code reading group, problem found and initial patch by <rain1 openmailbox org>. ok awolk
2017-06-10fix broken markup of callback arguments; found with mandoc -Tlintschwarze2-11/+8
2017-06-10repair broken markup of callback argument; found with mandoc -Tlintschwarze1-5/+3
2017-05-30Don't fall back to heapsort() if we would otherwise switch tomillert1-7/+7
insertion sort (when the number of elements is < 7).
2017-05-29Randomize link-order of libcrypto as we do with libc. This libraryderaadt1-1/+2
has many small functions without significant local storage, therefore less tail protection from -fstack-protector-strong to prevent their use as ROP gadgets. It is used in security contexts. Also many functions dribble pointers onto the stack, allowing discovery of gadgets via the fixed relative addresses, so let's randomly bias those. ok tedu jsing The rc script will soon need a strategy for skipping this step on machines with poor IO performance. Or maybe do it less often? However, I don't see many more libraries we'll do this with, these are the two most important ones.
2017-05-27Also test arrays of double and long long.millert1-142/+421
2017-05-26Synchronise chacha test cases with the referenced draft - this adds ajsing1-23/+23
missing test case, reassigns two of the labels and removes a test case that was from an earlier draft. Inconsistency noted by Steven Roberts <fenderq at gmail dot com>, some time ago...
2017-05-26Avoid a potential NULL pointer dereference in d2i_ECPrivateKey().jsing1-1/+7
Reported by Robert Swiecki, who found the issue using honggfuzz. ok bcook@