Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation #30

Merged
merged 28 commits into from
Jun 19, 2016
Merged

Validation #30

merged 28 commits into from
Jun 19, 2016

Conversation

vanrein
Copy link

@vanrein vanrein commented Jun 19, 2016

This is a first release of the validation framework. Please note GitHUB issues #27, #28 and #29 that detail functionality yet to be implemented or tested.

vanrein and others added 28 commits May 11, 2016 22:55
* Added initial, synchronous validexp responders in starttls.c
* Added generic, synchronous support for online querying in new file online.c
 - dns_ip_xxx() for retrieval of AAAA and A records from DNS or DNSSEC
 - dns_srv_xxx() for retrieval of SRV records from DNS or DNSSEC
 - dns_tlsa_xxx() for retrieval of TLSA records from DNSSEC
 - ldap_connect_xxx() to connect to an LDAP server
 - ldap_getattr_xxx() to retrieve a named attribute from LDAP
 - ldap_attrcmp_eval() for a binary check with an LDAP attribute
Current issues:
 - no ldap_start_tls() used yet
 - DANE records are retrieved, but not checked against anything yet
 - LDAP compilation against RFC 1823 is partly deprecated
 - only certusage 1,3 because for now only the end cert is supplied
 - only selector 0    because for now the certificate   is just a blob
 - only matchtype 0   because for now external hashing  is a dependency
 - Can now support both hashes that were  defined in RFC 6698
 - Can now support all forms of certusage defined in RFC 6698
 - Can now support all forms of selector  defined in RFC 6698
 - Can now support all forms of matchtype defined in RFC 6698
Profiles are linked data structures that explain how to validate online.
The components defined by preceding commits were meant to be used here.
The online_run_profile() is meant for this, and called with the top profile.
… DANE)

 --> Note on DANE: This requires doing starttls() on the LDAP connection,
     in a way that collects the server certificate for checking.  There is
     no facility to do this in the LDAP API, AFAIK.  We may however pass it
     through an internal procedure and check this later on.
…d PGP

Note that PGP code is in its infancy, it will compare pubkeys binary, which
is a gross distortion to what is really needed: recognising pubkey blocks,
and possibly withdrawal signals.
 - PGP message parsing (new formats only)
 - Mapping radix64 to binary while going through it
 - download PGP keys from LDAP (which is radix64-encoded)
 - compare to binary provided PGP key (as GnuTLS would do)
 - verify key equivalence _and_ revocation absense in key block
 - use this in the online.c profile of online_globaldir_pgp_profile
 - do all this throught the online_globaldir_pgp() routine
 - incorporated the routine call in test/onlinecheck.c
 - automated this as part of test/Makefile
Also, valexp handling in starttls.c is, though still with replicated code
 - root X.509 certs, for clients as well as servers, test-ca and -flying-signer
 * Not yet tested (or even run)
 * DONE: 2ND: Either add `remote_flags` or remove chains without any root cert
 * DONE: Setup `remote_cert_raw` in `fetch_remote_credentials()`
 * DONE: Reference `remote_cert_raw` from cmd (use in `valexp_`{`Oo`,`Gg`}`_start`)
 * DONE: Validation expression predicates can use `cmd->remote_xxx`
 * DONE: Make adjustments in `valexp_Tt_start` for correct handling of self-signed etc.
 * DONE: Cleanup `cmd->remote_xxx` when done with `starttls_thread()` + takeover
 * DONE: Invoke validation expression logic
Not all the work has been done yet:
 * DEFER: Load a PGP key ring for validation under `valexp_Tt_start()`
 * DEFER: Process `SIGUSR1` by re-reading the PGP key ring, and possibly more
 * DEFER: Process `valexp_Dd_start()` with an `online.c` profile
 * DEFER: Consider taking the validation expression out of the `disclose.db`
Link to DoNAI definition for user friendlyness
 - The valexp logic has been implemented and integrated properly
 - The gnutls_validate() functionality is no longer statically run
 - Files issues #27 #28 #29 on GitHUB, with unfinished work
@vanrein vanrein merged commit 5a62066 into master Jun 19, 2016
@vanrein vanrein deleted the validation branch June 19, 2016 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants