[vlc-devel] [RFC PATCH 0/8] Keystore V2

Thomas Guillem thomas at gllm.fr
Wed Dec 30 19:36:57 CET 2015


News since last patches:
 - vlc_keystore:
   - const char *psz_secret to const uint8_t *p_secret, size_t i_secret_len
   - no more remove/Secret_Load/Secret_Unload: API is simplified
   - use a set of finite key/values instead of a vlc_dictionnary

 - libsecret:
   - interruptible via vlc_interrupt and GCancellable
   - use g_bus_watch_name to detect if the secret service is running: this
     avoid spawning a secret service on non gnome environments

 - added kwallet: WIP, see commit comment.

 - added tests

 - added vlc_credential
     - Helper functions to get/store a credential from the keystore and from
       the dialog (see usage in http.c)
     - vlc_credential_get will only return a credential where the path match the
       url (according to rfc7617 2.2)

TODO:
 - Apple Keystore
 - Add a checkbox in login dialog to ask user if he wants to save his password

PS: I just finished my work on vlc_credential_*, I need to put more comments
and review it again.

PPS: Why using a set of key/values instead of an url plus a realm, and a
authtype ? I'm still hesitating a little, but both libsecret and OSX keystore
work with a hash table or a finite set of keys whereas kwallet works with an
url. So this is 2 vs 1...

Thomas Guillem (8):
  add vlc_keystore API
  keystore: add plaintext module
  keystore: add libsecret keystore module
  configure: move and rework kde4-config detection
  keystore: add kwallet module
  add tests
  add vlc_credential API
  http: use vlc_credential

 configure.ac                 |  47 +++-
 include/vlc_keystore.h       | 246 +++++++++++++++++++
 modules/Makefile.am          |   1 +
 modules/access/http.c        |  35 ++-
 modules/keystore/Makefile.am |  35 +++
 modules/keystore/kwallet.cpp | 566 +++++++++++++++++++++++++++++++++++++++++++
 modules/keystore/kwallet.hpp |  69 ++++++
 modules/keystore/plaintext.c | 483 ++++++++++++++++++++++++++++++++++++
 modules/keystore/secret.c    | 346 ++++++++++++++++++++++++++
 src/Makefile.am              |   2 +
 src/libvlc-module.c          |   7 +
 src/libvlccore.sym           |   9 +
 src/misc/keystore.c          | 383 +++++++++++++++++++++++++++++
 test/Makefile.am             |   3 +
 test/modules/keystore/test.c | 266 ++++++++++++++++++++
 15 files changed, 2484 insertions(+), 14 deletions(-)
 create mode 100644 include/vlc_keystore.h
 create mode 100644 modules/keystore/Makefile.am
 create mode 100644 modules/keystore/kwallet.cpp
 create mode 100644 modules/keystore/kwallet.hpp
 create mode 100644 modules/keystore/plaintext.c
 create mode 100644 modules/keystore/secret.c
 create mode 100644 src/misc/keystore.c
 create mode 100644 test/modules/keystore/test.c

-- 
2.1.4



More information about the vlc-devel mailing list