enarx-archive / tlssock

A library exposing TLS/DTLS sockets using the POSIX networking APIs
Apache License 2.0
18 stars 7 forks source link

GSSAPI support #26

Open frozencemetery opened 5 years ago

frozencemetery commented 5 years ago

(This is based on the branch in #24. I recommend merging that first.)

You might notice that the GSSAPI test suite doesn't currently run Travis. I want to emphasize that they do pass - if you provide a keytab and ccache.

While I could fix Travis to run the tests (just populate a ccache and a keytab), the problem is surprisingly difficult to resolve in a generic way that doesn't involve going around meson. Meson's tests want to run in parallel, but also without ordering guarantees, and most frustratingly: without an understanding of infrastructure state. Simply put, there's no way to stand up a KDC from test() that can be shared between processes.

This is why the random port selection has to happen, and it's why run.c is a huge C file that performs job control rather than a short script.

My suggestion is to migrate to an external test driver - a python script, for instance. If you must use meson test, then call out to the driver from test(). But since meson seems unable to figure out when the list of tests to be run has changed (try changing the foreach 4/6 loop into just one or the other, and note that it doesn't register a change - even when meson reconfigure is run), I don't think I'd even do that.

If you have alternate suggestions for how to test that don't involve me (1) rewriting the test suite or (2) adding further job control to run.c, I'm willing to try them. But I've already burned two days trying to get this to work and I'm kind of done.

npmccallum commented 5 years ago

@frozencemetery Can you rebase this? Thanks!

frozencemetery commented 5 years ago

Rebased. Thanks for merging #24.

codecov-io commented 5 years ago

Codecov Report

Merging #26 into master will decrease coverage by 0.64%. The diff coverage is 67.6%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
- Coverage   64.87%   64.23%   -0.65%     
==========================================
  Files          13       13              
  Lines        1170     1191      +21     
==========================================
+ Hits          759      765       +6     
- Misses        411      426      +15
Impacted Files Coverage Δ
bin/main.c 65.97% <14.28%> (-5.57%) :arrow_down:
bin/opt.c 35.38% <25%> (-0.69%) :arrow_down:
lib/tlssock.c 44.51% <62.5%> (+0.68%) :arrow_up:
lib/idx.c 75.71% <94.59%> (+0.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 72f2c71...c7761aa. Read the comment docs.

frozencemetery commented 5 years ago

My intent was to spark discussion about the idx code, not trigger a re-evaluation of priorities. It's not too hard to share it - I've updated the PR with one way we can accomplish this.

Also added handshake sockopts as requested.